microsoft / microsoft/vscode-remote-release
VSCode fails to to connect to Codespaces if WSL2 is active
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
There seems to be some kind of race condition present when attempting to connect to Codespaces from VSCode on a machine with WSL2 active. Deleting .vscode-server from WSL2 seems to improve the odds of the connection succeeding, but could be superstition.
Could not fetch remote environment
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
- VSCode Version: 1.104.2
- Local OS Version: Windows 11
- Remote OS Version: Debian 12
- Remote Extension/Connection Type: Dev Containers (GitHub Codespaces)
Steps to Reproduce:
- Start WSL2
- Open VSCode
- Open a Codespace
Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with WSL2 active using VSCode 1.104.2 on Windows 11, connecting to a Debian 12 Codespace through Dev Containers. Compare connection attempts after removing .vscode-server and inspect the “Could not fetch remote environment” and WebSocket 1006 failures; done means the connection reliably succeeds with WSL2 running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, docker, vscode
- Domain
- devtools, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100