Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.63 is breaking in WSL2 #6031

Closed
PixeledCode opened this issue Dec 10, 2021 · 20 comments
Closed

Version 1.63 is breaking in WSL2 #6031

PixeledCode opened this issue Dec 10, 2021 · 20 comments
Labels
wsl Issue in vscode-remote WSL

Comments

@PixeledCode
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63
  • OS Version: Windows (WSL2 - Ubuntu)

Steps to Reproduce:

  1. Open Visual Studio Code from within WSL.
  2. Cannot access any file, and it gives error Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006).

Additional:

  • It is working on my laptop, which is using native Ubuntu.
  • Version 1.62 works fine but even though I have disabled auto-updates, VSC still updates as soon as I restart the app.
@aeschli
Copy link
Contributor

aeschli commented Dec 10, 2021

@PixeledCode Can you paste the content of the WSL Log here?

@aeschli aeschli transferred this issue from microsoft/vscode Dec 10, 2021
@aeschli aeschli added the wsl Issue in vscode-remote WSL label Dec 10, 2021
@PixeledCode
Copy link
Author

PixeledCode commented Dec 10, 2021

@PixeledCode Can you paste the content of the WSL Log here?

@aeschli are the logs from Log (Window) in the output terminal

[2021-12-10 20:44:20.397] [renderer1] [error] [Extension Host] (node:15800) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
[2021-12-10 20:44:20.538] [renderer1] [info] Invoking resolveAuthority(wsl)
[2021-12-10 20:44:21.764] [renderer1] [info] resolveAuthority(wsl) returned '::1:38125' after 1227 ms
[2021-12-10 20:44:23.831] [renderer1] [error] [remote-connection][Management   ][cea11…][initial][::1:38125] socketFactory.connect() failed or timed out. Error:
[2021-12-10 20:44:23.833] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:23.833] [renderer1] [error] [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
[2021-12-10 20:44:23.834] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:23.834] [renderer1] [error] Cannot register remote filesystem provider. Error while fetching remote environment. WebSocket close with status code 1006
[2021-12-10 20:44:23.834] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:23.844] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:23.844] [renderer1] [error] ENOPRO: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam'
    at Ei.withProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29039)
    at async Ei.doWatch (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:43145)
[2021-12-10 20:44:23.844] [renderer1] [warning] Ignoring the error while validating workspace folder vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam - No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam'
[2021-12-10 20:44:23.983] [renderer1] [error] ENOPRO: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam/styles/pages/_analysis.scss'
    at Ei.withProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29039)
    at async Ei.withReadProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29162)
    at async Ei.readFileStream (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:34013)
    at async u.doRead (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2369:42314)
    at async u.readStream (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2369:42035)
    at async sn.resolveFromFile (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2358:73209)
    at async o.doResolve (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2369:36878)
    at async Oa.doResolveAsText (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1741:85703)
    at async i.setInput (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2323:114414)
    at async n.doSetInput (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2323:35224)
    at async n.doOpenEditor (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2323:33525)
    at async n.openEditor (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2323:33151)
    at async vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2525:17056
[2021-12-10 20:44:23.996] [renderer1] [error] WebSocket close with status code 1006: Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:23.996] [renderer1] [error] No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam/.vscode': ENOPRO: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam/.vscode'
    at Ei.withProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29039)
    at async Ei.exists (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:31504)
    at async vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1799:6334
    at async Promise.all (index 0)
    at async E._initWorkspaceFolderSnippets (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1799:6499)
[2021-12-10 20:44:24.147] [renderer1] [error] No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam': ENOPRO: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam'
    at Ei.withProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29039)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Ei.exists (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:31504)
    at async Promise.all (index 0)
    at async vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1709:2049
[2021-12-10 20:44:24.406] [renderer1] [error] [Extension Host] Unavailable (FileSystemError): No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam/.git/config'
    at Function._handleError (c:\Users\Ancient\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:95:84345)
    at Object.stat (c:\Users\Ancient\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:95:82915)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.isFile (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:452:26535)
    at $y (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:249:312)
    at CI (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:249:1076)
    at qN (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:416:13052)
    at wC (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:416:12830)
    at XH (c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:517:8327)
    at c:\Users\Ancient\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.3\dist\extension\extension.js:516:12770
[2021-12-10 20:44:24.445] [renderer1] [error] No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam': ENOPRO: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/home/ancient/wsl/oci-assam'
    at Ei.withProvider (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29039)
    at async Ei.doResolveFile (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:30121)
    at async Ei.resolve (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:577:29844)
    at async m.findWorkspaces (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1549:6419)
[2021-12-10 20:44:24.447] [renderer1] [error] WebSocket close with status code 1006: Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:25.863] [renderer1] [error] [remote-connection][ExtensionHost][4aa81…][initial][::1:38125] socketFactory.connect() failed or timed out. Error:
[2021-12-10 20:44:25.864] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:25.864] [renderer1] [error] [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
[2021-12-10 20:44:25.864] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:25.864] [renderer1] [error] Error received from starting extension host (kind: Remote)
[2021-12-10 20:44:25.865] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)
[2021-12-10 20:44:27.660] [renderer1] [error] Error: WebSocket close with status code 1006
    at WebSocket.<anonymous> (vscode-file://vscode-app/c:/Users/Ancient/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:583:36456)

@aeschli
Copy link
Contributor

aeschli commented Dec 10, 2021

In the remote menu (lower left corner), click and run the Show Log command.

@PixeledCode
Copy link
Author

PixeledCode commented Dec 10, 2021

In the remote menu (lower left corner), click and run the Show Log command.

@aeschli

a2b88f7557e0a43fec75b6ba7e50b3e9f77e ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-12-10 16:29:33.364] Probing result: found
[2021-12-10 16:29:33.364] Server install found in WSL
[2021-12-10 16:29:33.366] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e stable .vscode-server 0  --disable-telemetry'
[2021-12-10 16:29:33.751] Setting up server environment: Looking for /home/ancient/.vscode-server/server-env-setup. Not found.
[2021-12-10 16:29:33.751] WSL version: 4.19.128-microsoft-standard Ubuntu
[2021-12-10 16:29:33.751] WSL2-shell-PID: 9206
[2021-12-10 16:29:33.751] Node executable: /home/ancient/.vscode-server/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e/node
[2021-12-10 16:29:33.751] Starting server: /home/ancient/.vscode-server/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e/server.sh  --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --print-ip-address --enable-remote-auto-shutdown   --disable-telemetry
[2021-12-10 16:29:33.751] 
[2021-12-10 16:29:33.751] 
[2021-12-10 16:29:33.751] *
[2021-12-10 16:29:33.751] * Visual Studio Code Server
[2021-12-10 16:29:33.751] *
[2021-12-10 16:29:33.751] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-10 16:29:33.751] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-10 16:29:33.751] *
[2021-12-10 16:29:33.751] 
[2021-12-10 16:29:33.751] IP Address: 172.21.190.110
[2021-12-10 16:29:33.751] Extension host agent listening on 33479
[2021-12-10 16:29:33.751] 
[2021-12-10 16:29:33.751] [21:59:33] Extension host agent started.
[2021-12-10 16:29:33.754] WSL resolver response: ::1:33479
[2021-12-10 16:29:33.754] To debug connection issues, open a local browser on http://[::1]:33479/version
[2021-12-10 16:29:33.754] Using 'localhost' to connect to the VS Code server as configured by setting 'remote.WSL1.connectionMethod'

@aeschli
Copy link
Contributor

aeschli commented Dec 10, 2021

Thanks I see the problem. We think you are on WSL1, but you are on WSL2.

On which Windows Version are you? (it should say at the beginning of the log)

@72nat
Copy link

72nat commented Dec 10, 2021

@aeschli Also encountered the same issue after updating VS code to the latest version.

Please see logs below:

[2021-12-10 16:59:52.200] Starting VS Code Server inside WSL (wsl1)
[2021-12-10 16:59:52.200] Extension version: 0.63.4
[2021-12-10 16:59:52.200] Windows build: 19042. Multi distro support: available. WSL path support: enabled
[2021-12-10 16:59:52.348] Using shell environment from invoking shell: /tmp/vscode-distro-env.PdsSyP
[2021-12-10 16:59:52.489] WSL daemon log file: 
[2021-12-10 16:59:52.491] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e sh -c "[ -d ~/.vscode-server/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-12-10 16:59:52.665] Probing result: found
[2021-12-10 16:59:52.665] Server install found in WSL
[2021-12-10 16:59:52.666] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e stable .vscode-server 0  '
[2021-12-10 16:59:52.800] Setting up server environment: Looking for /home/cenisar/.vscode-server/server-env-setup. Not found.
[2021-12-10 16:59:52.800] WSL version: 5.4.72-microsoft-standard-WSL2 Ubuntu
[2021-12-10 16:59:52.800] WSL2-shell-PID: 2560
[2021-12-10 16:59:52.800] Node executable: /home/cenisar/.vscode-server/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e/node
[2021-12-10 16:59:52.800] Starting server: /home/cenisar/.vscode-server/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e/server.sh  --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --print-ip-address --enable-remote-auto-shutdown   
[2021-12-10 16:59:53.100] 
[2021-12-10 16:59:53.100] 
[2021-12-10 16:59:53.100] *
[2021-12-10 16:59:53.100] * Visual Studio Code Server
[2021-12-10 16:59:53.100] *
[2021-12-10 16:59:53.100] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-10 16:59:53.100] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-10 16:59:53.100] *
[2021-12-10 16:59:53.100] 
[2021-12-10 16:59:53.100] IP Address: 172.23.227.85
[2021-12-10 16:59:53.100] Extension host agent listening on 43487
[2021-12-10 16:59:53.100] 
[2021-12-10 16:59:53.100] [00:59:52] Extension host agent started.
[2021-12-10 16:59:53.101] WSL resolver response: ::1:43487
[2021-12-10 16:59:53.101] To debug connection issues, open a local browser on http://[::1]:43487/version
[2021-12-10 16:59:53.101] Using 'localhost' to connect to the VS Code server as configured by setting 'remote.WSL1.connectionMethod'```

@aeschli
Copy link
Contributor

aeschli commented Dec 10, 2021

@cenisar-villanueva Can you paste me the output of wsl.exe --list --verbose ?

@aeschli
Copy link
Contributor

aeschli commented Dec 10, 2021

I made a new release of Remote-WSL (0.63.5) that hopefully fixed the issue.
Please make sure the extension is on the new version, close all remote windows and wait a few seconds before opening a remote window again.
If is still doesn't work, please paste me the full WSL log and the output of wsl.exe --list --verbose

@72nat
Copy link

72nat commented Dec 11, 2021

@aeschli It is now working.
Thanks for the quick fix.

@PixeledCode
Copy link
Author

I made a new release of Remote-WSL (0.63.5) that hopefully fixed the issue. Please make sure the extension is on the new version, close all remote windows and wait a few seconds before opening a remote window again. If is still doesn't work, please paste me the full WSL log and the output of wsl.exe --list --verbose

you are a lifesaver. It's working perfectly fine now.

@PixeledCode
Copy link
Author

closing because it's fixed by Remote-WSL (0.63.5) extension

@Bentzeh
Copy link

Bentzeh commented Dec 14, 2021

I made a new release of Remote-WSL (0.63.5) that hopefully fixed the issue. Please make sure the extension is on the new version, close all remote windows and wait a few seconds before opening a remote window again. If is still doesn't work, please paste me the full WSL log and the output of wsl.exe --list --verbose

@aeschli
Hi I've just updated docker desktop and vscode
and I'm getting
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)

not sure what is the WSL log but here is the content of show log as explained above
the first time I've got:

[2021-12-14 21:37:54.132] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-12-14 21:37:54.166] Starting VS Code Server inside WSL (wsl2)
[2021-12-14 21:37:54.166] Extension version: 0.63.11
[2021-12-14 21:37:54.166] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2021-12-14 21:37:54.242] Using shell environment from invoking shell: /tmp/vscode-distro-env.fFsPqO
[2021-12-14 21:37:54.387] Connecting to daemon started by other Remote-WSL window... 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-14 21:37:54.387] WSL resolver response: 127.0.0.1:62295
[2021-12-14 21:37:54.387] To debug connection issues, open a local browser on http://127.0.0.1:62295/version
[2021-12-14 21:37:54.387] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-14 21:37:54.387] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-14 21:37:54.387] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-14 21:37:54.387] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

the second time I've run the commend I got

vironment: Looking for /home/bentz/.vscode-server/server-env-setup. Not found.
[2021-12-14 21:37:52.946] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-14 21:37:52.946] WSL-shell-PID: 540
[2021-12-14 21:37:52.946] Node executable: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-14 21:37:52.946] Starting server: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret= --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] * Visual Studio Code Server
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-14 21:37:52.946] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] Extension host agent listening on 38115
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] [23:37:52] Extension host agent started.
[2021-12-14 21:37:52.955] Started local proxy server on 62295.
[2021-12-14 21:37:52.955] WSL resolver response: 127.0.0.1:62295
[2021-12-14 21:37:52.955] To debug connection issues, open a local browser on http://127.0.0.1:62295/version
[2021-12-14 21:37:52.955] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-14 21:37:52.955] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-14 21:37:52.955] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-14 21:37:52.955] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

and the content of wsl.exe --list --verbose

NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

@aeschli
Copy link
Contributor

aeschli commented Dec 15, 2021

@Bentzeh I created #6067 as this is related to the new release 0.63.11.
I see a problem in the log, but the start of the log is missing which would be interesting to see.
Can you provide the full log in #6067?

@pvettori
Copy link

Completely unable to connect to WSL2 after today's VSCode last update.
Remote - WSL v0.63.11

I have already tried every possible configuration for "remote.WSL2.connectionMethod" bot nothing works.
This is totally blocking my work. Please help!

021-12-15 11:48:40.231] Probing result: found
[2021-12-15 11:48:40.231] Server install found in WSL
[2021-12-15 11:48:40.232] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" fe719cd3e5825bf14e14182fddeb88ee8daf044f stable .vscode-server 870037731136 --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression'
[2021-12-15 11:48:40.373] Setting up server environment: Looking for /home/******/.vscode-server/server-env-setup. Not found.
[2021-12-15 11:48:40.373] WSL version: 5.4.72-microsoft-standard-WSL2 Ubuntu
[2021-12-15 11:48:40.373] WSL-shell-PID: 238
[2021-12-15 11:48:40.373] Node executable: /home/******/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-15 11:48:40.373] Starting server: /home/******/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/******/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-238-1639568919.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression
[2021-12-15 11:48:40.673] 
[2021-12-15 11:48:40.673] 
[2021-12-15 11:48:40.673] *
[2021-12-15 11:48:40.673] * Visual Studio Code Server
[2021-12-15 11:48:40.673] *
[2021-12-15 11:48:40.673] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-15 11:48:40.673] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-15 11:48:40.673] *
[2021-12-15 11:48:40.673] 
[2021-12-15 11:48:40.673] Extension host agent listening on 40777
[2021-12-15 11:48:40.673] 
[2021-12-15 11:48:40.673] [12:48:39] Extension host agent started.
[2021-12-15 11:48:40.674] WSL resolver response: ::1:40777
[2021-12-15 11:48:40.674] To debug connection issues, open a local browser on http://[::1]:40777/version
[2021-12-15 11:48:40.674] Using 'localhost' to connect to the VS Code server as configured by setting 'remote.WSL1.connectionMethod'

@m1kaj
Copy link

m1kaj commented Dec 15, 2021

@pvettori I had the same situation after an update today. Could not get Remote - WSL v0.63.11 to connect to my project in WSL2. However, I could revert by viewing the extension details. Then clicking the down arrow icon in the uninstall button --> "Install Another Version..". And going back to v0.63.5.

@aeschli
Copy link
Contributor

aeschli commented Dec 15, 2021

Please try the latest version of the Remote-WSL extension (0.63.13). It contains fixes to two issues we found.

@m1kaj
Copy link

m1kaj commented Dec 16, 2021

Updated to Remote-WSL extension 0.63.13. It fixed my issue. Thank you @aeschli !

@pvettori
Copy link

pvettori commented Dec 16, 2021

@aeschli The new update 0.63.13 does not work for me unfortunately.

As a side note: 0.63.5 seemed to work intermittently as I had to perform wsl --shutdown before starting a new session, the new version 0.63.13 seems to have the same problem.

@aeschli
Copy link
Contributor

aeschli commented Dec 16, 2021

@pvettori Can you open a new issue and include the full WSL log? Thanks a lot!

@skworden
Copy link

skworden commented Jan 28, 2022

My workaround and observations

I had this issue, too - I had to increase the allotted amount of RAM for WSL - mine was the default settings - I set mine to 8GB, and it's started without a folder open. I've seen someone else say 5GB worked too. You might need to run wsl --shutdown from CMD after adding the new setting. https://docs.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconfig-file


The next problem is how you open a folder - you cannot simply open it in WSL.

You must first open a WSL window. Then file > open folder. You cannot use the show local button - it will disconnect from your distro instance. You must navigate to the folder using the text box and dropdown.

Note - I also tried restarting my PC, updating everything, and reinstalling VSCode and removing all of its local data.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

7 participants