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

404 with http://localhost:3000/sockjs-node/info?t=... #43

Closed
MOZGIII opened this issue Mar 1, 2020 · 9 comments · Fixed by #64
Closed

404 with http://localhost:3000/sockjs-node/info?t=... #43

MOZGIII opened this issue Mar 1, 2020 · 9 comments · Fixed by #64

Comments

@MOZGIII
Copy link

MOZGIII commented Mar 1, 2020

This plugin produces requests to http://localhost:3000/sockjs-node/info?t=... for me (valid host/port!) that end up with 404.
It doesn't seem like my server serves this endpoint. I'm using electron-forge.

The actual reloading works.

Is there a way to stop those info requests for running, so they don't show up as errors? It seems like there should be a noInfo option for the socket...

@pmmmwh
Copy link
Owner

pmmmwh commented Mar 1, 2020

Hi - I have no knowledge on electron-forge or electron-related development in general. It would be great if you can provide a reproduce-able example somehow so that I can investigate further. To my understanding, if the socket request is resulted in a 404, the reloading wouldn't work properly on Webpack recompile, so I would also appreciate if you can further elaborate what you mean by "the actual reloading works".

@ro-savage
Copy link
Contributor

@pmmmwh - this is probably the same issue as #40 and possibly #30

And despite this 404 error, react-refresh works as expected (at least as best I can tell). There is just a bunch of errors in the console.

@blainekasten
Copy link
Contributor

This is solved with #23 as the socket initialization is behind a flag now

@MOZGIII
Copy link
Author

MOZGIII commented Mar 2, 2020

@blainekasten useLegacyWDSSockets - tried enabling it, doesn't seem to help. Am I missing something?

@MOZGIII
Copy link
Author

MOZGIII commented Mar 2, 2020

Here are the screenshots of the networking panel to give you some idea on what's going on:
image
image

And from console:
image

@pmmmwh
Copy link
Owner

pmmmwh commented Mar 2, 2020

@blainekasten useLegacyWDSSockets - tried enabling it, doesn't seem to help. Am I missing something?

Just released the fix in v0.2.0, mind trying that and see if it helps? From what I see from their source code, electron-forge uses webpack-hot-middleware out of the box, and that is not officially supported properly until now.

Other than that, I think the underlying cause might be due to us not handling __resourceQuery right now (it's on my todo list). For WDS, webpack/webpack-dev-server#1385. webpack/webpack-dev-server#2055 was supposed to fix that but since it is breaking they are delaying the release.

@MOZGIII
Copy link
Author

MOZGIII commented Mar 3, 2020

electron-forge uses webpack-hot-middleware out of the box

This is right, here's a tracking issue at their repo: electron/forge#1530.

Since I got feedback from both ends, I see the possibility of figuring out a proper solution together.

@pmmmwh
Copy link
Owner

pmmmwh commented Mar 4, 2020

electron-forge uses webpack-hot-middleware out of the box

This is right, here's a tracking issue at their repo: electron-userland/electron-forge#1530.

Since I got feedback from both ends, I see the possibility of figuring out a proper solution together.

Did 0.2.0 work for you? It should not use SockJS if WHM is present, but I won't be able to confirm this until I setup a full electron dev environment this weekend.

@MOZGIII
Copy link
Author

MOZGIII commented Mar 6, 2020

0.2 yields interesting results. New odd errors. Definitely worth creating a sample repo with a minimal example to play with.

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

Successfully merging a pull request may close this issue.

4 participants