Skip to content
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

EventSource failed loading #248

Open
AleCaste opened this issue Sep 10, 2017 · 5 comments
Open

EventSource failed loading #248

AleCaste opened this issue Sep 10, 2017 · 5 comments

Comments

@AleCaste
Copy link

AleCaste commented Sep 10, 2017

Hello I am getting this error on the browser (Chrome v60.0.3112.113):
EventSource failed loading: GET "http://localhost:8080/__webpack_hmr"
I am using Express v4.15.4, webpack v3.5.6, webpack-dev-server v2.7.1, webpack-hot-middleware v2.19.1
My code looks like this:

  app.use(webpack_dev_middleware(webpack_compiler, {
    publicPath: webpack_configs.output.publicPath,
    stats: {
      'errors-only': true,
      colors: true,
      modules: false,
      children: false,
      chunks: false,
      chunkModules: false        
    }
  }));
  app.use(webpack_hot_middleware(webpack_compiler, {
    log: console.log
  }));
  app.use( express.static(PUBLIC_PATH) );

Any ideas about how can I track the reason of this problem?
Thanks!

@AleCaste
Copy link
Author

Hello,
I just cloned the current webpack-hot-middleware repository (2.19.11) and ran the example.
As you can see on this image, I am still getting the EventSource failed loading error on Chrome.

eventsource_failed_loading

I am running Windows 7.
I tried to run the example on Chrome, Opera and Firefox and it fails on all of them.
I tried on node version 8.4.0, 6.11.2 and 4.1.1 ... and it fails on all of them.
The npm version I am using is 3.10.10

So maybe it is a Windows-only issue, I don't know.
But the current webpack-hot-middleware version definitely fails when using SSE.

Any thoughts?

@glenjamin
Copy link
Collaborator

This usually ends up being firewall related. Lots of people have found amit was related to bitdefender

@AleCaste
Copy link
Author

Issue solved.
Bitdefender was the cause. See:
#36 (comment)
#189 (comment)
https://stackoverflow.com/questions/30625261/server-sent-events-not-send-until-php-script-execution-end/30626490#30626490
https://forums.asp.net/post/5315602.aspx

As for today, it doesn't seem one can do much about it apart from turning Bitdefender off (there is no need to uninstall it!!!)

The strange thing is that we have another web app (built in java, not using node) and SSE works perfectly fine on it even when Bitdefender is on.
So I don't know if the issue would have to do with the Express implementation.

Anyhow, good to know that Bitdefender could be the cause of SSE messages being blocked in some cases. Just to be aware of it.

@AleCaste
Copy link
Author

Thanks @glenjamin, I was just writing my last answer about the same thing! Thanks a lot!!!

@antkougblenou
Copy link

I have a similar issue, but I do not have bit defender and my adblock is deactivate on my local, nevertheless I am getting the same error.
Does anyone know what else would be causing such an issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants