microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.66k stars 287 forks source link

WSL Extension v0.80.0 appears to break WSL connection on VSCode Insiders #8643

Closed cquick01 closed 1 year ago

cquick01 commented 1 year ago

WSL Extension v0.80.0 appears to break connection with WSL. I was working (connected to WSL from Windows) then all of a sudden VSCode froze and when attempting to reopen, a message popped up saying "Windows Subsystem for Linux not detected. The WSL extension requires Windows 10 with the Windows Subsystem for Linux feature installed.". I was already connected when it crashed, and WSL still works fine outside of VSCode.

Reverting back to WSL v0.79.5 gets things working again. Updating back to v0.80.0 causes it to fail. Rebooting does not help (which would have restarted WSL, per #8642). Edit: for completeness, also tried running wsl --shutdown as recommended in that issue, and restarting the WSL instance. Still fails with v0.80.0

wsl --version:

140:2023-06-26 16:05:24.126 [error] [LocalProcess0][resolveAuthority(wsl,1)][109650ms] returned an error {"code":"NotAvailable","message":"WSL not installed.","detail":true}
141:2023-06-26 16:05:24.127 [error] resolveAuthority(wsl) returned an error after 109650 ms WSL not installed.
143:2023-06-26 16:05:24.127 [error] CodeExpectedError: WSL not installed.
149:2023-06-26 16:05:24.128 [error] CodeExpectedError: WSL not installed.
155:2023-06-26 16:05:24.131 [error] CodeExpectedError: WSL not installed.
163:2023-06-26 16:05:24.250 [error] CodeExpectedError: WSL not installed.
169:2023-06-26 16:05:24.315 [error] CodeExpectedError: WSL not installed.
175:2023-06-26 16:05:24.316 [error] CodeExpectedError: WSL not installed.
180:2023-06-26 16:05:24.317 [error] CodeExpectedError: WSL not installed.
185:2023-06-26 16:05:24.317 [error] Cannot register remote filesystem provider. Error while fetching remote environment. WSL not installed.
186:2023-06-26 16:05:24.318 [error] CodeExpectedError: WSL not installed.
191:2023-06-26 16:05:24.318 [error] CodeExpectedError: WSL not installed.
196:2023-06-26 16:05:24.318 [error] CodeExpectedError: WSL not installed.
201:2023-06-26 16:05:24.319 [error] CodeExpectedError: WSL not installed.
206:2023-06-26 16:05:24.327 [error] CodeExpectedError: WSL not installed.
269:2023-06-26 16:05:24.389 [error] WSL not installed.: CodeExpectedError: WSL not installed.
280:2023-06-26 16:05:24.693 [error] WSL not installed.: CodeExpectedError: WSL not installed.
285:2023-06-26 16:05:24.848 [error] CodeExpectedError: WSL not installed.
290:2023-06-26 16:05:26.296 [error] WSL not installed.: CodeExpectedError: WSL not installed.
295:2023-06-26 16:09:01.827 [error] WSL not installed.: CodeExpectedError: WSL not installed.

But of course WSL is installed and actively running.

Can't really find anything else other than the error message: "Windows Subsystem for Linux not detected. The WSL extension requires Windows 10 with the Windows Subsystem for Linux feature installed."

Steps to Reproduce:

  1. Try connecting to WSL instance with WSL extension v0.80.0. see it fail to connect
  2. Revert to v0.79.5, works again.

Does this issue occur when you try this locally?: N/A Does this issue occur when you try this locally and all extensions are disabled?: N/A

Happy to provide more info if requested. Thanks!

ghost commented 1 year ago

Thanks for raising this issue! I arrived here via #8642 and likewise a WSL shutdown didn't help — reverting to 0.79.5 did.

phildaniels commented 1 year ago

I have a local fix you can do in the extension code itself, I think someone forgot to return here. It's all obfuscated code so unsure what some of this does exactly. The local fix will have to be applied after every update to the extension

image

chrmarti commented 1 year ago

This appears to be fixed in v0.80.2. Thanks. (https://github.com/microsoft/vscode-remote-wsl/pull/150)