-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[WDS] Disconnected! with HTTPS and nonstandard port #592
Comments
I tested this by doing |
Ah, I think I found the bug. When using https mode, the So what we need to do, is check if the |
PR #594 was just merged. This should fix the bug. I'm not sure yet if this will be backported to |
Ah, that PR only partially fixes this bug. The url now is |
Fixed in |
Any chance this will get merged into 1.15 as well or will we have to wait for 2? We're currently unable to upgrade from 1.14.1 because of this |
@provstevi, I think we'll wait for v2. It would be a PITA to backport this to v1, because there were a lot more changes in handling this path. This could also break backwards compatibility. |
Okay I changed my mind about this. It will be some time before v2 will get stable, and this seems to be a blocking issue for some people. A PR is welcome to backport it. |
Should the PR be done on the webpack-1 branch? |
@provstevi, yes. |
Just submitted PR #604 on webpack-1 branch. |
I'm submitting a bug report
webpack and webpack-dev-server version:
webpack: 1.13.2
webpack-dev-server: 1.15.1
Please tell us about your environment:
OSX 10.10.5, embedded in create-react-app 0.4.1. This is related to the issue here: facebook/create-react-app#574
Current behavior:
When the dev server is started with
https: true
, the websocket attempts to connect to the a URL that doesn't include the port, e.g.https://localhost/sockjs-node/...
instead ofhttps://localhost:3000/sockjs-node/...
.Expected/desired behavior:
It should connect to a URL that includes a port, if the port is present. The previous version (1.14.1) worked correctly.
npm install -g create-react-app
create-react-app test-app && cd test-app
HTTPS=true npm start
To fix it:
From inside
test-app
, opennode_modules/react-scripts/node_modules/webpack-dev-server/client/index.js
Change line 62 from this:
To this:
I couldn't see any good way from the WebpackDevServer config to influence how this protocol is handled. It does seem like the
port
attribute is being set correctly, so maybe there's a bug inurl
orSockJS
that's causing the port to be ignored?WDS should connect to the server.
To enable HTTPS mode with the webpack-dev-server.
The text was updated successfully, but these errors were encountered: