angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

[WDS] Disconnected! on firefox but works well in chrome Angular CLI 7.3.5

Open 0x3ch0 opened this issue 7 years ago • 11 comments

When running ng serve command and opening the http://localhost:4200 in firefox for the first time this error does not appear, but when I reload or refresh the page this error constantly appears. In chrome this error is not showing even how many times I refreshes or reloaded the page.

Angular CLI: 7.3.5 Node: 8.10.0 OS: linux x64 Angular: ... Package Version

@angular-devkit/architect 0.13.5 @angular-devkit/core 7.3.5 @angular-devkit/schematics 7.3.5 @schematics/angular 7.3.5 @schematics/update 0.13.5 rxjs 6.3.3 typescript 3.2.4

0x3ch0 avatar Mar 14 '19 06:03 0x3ch0

any fast fix for this ?

0x3ch0 avatar Apr 08 '19 04:04 0x3ch0

No fix, but I've noticed when I switch tabs in chrome while the page is refreshing, I do not get this error. Every time.

Possibly has something to do with many connections happening at once, and Chrome limiting the number of network threads in background tabs.

This only happens in a larger project with a dozen or so API request on load. I have a smaller project with 3 requests and have never encountered this issue.

This has been happening for me for months now. Very annoying.

cfremgen avatar Apr 08 '19 12:04 cfremgen

Have you tried this error on firefox? I never encountered this problem on google chrome.

0x3ch0 avatar Apr 08 '19 13:04 0x3ch0

I have only had this issue in Chrome, have not tried to reproduced it in FF. I believe FF has similar rate limiting.

cfremgen avatar Apr 08 '19 13:04 cfremgen

I see, I hope someone gives high priority to this. Have seen this issue from way back Angular 6 up to now.

0x3ch0 avatar Apr 08 '19 13:04 0x3ch0

Seems turning off live reloading has fixed this issue for me.

ng serve --live-reload=false

cfremgen avatar Apr 25 '19 15:04 cfremgen

@cfremgen thank you for that :) it fix my issue also. Just wondering now if this flag is safe in production mode.

0x3ch0 avatar May 03 '19 02:05 0x3ch0

You shouldn't be using ng serve to serve production builds.

cfremgen avatar May 03 '19 12:05 cfremgen

Oh thanks again bro I will be closing this thread then :)

0x3ch0 avatar May 07 '19 00:05 0x3ch0

Hi all , I've this problem , but only on Firefox, Chrome does not show error . If i did not to use ng serve , which is the correct mode to run angular project in production ?? I've installed pm2 , create ecosystem.js and launch systemd script that launch ng serve . This is not correct ? Thanks

lfratini avatar Jul 09 '19 14:07 lfratini

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.