Skip to content

VS Code stuck on opening remote with WSL #213302

Closed
@bsShoham

Description

Does this issue occur when all extensions are disabled?: Yes (except WSL)

  • VS Code Version: 1.89.1
  • OS Version: Windows 11 23H2, WSL2 Ubuntu 22.04.4

I recently started having this issue, that after I open up a (specific) repository for the second time, vs code gets stuck in loading mode, and the status bar shows "Opening Remote..." message at the remote indicator.
Opening it in a different location works, but once I change folder and choose this repo folder it reload the window and the remote refuses to connect.

This happens starting from the second time of me opening that repo as workspace, it only applies to that repository at that location (meaning, resetting or deleting the repository and cloning it again at the same path doesn't work, but cloning it and using a different path works, maybe cache related(?)), also opening the workspace on the parent folder or one of the child folders works okay as well, only that specific repository and not other.

I couldn't find anything worth mentioning in all of the output tabs, and no tab of WSL log or anything like that was available

The repository in question is quite ironically VS code own repository (this one)

I started code with debug info and got this:

+ COMMIT=dc96b837cf6bb4af9cd736aa3af08cf8279f7685
+ APP_NAME=code
+ QUALITY=stable
+ NAME=Code
+ SERVERDATAFOLDER=.vscode-server
+ realpath /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin/code
+ dirname /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin/code
+ dirname /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin
+ VSCODE_PATH=/mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code
+ ELECTRON=/mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/Code.exe
+ IN_WSL=false
+ [ -n Ubuntu ]
+ IN_WSL=true
+ [ true = true ]
+ export WSLENV=ELECTRON_RUN_AS_NODE/w:WT_SESSION:WT_PROFILE_ID:
+ wslpath -m /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js
+ CLI=C:/Users/user/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js
+ WSL_EXT_ID=ms-vscode-remote.remote-wsl
+ ELECTRON_RUN_AS_NODE=1 /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/Code.exe C:/Users/user/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js --locate-extension ms-vscode-remote.remote-wsl
+ cat /tmp/remote-wsl-loc.txt
+ WSL_EXT_WLOC=c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-wsl-0.88.2
+ [ -n c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-wsl-0.88.2 ]
+ wslpath -u c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-wsl-0.88.2
+ WSL_CODE=/mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslCode.sh
+ /mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslCode.sh dc96b837cf6bb4af9cd736aa3af08cf8279f7685 stable /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/Code.exe code .vscode-server .
+ [ -z .vscode-server ]
+ [ .vscode-server = .vscode-insiders ]
+ [ ! -t 0 ]
+ VSCODE_REMOTE_BIN=/home/user/.vscode-server/bin
+ AUTHORITY=wsl+default
+ [ Ubuntu ]
+ AUTHORITY=wsl+Ubuntu
+ dirname /mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslCode.sh
+ /mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslDownload.sh dc96b837cf6bb4af9cd736aa3af08cf8279f7685 stable /home/user/.vscode-server/bin
+ [ ! -d /home/user/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685 ]
+ RC=0
+ [ 0 -eq 100 ]
+ [ 0 -ne 0 ]
+ mktemp /tmp/vscode-distro-env.XXXXXX
+ STORED_ENV=/tmp/vscode-distro-env.FsU8F9
+ env
+ dirname /mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslCode.sh
+ VSCODE_CLIENT_COMMAND=/mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/Code.exe VSCODE_CLIENT_COMMAND_CWD=/mnt/c/Users/user/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts VSCODE_CLI_AUTHORITY=wsl+Ubuntu VSCODE_CLI_REMOTE_ENV=/tmp/vscode-distro-env.FsU8F9 VSCODE_STDIN_FILE_PATH= WSLENV=VSCODE_CLI_REMOTE_ENV/w:ELECTRON_RUN_AS_NODE/w:WT_SESSION:WT_PROFILE_ID: /home/user/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/bin/remote-cli/code .
+ exit 0

I tried the workaround suggested here: #212289 (comment)
but it didn't help

Would love help and/or directions to explore!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions