WSL 3.0.3: Docker dev containers no longer open from WSL (spawn EPERM, WindowsApps folder added to PATH)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp, docker, vscode
- Domain
- operating-systems
Research direction
Start by comparing how WSL 3.0.1 and 3.0.3 construct the PATH passed to Windows processes; the report identifies the WSL package folder as the unexpected entry. Reproduce with cmd.exe /c set from Ubuntu and compare it with PowerShell. Done when Windows programs launched from WSL receive the expected PATH and the Dev Containers repro no longer fails with spawn EPERM.
Written by the indexing model from the issue text.
Description
Windows Version
Microsoft Windows [Version 10.0.19045.6466]
WSL Version
WSL version: 3.0.3.0
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
- WSL 1
- WSLC
Kernel Version
No response
Distro Version
Ubuntu 20.04.3 LTS
Other Software
- WSL: 3.0.3.0 broken, 3.0.1.0 works
- VS Code 1.108.0, Dev Containers extension 0.469.0, Docker Desktop
Repro Steps
STEPS TO REPRODUCE
- Install WSL 3.0.3 (in my case via a Microsoft Store auto-update).
- From an Ubuntu shell, run: cmd.exe /c set | grep -i windowsapps
- Compare with "cmd /c set" run from PowerShell.
Expected Behavior
The Path seen by Windows processes started from WSL is the same as the user's normal Windows Path, as on 3.0.1, with no WindowsApps WSL package folder added.
Actual Behavior
Since WSL updated itself from 3.0.1 to 3.0.3 through the Microsoft Store, no Docker dev container opens from WSL. VS Code connects to WSL but never attaches to the container, and the Dev Containers extension fails with "Error: spawn EPERM". Every container on the machine fails the same way. Opening the same folder from PowerShell still works, and rolling back to WSL 3.0.1 fixes it.
Cause: on 3.0.3, every Windows program started from WSL gets WSL's own package folder at the front of its PATH:
C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_3.0.3.0_x64__8wekyb3d8bbwe
"code ." passes that PATH to VS Code. The Dev Containers extension then finds wsl.exe in that WindowsApps folder first, and Windows refuses to start a program from WindowsApps directly, so it fails with EPERM. Programs started from PowerShell or Explorer do not get this PATH entry.
To reproduce on 3.0.3:
- In Ubuntu, run: cmd.exe /c set | grep -i windowsapps (shows the WSL package folder in Path)
- In PowerShell, run: cmd /c set | findstr /i windowsapps (does not show it)
- In Ubuntu, run "code ." in any folder with a dev container: it fails with spawn EPERM.
Diagnostic Logs
(I can take more diagnostic logs as needed)
- Dominant language
- C++
- Stars
- 34.4k
- Forks
- 1.9k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 166
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/WSL
-
feature wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/WSL#42306 · 3 comments ·
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/WSL#42114 · 3 comments ·
Maintainers usually reply within 1 day
-
feature kernel wsl2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/WSL#41107 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
feature kernel
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/WSL#41054 · 9 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
feature GPU
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
microsoft/WSL#13592 · 4 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nextcloud/passman-android#214 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64May be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 87/100
esphome/esphome#22892 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day
-
arch-based hyprland
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
noctalia-dev/noctalia#5423 ·
Maintainers usually reply within 1 day