Closed
Description
Describe the bug
When setting a proxy
setting in package.json
, as expected this tunnels traffic to the proxy location, however it also seems to tunnel traffic like this:
/sockjs-node/858/hjulxq2g/websocket
. As expected, auto refresh on updating my app no longer works.
Did you try recovering your dependencies?
Yes. Deleting and rebuilding made no difference.
Which terms did you search for in User Guide?
Environment
Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
Internet Explorer: 11.0.17763.592
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.1 => 3.0.1
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
- Create a react app
- Add
"proxy": "http://localhost:8000/"
topackage.json
- Observe console -
The connection to wss://localhost/sockjs-node/264/ludnoeal/websocket was interrupted while the page was loading.
Expected behavior
This worked fine for the past two weeks or so, but it doesn't seem to work anymore today. I expect it to proxy all traffic except for the sockjs-node endpoint as this breaks webpack-dev-server.
Actual behavior
All traffic is proxied, including sockjs-node endpoints.
Activity
dmile commentedon Jul 24, 2019
Looks like a duplicate of #6720
Try a different browser or manual proxy configuration
chancecarey commentedon Jul 24, 2019
No, I don't believe so. In the logs of the server the proxy points to, I see the exact endpoints that were forwarded that shouldn't have been - specifically
/sockjs-node
. As in, those requests do get proxied when they shouldn't be.chancecarey commentedon Aug 5, 2019
After further digging it seems this issue occurs on Firefox, but not on Chrome.
dmile commentedon Aug 10, 2019
@cmcarey The new version of
react-scripts
was released. Please udate your project to:chancecarey commentedon Aug 12, 2019
Thanks!
For posterity, issue was fixed in #7444