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

Remix dev asset server web socket error before first file change #4722

Closed
feljx opened this issue Nov 30, 2022 · 2 comments
Closed

Remix dev asset server web socket error before first file change #4722

feljx opened this issue Nov 30, 2022 · 2 comments

Comments

@feljx
Copy link

feljx commented Nov 30, 2022

What version of Remix are you using?

1.7.6

Steps to Reproduce

Using create-remix without a template and the following selection:

  • Just the basics
  • Cloudflare Workers
  • Typescript
  • No npm install

After starting the dev server with npm run dev, both Firefox and Safari cannot connect to the dev asset server web socket.

Expected Behavior

Browser should be able to connect to web socket.

Actual Behavior

image

Browser attempts to reconnect to web socket unsuccessfully.

The remix.config.js setting devServerPort is ignored in my barebones project (no changes made).

Observation

After saving any file in the app folder (which triggers either 2 or 3 [mf:inf] Worker reloaded! (0.50MiB) messages for me) AND subsequently reloading the page in the browser, the browser can connect to the web socket.

However, after worker reloaded 2 or 3 times, it falls back to port 8002 by itself. As I said above, this does not depend on the devServerPort setting; it falls back to 8002 either way.

Screenshot 2022-11-30 at 22 56 59

@machour
Copy link
Collaborator

machour commented Dec 1, 2022

Duplicate of #4692, fixed by #4725

@machour machour closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
@hs41-18
Copy link

hs41-18 commented Dec 13, 2022

@feljx if you are using vs code in remote mode, try to add WebSocket port (e.g. 56754 in your case) manually under ports>add ports - this will forward the port for you. You can also use devServerPort in the remix config ws port to set and ensure the manually forwarded port won't change

to change the application server port, you can use PORT=.... in .env, note that this is the application port, not the socket

@remix-run remix-run locked as resolved and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants