-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
Upgrading to 3.3.0 from 3.3.0-next.62 breaks proxied ws connections #8094
Comments
Can reproduce on Chrome without proxy. Tried to visit dev server and got an error like this. |
I have similar problems, For the websocket connection I am using When trying to make a connection the upgrade request fails with HTTP-400. One obvious difference in the commandline output of |
Same problem here, it works fine with 3.2.0 and breaks with 3.3.0 with an I'm using Socket.io, but it seems this breaks on all websocket implementations. |
I'm seeing somewhat different symptoms, however it seems likely to be related - on 3.2.0 proxying worked perfectly, however on 3.3.0 proxied websocket connections sit in pending for over a minute on chrome before the connection is established. Interestingly, Firefox is somewhat faster, around 20s before the connection is established. |
When launching in HTTPS, the client tries to connect to the dev server with ws (and the browser app doesn't start) instead of wss. |
Got the same issue
|
@lowgain can you put Downgrading back to |
Sure - all done! |
Thanks :) |
Oh my God.... |
I also downgraded to
|
We are also affected but we didn't downgrade, instead we connect to the websocket server directly in development, you don't have to deal with cors with ws so it's okay. However you have to change your ws endpoint url if you want to test it on somewhere else than localhost. |
So, can you please share some code of your fix? Im not really sure where to change this ws endpoint.. |
We run api server on port 4000 and cra on 3000. We have
But because of this issue we cannot connect websockets to
The key is REACT_APP_API_URL env variable that tells browser where our api server is. |
Related to webpack/webpack-dev-server#2310 |
@OzySky how did you update webpack-dev-server using CRA? |
This obviously is not ideal, but at least it fixes it in the mean time.
|
I don't think suggesting ejecting is a very good idea in this case. Just wait for the minor release. |
When can we expect a release that fixes this issue? |
Guys, this just broke our app.. Don't push broken code, please and thank you. |
@dankolesnikov You have never pushed broken code right? If you are that great, good for you, but others are just humans that do mistakes. You can be also more proactive with your brilliant mind and fix the problem instead of waiting for others to do it, you know? |
Can someone with a signed CLA create a pull request to fix this bug? |
@OzySky Why is a problem for you to "sign" CLA? It's just a few clicks, nothing harmful. |
This is already fixed in master. Shouldn't a release of a new version be enough to fix this bug? |
Guys, can you please release a version? |
cc @iansu |
Releasing in the next couple hours. |
Downgrading back to
react-scripts@3.2.0
fixes this. It will be fixed soon.Describe the bug
For the past week I've been working with
react-scripts@3.3.0-next.62
to use typescript 3.7 features. I just upgraded to3.3.0
as it was just released. (EDIT: Upgrading to3.3.0-next.80
causes the same issue as3.3.0
)My application uses the package.json
proxy
setting to proxy both http and ws connections. This has been working fine, but upgrading to3.3.0
causes the socket connections to break. Downgrading to3.3.0-next.62
causes it to start working again.Did you try recovering your dependencies?
Yes - I deleted
node_modules
andpackage-lock.json
and reinstalled. The same result was encountered. I am also on the latest npm version (which still works with3.3.0-next.62
Which terms did you search for in User Guide?
I searched for websocket proxy issues - the closest I found was issue 6497 but this does not seem to be the same.
Environment
^ as a note to the above, I was on node 12 when I first encountered this error, but checked if an upgrade would resolve the problem.
Steps to reproduce
npm install --save-dev react-scripts@3.3.0
package.json
to match a local service that serves http and ws (eg."proxy": "http://localhost:8080/"
)npm start
and view the appExpected behavior
The proxied websocket connection should behave normally.
Actual behavior
Console logs output the following:
in Chrome, a similar log is output:
The text was updated successfully, but these errors were encountered: