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.

[Bug]: The workbench failed to connect to the server (Error: Failed to construct 'WebSocket':

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: macOS
  • Remote OS: Ubuntu
  • Remote Architecture: amd64
  • code-server --version: 1.71.2 74b1f979648cc44d385a2286793c226e611f59e7 x64

Steps to Reproduce

  1. open code-server
  2. connected with IPV6
  3. Error: The workbench failed to connect to the server (Error: Failed to construct ‘WebSocket’: The URL ‘ws://[[2409:8a55:223b:xxxxxxxxxxxxxx]]:8080/stable-74b1f979648cc44d385a2286793c226e611f59e7?reconnectionToken=58166be8-c072-4962-bfb5-dbb1d5edb8f7&reconnection=false&skipWebSocketFrames=false’ is invalid.)

Expected

The WebSocket should work and should not have duplicated brackets.

Actual

Error: The workbench failed to connect to the server (Error: Failed to construct ‘WebSocket’: The URL ‘ws://[[2409:8a55:223b:xxxxxxxxxxxxxx]]:8080/stable-74b1f979648cc44d385a2286793c226e611f59e7?reconnectionToken=58166be8-c072-4962-bfb5-dbb1d5edb8f7&reconnection=false&skipWebSocketFrames=false’ is invalid.)

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
iamfaithcommented, Oct 29, 2022

CSP could be the hash issue we are fixing in 4.8.1.

Confirmed fixed! Love u! Love code-server! I close this issue.

2reactions
code-ashercommented, Oct 27, 2022

CSP could be the hash issue we are fixing in 4.8.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug]: The workbench failed to connect (IPv6) · Issue #5386
The workbench failed to connect to the server (Error: Failed to construct 'WebSocket': The URL 'wss://[200:12/stable- ...
Read more >
How do I solve this error? - Game Makers Help - Construct 3
Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
Read more >
2037967 – Apache reverse proxy doesn't seem to handle ...
Type: Bug ... Apache error log on the host (2.42 MB, text/plain) ... "The workbench failed to connect to the server (Error: WebSocket...
Read more >
Getting the reason why websockets closed with close code 1006
Try overriding the built in On Connected /Disconnected methods on the server and see. My assumption only is that you're closing it but...
Read more >
WebSocket connection to 'wss://...' failed. ASP .Net Core Web ...
PS: we found a workaround to the bugs this web socket issue provokes in the app by configuring the options of endpoints.MapBlazorHub in...
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