-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
react-scripts 3.3.0 - "The development server has disconnected. Refresh the page if necessary" #8203
Comments
Did you also see an error related to websockets in the console? This could be related to #8075 . The fix is merged (#8079) and will be released with 3.3.1. If you don't want to downgrade to 3.2.0, you can hack up line 62 from:
in the following file: |
Unfortunately |
Same for me, nginx reverse proxy for ssl, I have the My nginx config:
|
After some digging I found that this is related to nginx's default proxy_read_timeout 60s rule. It seems that prior Adding the following two rules to my
HTH |
I did attempt this and it actually still didn't work. The only way was downgrading my react-scripts still. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
I am still experiencing this issue, I've also ejected... not sure if anyone else is experiencing post eject.. |
I can confirm this is still happening even in 3.3.1. Same as the comments above, I'm using a docker image to run the app in a reverse proxy with https enabled. |
Hello |
I looked at my package.json and it seems like my react-scripts version is 1.1.15, does it make sense? It's very old:
Should I upgrade to 3.2.0 then? |
Confirm that setting proxy_send_timeout will solve the problem. |
Is there a simple way to set it via a patch in react-dev-utils ? |
Hey guys, In case I'm not even using nginx could it be just related to using an old version of react-scripts? From the answers here it seems that react-scripts 3.3.0 causes this, so I cannot understand the source of my problem. The react web app is live, and a small percentage of users experience this disconnection problem. Thanks in advance |
Are you serving the application live in production with "react-scripts start"? That's a development script and should not be used for production. Try to update react-script in package.json or follow a guide like https://create-react-app.dev/docs/updating-to-new-releases. In any case, you should stop serving your application with this. Run a build and upload it to your server. |
Hello michaeljota thank you, yes, it's in production and I'm still serving it with "npm start". The reason is that I still implement changes and it's easier to update files without re-building the project. |
It would appear our setting to silence these messages stopped working in webpack some time recently:
Appears this is the same issue: webpack/webpack-dev-server#2166. If someone could send a PR upstream to fix the issue, it'd be greatly appreciated! |
The problem is not the logging part, it's that after one minute you are disconnected from the dev server. It appears in 3.3, didn't try with 3.4 ATM |
Ah sorry i posted in the wrong issue. Meant to post in #8153. I was tired 😴 |
Hi. I'm running |
I upgraded my react-scripts to 3.2.0. The problem was "solved" in a sense that that I don't see the message "server was disconnected" in the console. Yet, the exact problems still persist, the web app functions in a somewhat random fashion for 5% of the users, while for others everything is working fine. All users use the most recent version of Google chrome, I cannot tell what causes those problems to only some of them |
3.4 didn't seem to work for me unfortunately. |
I see the same error on console with v3.4.1. Hot reloading works in the sense every time there is a code change the error will be thrown and the browser will do a full-page refresh but not a per-module reload. |
@AntonioRedondo the original issue here was that the server disconnected, so no new updates were made. Maybe you have something to do with your HMR configuration? |
@michaeljota maybe it does, maybe it doesn't. As per discribed on this issue the HMR configuration is as it comes with Create React App, no ejection, no extra config files. |
react script 3.4.1 and all of the sudden it happens to me as well. Any fix would be much appreciated |
I'm still using 3.2.0 to fix this issue. |
Had to revert to base branch and it is working again. I suspect this issue happen when I have some conflicts with some modules that I am using. |
I had similar problems when using It turned out that I had to specify the base path for the requests I want to proxy as first argument for const { createProxyMiddleware } = require('http-proxy-middleware');
[...]
module.exports = function(app) {
app.use(apiProxyPath, createProxyMiddleware(apiProxyPath /*only proxy request to that path */, options));
}; |
facing this issue even in |
Same problem here with "react-scripts": "^3.4.1", and after trying all the above in this thread... |
I hope this helps someone. I added this to my config as @nazar said:
But i was getting errors about $connection_upgrade not being recognised. So i had to add this to my conf file
It now works. Im using react-scripts 3.4.1. |
Still seeing this issue in 3.4.1. |
I have two issues when using react-scripts 3.4.1:
However Downgrading to 3.2.0 solved I run everything locally. |
I was seeing this again using the same setup of a reverse proxy. And it was because the reverse proxy was blocking the request (Because of someone updating it). After updating the reverse proxy, this started worked again (It's working since 3.4.0). So maybe this can be tested against the described scenario, and because it's working now, this should be close. This is because since I'm following this issue, several end up here, but with a different scenario, just the same error. And that's not helpful, because with a proper reproducible scenario its unlikely anyone could help them. |
I solved this issue adding the following package resolution on my package.json:
|
react-scripts 3.4.3, the issue still persists. |
That's yarn only, no? Or will it work with npm? Where did you add this specifically? |
@macmicke-se add resolutions in the parent scope of |
Facing this issue in
This solved the issue for me. |
Changing the nginx conf to this did it for me:
|
So in development, just a standard create-react-app template, and I start receiving this console error right away.
I went through previous issues of this sort, followed all instructions but no matter what still ran into this error.
The only way I was able to prevent it from happening was downgrading to react-scripts-3.2.0
The text was updated successfully, but these errors were encountered: