[SOLVED]Dev Container: V0.34.5 Docker container startup issue in with WSL2

Issue Description

After updating Cursor to version “0.34.5”,
when trying to create a Docker container on WSL2 and connect from Cursor using Dev Container,
It remains on “Starting Dev Container” and does not proceed further.
We would appreciate your help in identifying this issue.

Connection Log

[22 ms] Dev Containers 0.327.0 in VS Code 1.89.1 (1aa253fa263df64530be0cab8b4e791d45a1a820).
[22 ms] Start: Resolving Remote
[22 ms] Setting up container: /container_name
[27 ms] Start: Run: docker inspect --type container /container_name
[132 ms] Start: Run: wsl -l -v
[168 ms] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c echo ~
[253 ms] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c cd '/home/user_name' && /bin/sh
[259 ms] Start: Run in host: id -un
[347 ms] user_name
[347 ms] Start: Run in host: (command -v getent >/dev/null 2>&1 and getent passwd 'user_name' or grep -E '^user_name|^[^:]*:[^:]*:user_name:' /etc/passwd or true)
[349 ms] Start: Run in host: echo ~
[349 ms] /home/user_name
[349 ms] Start: Run in host: test -x '/home/user_name/.vscode-remote-containers/bin/1aa253fa263df64530be0cab8b4e791d45a1a820/node'
[351 ms] Start: Run in host: test -f '/home/user_name/.vscode-remote-containers/dist/vscode-remote-containers-server-0.327.0.js'
[353 ms] userEnvProbe: loginInteractiveShell (default)
[353 ms] userEnvProbe: not found in cache
[353 ms] userEnvProbe shell: /bin/bash
[2357 ms] Start: Run in Host: /bin/sh
[10361 ms] userEnvProbe is taking longer than 10 seconds. Avoid waiting for user input in your shell's startup scripts. Continuing.

Environment

PC

  • WSL Version: 2.2.4.0
  • Kernel Version: 5.15.153.1-2
  • WSLg Version: 1.0.61
  • MSRDC Version: 1.2.5326
  • Direct3D Version: 1.611.1-81528511
  • DXCore Version: 10.0.26091.1-240325-1447.ge-release
  • Windows Version: 10.0.22635.3646
  • Docker version 26.1.1, build 4cf5afa

Cursor

  • Version: 0.34.5
  • VSCode Version: 1.89.1
  • Commit: 1aa253fa263df64530be0cab8b4e791d45a1a820
  • Date: 2024-06-02T18:36:22.954Z
  • Electron: 28.2.8
  • ElectronBuildId: undefined
  • Chromium: 120.0.6099.291
  • Node.js: 18.18.2
  • V8: 12.0.267.19-electron.0
  • OS: Windows_NT x64 10.0.22635

Sorry, I solved myself.
I checked the version of wsl,
There were two Linux distributions.

PS C:\Users\user_name> wsl --list --verbose
NAME STATE VERSION
Ubuntu Running 2
* Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2

”Ubuntu-20.04” was the default distribution.
I had no reason to, but I changed it to “Ubuntu” to try it out.

wsl --set-default Ubuntu

Then the problem was solved and I could successfully access inside the container with Dev Containers.

PS C:\Users\user_name> wsl --list --verbose
NAME STATE VERSION
* Ubuntu Running 2
Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-Data Running 2

I don’t know why I couldn’t access inside the container with “Ubuntu-20.04”,
When I accessed the container with Dev Containers on “Ubuntu”,
I saw the words “Install Server” for a moment.

With “Ubuntu-20.04”, it did not proceed to “Install Server”,
So it seems that the process stopped at some point before it got to that point.
If anyone else is having the same problem, please let me know,
If you are experiencing the same symptoms, please try changing the Linux distribution of WSL.

Thank you for your patience. Thanks again.