question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console error: WebSocket connection to 'ws://localhost:53317/socket' failed

See original GitHub issue

What version of Remix are you using?

1.3.1

Steps to Reproduce

  • Generate a new remix app and npm run dev
  • Add these scripts and relevant node packages (concurrently, sass) "dev": "concurrently \"npm run dev:generate-css\" \"remix dev\"", "dev:generate-css": "sass --watch ./app/scss:app/css",
  • Create a folder at /app/scss
  • Start the dev server, go to localhost, and open the console in Chrome’s inspector
  • Whilst the app is running, create a .scss file under app/scss
  • Check the console in Chrome’s inspector to see the error and broken livereolad

Expected Behavior

No errors for WebSocket connection to ‘ws://localhost:53317/socket’ failed to appear when a watched scss file is added, and working live reload

Actual Behavior

Seeing a WebSocket connection to ‘ws://localhost:53317/socket’ failed in the console, and broken livereload

(index):30 WebSocket connection to 'ws://localhost:53317/socket' failed: 
(anonymous) @ (index):30
(anonymous) @ (index):45
(index):42 Remix dev asset server web socket error:
(index):43 Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}isTrusted: truebubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: WebSocketbinaryType: "blob"bufferedAmount: 0extensions: ""onclose: nullonerror: (error) => {…}onmessage: (message) => {…}onopen: nullprotocol: ""readyState: 3url: "ws://localhost:53317/socket"[[Prototype]]: WebSocketdefaultPrevented: falseeventPhase: 0path: []returnValue: truesrcElement: WebSocketbinaryType: "blob"bufferedAmount: 0extensions: ""onclose: nullonerror: (error) => {…}onmessage: (message) => {…}onopen: nullprotocol: ""readyState: 3url: "ws://localhost:53317/socket"[[Prototype]]: WebSockettarget: WebSocketbinaryType: "blob"bufferedAmount: 0extensions: ""onclose: nullonerror: (error) => {…}onmessage: (message) => {…}onopen: nullprotocol: ""readyState: 3url: "ws://localhost:53317/socket"[[Prototype]]: WebSockettimeStamp: 66.39999997615814type: "error"[[Prototype]]: Event
ws.onerror @ (index):43
error (async)
(anonymous) @ (index):41
(anonymous) @ (index):45

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
abn5xcommented, May 26, 2022

still happening…

1reaction
tessellatorcommented, May 16, 2022

I believe this is a duplicate of #2958.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebSocket connection failed. Error in browser console ...
Starting from version 8.0.4, a lot of this messages: WebSocket connection to 'ws://ip_host:port/api/live/ws' failed: centrifuge.js:544 ...
Read more >
WebSocket connection failed: Error during ...
I just realized that websockets is working partially. I see a 101 Switching Protocols request in the Chrome developer console. However the only ......
Read more >
WebSocket
To open a websocket connection, we need to create new WebSocket using the special protocol ws in the url: let socket = new...
Read more >
Troubleshooting connection issues
You are trying to reach a plain WebSocket server; The server is not reachable; The client is not compatible with the version of...
Read more >
websocket connection failed
I get the following error in the browser console: roslib.min.js:1 WebSocket connection to 'ws://127.0.0.1:9090/' failed: Error in connection ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found