Angular [webpack-dev-server] Connection Looping under Chrome
Asked Answered
D

3

7

For my Angular project(Angular 14, webpack-dev-server 4.9.3), web-pack-server disconnected and trying to reconnect message constantly looping if the application is run under Chrome. But the message does not show if run under Edge.

The message is shown under Console log.

Console log: Disconnected!, Trying to reconnect..., Live Reloading enabled.

Daguerreotype answered 5/10, 2022 at 14:34 Comment(3)
Are you using webpack-cli? Could you please share your Webpack config file.Damal
Did you ever figure this out? I suddenly have the same issueHarriettharrietta
on an angular project, I had this problem in all browsers, regardless of extensions. Everything was solved when I turned off the antivirus.Verenaverene
L
4

In my case I added an exception to the localhost address in my Kaspersky antivirus.

Under Security/Security Settings/Safe Browsing/Advanced Settings/Trusted URLs, click +Add and type in *localhost*.

Lorindalorine answered 18/9, 2023 at 6:54 Comment(0)
H
1

I would try opening your site in a Chrome Incognito tab.

If it works there, you know you have some plugin that does some weird sh...

Harriettharrietta answered 12/5, 2023 at 13:53 Comment(0)
D
-1

Here are couple of solutions:

1st Solution

Run npx webpack serve --allowed-hosts all

2nd Solution

Go to your config, in the devServer object, replace allowedHosts: 'auto' with allowedHosts: ['all']

Damal answered 5/10, 2022 at 14:52 Comment(1)
I am running on Windows 10. Where is the config file containing allowedHosts?Daguerreotype

© 2022 - 2025 — McMap. All rights reserved.