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

WSL2 devcontainer on windows host wslpath -w vs -u #9891

Closed
kdarby-cqg opened this issue May 16, 2024 · 7 comments
Closed

WSL2 devcontainer on windows host wslpath -w vs -u #9891

kdarby-cqg opened this issue May 16, 2024 · 7 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@kdarby-cqg
Copy link

"same here, rolled back and it now works..."

Originally posted by @tukutela in #9064 (comment)

This issue seems not to be resolved in later version, a rollback to Dev Containers 0.309.0 is still necessary. Am I missing something?

@vscodenpa vscodenpa added the containers Issue in vscode-remote containers label May 16, 2024
@chrmarti
Copy link
Contributor

Make sure you are using the latest versions of VS Code and the Remote-SSH and Dev Containers extensions.

If it still doesn't work, please append the Dev Containers log from when this happens. (F1 > Dev Containers: Show Container Log)

@chrmarti chrmarti added the info-needed Issue requires more information from poster label May 17, 2024
@WillPresley
Copy link

For what it's worth, I am setting up a relatively new machine, and having this exact issue. I setup Devcontainers on Windows 11 according to the documentation (Docker for Windows with WSL2 backend, 'Execute in WSL' enabled).

When I try to load a container, the path that is shown and fails is clearly a Windows-style one, and the command above it uses the -w flag. As soon as I rolled the Extension back to 0.309.0 and reloaded things, the pathing issue was fixed and the container spun up perfectly.

I can try to dig in and provide better logs later, I just needed to get this working as quickly as possible, and the extension downgrade did it!

@kdarby-cqg
Copy link
Author

Here's the relevant piece

[3394 ms] Start: Run in Host: wslpath -w c:/code/cqg/bts/spark_sdk_sample [3617 ms] Command failed: ls -a c:/code/cqg/bts/spark_sdk_sample [3617 ms] ls: cannot access 'c:/code/cqg/bts/spark_sdk_sample': No such file or directory [3617 ms] Exit code 2

Here's the full log

[314 ms] Dev Containers 0.362.0 in VS Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685).
[313 ms] Start: Run: wsl -d Ubuntu-20.04 -e wslpath -u c:\code\cqg\bts\spark_sdk_sample
[1034 ms] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c cd '/mnt/c/code/cqg/bts/spark_sdk_sample' && /bin/sh
[1073 ms] Start: Run in host: id -un
[1192 ms] darby
[1192 ms]
[1193 ms] Start: Run in host: (command -v getent >/dev/null 2>&1 && getent passwd 'darby' || grep -E '^darby|^[^:]:[^:]:darby:' /etc/passwd || true)
[1195 ms] Start: Run in host: echo ~
[1196 ms] /home/darby
[1196 ms]
[1197 ms] Start: Run in host: test -f '/home/darby/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/node'
[1198 ms]
[1198 ms]
[1198 ms] Exit code 1
[1199 ms] Start: Run in host: test -f '/home/darby/.vscode/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/node'
[1200 ms]
[1200 ms]
[1200 ms] Exit code 1
[1201 ms] Start: Run in host: test -f '/home/darby/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node'
[1202 ms]
[1202 ms]
[1202 ms] Exit code 1
[1202 ms] Start: Run in host: test -f '/home/darby/.vscode-remote-containers/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node'
[1203 ms]
[1204 ms]
[1204 ms] Start: Run in host: test -f '/home/darby/.vscode-remote-containers/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node_modules/node-pty/package.json'
[1206 ms]
[1206 ms]
[1207 ms] Start: Run in host: test -f '/home/darby/.vscode-remote-containers/dist/vscode-remote-containers-server-0.362.0.js'
[1208 ms]
[1208 ms]
[1209 ms] userEnvProbe: loginInteractiveShell (default)
[1209 ms] userEnvProbe: not found in cache
[1209 ms] userEnvProbe shell: /bin/bash
[1760 ms] userEnvProbe PATHs:
Probe: '/home/darby/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/VC/VCPackages:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/MSBuild/Current/bin/Roslyn:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Team Tools/Performance Tools:/mnt/c/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/:/mnt/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools:/mnt/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x86:/mnt/c/Program Files (x86)/Windows Kits/10/bin/x86:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/MSBuild/Current/Bin/amd64:/mnt/c/Windows/Microsoft.NET/Framework/v4.0.30319:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/Tools/:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/libnvvp:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/mnt/c/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/MSBuild/Current/Bin:/mnt/c/Python38/Scripts/:/mnt/c/Python38/:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/WINDOWS/system32:/mnt/c/Program Files/Git/usr/bin:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/PuTTY/:/mnt/c/code/cqg/bts/spark/tools:/mnt/c/Program Files/Microsoft VS Code Insiders/bin:/mnt/c/Program Files/Amazon/AWSCLIV2/:/mnt/c/Program Files/TortoiseHg/:/mnt/c/Program Files/LLVM/bin:/mnt/c/Program Files (x86)/Common Files/Intuit/QBPOSSDKRuntime:/mnt/c/Program Files (x86)/Plantronics/Spokes3G/:/mnt/c/code/lurium/quick/tools:/mnt/c/code/lurium/quick/tools/ant/apache-ant-1.9.15/bin:/mnt/c/Program Files (x86)/dotnet/:/mnt/c/Program Files/gevorkyan.org/MicroProfiler/:/mnt/c/Program Files (x86)/HP/HP OCR/DB_Lib/:/mnt/c/Program Files/HP/Common/HPDestPlgIn/:/mnt/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/Wasmtime/bin:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2022.3.0/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/Kevin/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Kevin/.dotnet/tools:/mnt/c/Users/Kevin/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/Java/jdk1.8.0_291/bin:/mnt/c/Users/Kevin/.dotnet/tools:/mnt/c/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x64:/mnt/c/program files (x86)/microsoft visual studio/2017/professional/common7/ide/extensions/microprofiler:/mnt/c/Program Files/HP/Common/HPDestPlgIn/:/mnt/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/mnt/c/Users/Kevin/AppData/Roaming/npm:/mnt/c/Program Files/Wasmtime/bin:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/Llvm/bin:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/VC/Linux/bin/ConnectionManagerExe:/snap/bin:/home/darby/.dotnet/tools'
Container: None
[1793 ms] Initializing configuration support...
[1794 ms] Internal initialization of dev container support package...
[3372 ms] Start: Run in Host: docker version --format {{json .}}
[3391 ms] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"26.1.2","ApiVersion":"1.45","DefaultAPIVersion":"1.45","GitCommit":"211e74b","GoVersion":"go1.21.10","Os":"linux","Arch":"amd64","BuildTime":"Wed May 8 13:59:58 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"26.1.2","Details":{"ApiVersion":"1.45","Arch":"amd64","BuildTime":"Wed May 8 13:59:58 2024","Experimental":"false","GitCommit":"ef1912d","GoVersion":"go1.21.10","KernelVersion":"5.15.146.1-microsoft-standard-WSL2","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"1.6.31","Details":{"GitCommit":"e377cd56a71523140ca6ae87e30244719194a521"}},{"Name":"runc","Version":"1.1.12","Details":{"GitCommit":"v1.1.12-0-g51d5e94"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"26.1.2","ApiVersion":"1.45","MinAPIVersion":"1.24","GitCommit":"ef1912d","GoVersion":"go1.21.10","Os":"linux","Arch":"amd64","KernelVersion":"5.15.146.1-microsoft-standard-WSL2","BuildTime":"2024-05-08T13:59:58.000000000+00:00"}}
[3394 ms] Start: Run in Host: wslpath -w c:/code/cqg/bts/spark_sdk_sample
[3617 ms] Command failed: ls -a c:/code/cqg/bts/spark_sdk_sample
[3617 ms] ls: cannot access 'c:/code/cqg/bts/spark_sdk_sample': No such file or directory
[3617 ms] Exit code 2

@kdarby-cqg
Copy link
Author

Hi @chrmarti do you need any other info here?

Thanks!

@chrmarti
Copy link
Contributor

@kdarby-cqg Could you share your devcontainer.json and user settings JSON? Are you starting from a local window open on c:\code\cqg\bts\spark_sdk_sample?

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@kdarby-cqg
Copy link
Author

Hi @chrmarti I am starting vscode from c:\code\cqg\bts\spark_sdk_sample I attached the devcontainer.json

devcontainer.json

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants