-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
v3 -> v4, certificate issues, resulting in WebSocket being blocked #3674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Why do not use the issue template? I don't know what is the problem, sorry |
Please read the error message, it clearly says what the problem is, you open What is versions? How you open page? Do you proxy webpack dev server? Who knows |
Just updated it, sorry. Also, I've found very similar issue (or maybe the same) on another place: |
Not related, please provide steps how we can reproduce |
Can't reproduce locally, sorry, without additional information I can't help |
I come in peace. I’m migrating from Webpack 4 to 5 (v.5.50.0) and also webpack-dev-server from v3 to v4 (4.0.0-rc.1). I updated devServer config as per descriptions, but with new versions I’m getting this strange WS error, which wasn’t there previously. Running it locally in browser environment. No proxies for dev server. I’d hoped there is a new config option added or renamed that I’m missing. |
Please create reproducible test steps. What is value in address bar of your browser? Can you show network requests in dev tools. Please always fill out the |
Hope my PR will fix the problem, I will do stable release today, feel free to update it, if it will not fix the problem, I will reopen |
Hi, first of all thank you, as your commit made my app start and work again. But WS is still failing to connect
I would like it if I could tell exactly what happened. But this is quite a big app and all I did was update to newest versions of Webpack and webpack-dev-server which resulted in devServer object config changes - which I copy/pasted entirely. Adress in my navbar is https://app.myapp.net:8080/ and all I can give you from the network log is that the first WS request looks like this:
and every next is: I will give it another look tomorrow with a fresh pair of eyes, but if you have anything else that comes on your mind please do tell. Also, that fallback you just changed in the code, was there a way in manual setup in order to avoid it? It doesn't matter much right now, but can't hurt. |
We have
need stack trace, on 13 line we have |
Please provide your |
Also you can always debug it, go to |
HI, here's entry and output:
|
Remove:
To be honestly I don't know how it works before, because you have multiple clients and hot code, webpack-dev-server by default include |
Thanks, the app now works as expected, but HMR does not work. Web console says everything is fine:
I tried both hot:'only' and hot:true. I have also removed HotModuleReplacementPlugin. Almost there:) |
Remove
you don't have hash here, so browser can cache them, ideally you should not touch these options, it is very exotic options |
Also my recommendation to remove |
Removed them, but still nothing :( The app works fine, everything in the console and terminal is fine, but HMR doesn't work. |
Can you provide the |
or maybe run |
|
hm, looks fine, does no hot and no browser reload work? |
Nope, I need to shut down the server and start it again to see the changes. |
npx webpack info
|
You still on |
You're right. Thanks for the help so far, it's been immense. I will let you know if I find out more, as I believe the issue is on my side right now. Cheers. |
Yep, feel free to ping me, anyway you can invite me in project, I will look at the problem and say how to fix it |
Ok, this is my last shot, but I think I might have clue: When I make changes to my entry point file (shell.tsx), save it - the changes are finally detected and page is refreshed, but error is thrown:
In network log, other chunks are missing as well: administration.306180afceec1e82b967.hot-update.js When I go to https://app.myapp.net:3001/webpack-dev-server Those files really don’t exist (only original versions ie. administration.theme-XY.js), but there are some other with that hash that do exist, such as:
Here is part of config regarding split chunks:
Hope this gives you a better clue. If not, thanks anyway. |
Why you do |
gitpod-io/gitpod#11170 (comment) This works for me |
Hi guys,
First of all, thanks for all the work you've been putting into this project - it matters.
The issue appears while trying to migrate from v3 to v4 latest (4.0.0-rc.1).
I'm trying to run the app with HMR enabled and own https certificates.
But I'm getting this in web console:
The page at 'https://app.myapp.net:8080/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://app.myapp.net:8080/ws'. This request has been blocked; this endpoint must be available over WSS.
This is the devServer config;
Is there something in configuration I'm missing. I've noticed many changes, so I hope someone can give me a hand until more recent docs are out there.
Thanks.
Expected Behavior
Certificate loaded as in v3 and no issues with running the app.
Actual Behavior
Application not loading due to WS being blocked for security issues. Probably certificate not being loaded correctly.
The text was updated successfully, but these errors were encountered: