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.65k stars 285 forks source link

Cannot start a dev container when connected to WSL2 through VSCode Tunnels #9296

Open a-gn opened 10 months ago

a-gn commented 10 months ago

In the Dev Containers log:

[2680055 ms] Start: Run: wsl -d Ubuntu@tunnel+pc -e /bin/sh -c cd '/home/me/project/src' && /bin/sh
[2680057 ms] Start: Run in host: id -un

In the dev console:

  ERR Shell server failed: Error: spawn wsl ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21): Error: Shell server failed: Error: spawn wsl ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at d.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:140441)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to Reproduce:

  1. Connect to a Windows computer through Tunnels.
  2. Connect to WSL2 on that machine with the Remote - WSL extension.
  3. Open a WSL2 folder that contains a .devcontainers configuration.
  4. Run the "Reopen in Container" command.

I expect that VSCode start building a dev container using my configuration and open the same folder in the container. Instead, nothing happens, I get no feedback besides the logs I posted above.

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

OneCyrus commented 10 months ago

just had the same issue. can confirm that it doesn't work here either.

nag92 commented 9 months ago

I have the same issue too

thisismygitrepo commented 9 months ago

same, W10, WSL(Ubuntu 20.04)

nag92 commented 9 months ago

I was able to solve the problem by deleting all the config files in the .vscode directory. factorying resetting Docker, reinstalling Ubuntu and not having the "Execute in WSL": selected

ArnoGW1 commented 4 months ago

Same issue in the same situation, but now I get this popup:

Command 'Dev Containers: Rebuild and Reopen in Container' resulted in an error

Shell server failed: Error: spawn wsl ENOENT at ChildProcess._handle.onexit (node:internal/child_process:286:19) at onErrorNT (node:internal/child_process:484:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

jgsqware commented 3 months ago

same here

lnguyen4 commented 2 months ago

Same issue in the same situation, but now I get this popup:

Command 'Dev Containers: Rebuild and Reopen in Container' resulted in an error

Shell server failed: Error: spawn wsl ENOENT at ChildProcess._handle.onexit (node:internal/child_process:286:19) at onErrorNT (node:internal/child_process:484:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

I got the exact same error. I am using local a Linux machine and tried to remote-tunnel to a remote WSL2 win11 desktop.