code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Bug]: The workbench failed to connect (IPv6)

Open Saiv46 opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome v103
  • Local OS: Linux Mint 20.3
  • Remote OS: Linux Mint 20.3
  • Remote Architecture: amd64
  • code-server --version: 4.5.1 97d170331b51ee75c8e4bbdab23c755e3eeaaa8c with Code 1.68.1

Steps to Reproduce

  1. Install code-server from install.sh
  2. Add following line in config to bind to IPv6 address: bind-addr: '[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080' (here and after will be this random address, but could be ::1)
  3. Open that address in browser

Expected

Should run properly after installation.

Actual

An unexpected error occurred that requires a reload of this page.

The workbench failed to connect to the server (Error: Failed to construct 'WebSocket': The URL 'wss://[200:12/stable-30d9c6cd9483b2cc586687151bcbcd635f373630?type=Management&reconnectionToken=79739433-33e2-4f51-9504-7ff6dbccbd29&reconnection=false&skipWebSocketFrames=false' is invalid.)

Logs

ERR Failed to construct 'WebSocket': The URL 'wss://[200:12/stable-30d9c6cd9483b2cc586687151bcbcd635f373630?type=Management&reconnectionToken=49646815-8bf6-4f21-8aa6-858b03715fa0&reconnection=false&skipWebSocketFrames=false' is invalid.: Error: Failed to construct 'WebSocket': The URL 'wss://[200:12/stable-30d9c6cd9483b2cc586687151bcbcd635f373630?type=Management&reconnectionToken=49646815-8bf6-4f21-8aa6-858b03715fa0&reconnection=false&skipWebSocketFrames=false' is invalid.
    at new E (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:621:41987)
    at Object.create (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:621:44025)
    at b.connect (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:621:44899)
    at h (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:623:6790)
    at u (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:623:7161)
    at n (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:623:9150)
    at d (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:623:9684)
    at S (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:623:10421)
    at async a._createConnection (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:2152:44746)
    at async R.getEnvironmentData (https://[200:12c4:ba7d:c540:2e86:2305:fb2b:225a]:8080/stable-30d9c6cd9483b2cc586687151bcbcd635f373630/static/out/vs/workbench/workbench.web.main.js:2152:38910)

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • [X] I cannot reproduce this in VS Code.
  • [X] I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • [X] I am using HTTPS.

Notes

There was issue at microsoft/vscode#151438, which was fixed by microsoft/vscode#151500

Looks like code-server wasn't updated to latest VSCode yet.

Saiv46 avatar Jul 29 '22 15:07 Saiv46