CLI hanging forever in WSL
For some reason, the devcontainer cli only works when called from the context of a windows path. When called from home ~, it hangs forever. This was however working just fine before yesterday, no idea what triggered it..
devcontainer 0.40.0 WSL2 / Windows 10 (KB5025367)
I've tried rebooting, wsl --shutdown, updating vscode, wiping ms-vscode-remote.remote-containers folder and reinstalling, resetting the path, I'm out of ideas.
It only hangs when you are in your home folder? I guess there is something in that folder that makes it hang? Does it hang when you are in a subfolder of your home folder?
I hangs in every folder that does not start with /mnt/c. I've tried calling it from a fresh folder too in the root (/test) and it hangs too. which always point to the same path, so I'm really puzzled.. I am starting to think the recent windows update is the culprit, is there a way to run devcontainer in debug mode to see what line is causing the "hanging"?
I have exactly the same issue. It only runs from /mnt/c/ and hangs from anywhere else inside the WSL2 file system.
I am hitting the same issue as well. I saw in a previous issue from 2022 (https://github.com/microsoft/vscode-remote-release/issues/5957) that there was a way to install the devcontainer client in WSL2 specifically, but I haven't been able to see how to do that.
Could you check if you also see this with the Dev Containers extension 0.288.2 (the previous stable version)?
I didn't see an option for 0.288.2, just 0.288.1. However, it did mostly get rid of the issue. It still seems to hang after finishing whatever I asked it to do ... e.g., "devcontainer --version" prints out 0.35.0, but then it just sits until I do ^C. devcontainer open . is still not working for me on this version either.
I'm facing the same issue, here is the trace log from running devcontainers apply.
I am using the azure container registry (in case that makes a difference).
Interestingly it does appear to apply the template okay, as the files have been created.
devcontainer --version also hangs after showing the version.
devcontainer --version Checking for Dev Containers CLI Checking for Dev Containers CLI 0.79.0
devcontainer templates apply -t 'XXXX/devcontainers/templates/XXXX:0.0.8' -a '{"XXXX": "0-9.0-noble"}' --log-level trace
Checking for Dev Containers CLI
Checking for Dev Containers CLI
[2025-07-22T14:01:32.732Z] @devcontainers/cli 0.79.0. Node.js v22.15.1. linux 6.6.87.2-microsoft-standard-WSL2 x64.
[2025-07-22T14:01:32.732Z] > input: XXXX/devcontainers/templates/XXXX:0.0.8
[2025-07-22T14:01:32.733Z] >
[2025-07-22T14:01:32.733Z] > resource: XXXX/devcontainers/templates/XXXX
[2025-07-22T14:01:32.733Z] > id: XXXX
[2025-07-22T14:01:32.733Z] > owner: XXXX
[2025-07-22T14:01:32.733Z] > namespace: XXXX/devcontainers/templates
[2025-07-22T14:01:32.733Z] > registry: XXXX
[2025-07-22T14:01:32.733Z] > path: XXXX/devcontainers/templates/gluon
[2025-07-22T14:01:32.733Z] >
[2025-07-22T14:01:32.733Z] > version: 0.0.8
[2025-07-22T14:01:32.733Z] > tag?: 0.0.8
[2025-07-22T14:01:32.733Z] > digest?: undefined
[2025-07-22T14:01:32.733Z] > input: XXXX/devcontainers/templates/gluon:0.0.8
[2025-07-22T14:01:32.733Z] >
[2025-07-22T14:01:32.733Z] > resource: XXXX/devcontainers/templates/gluon
[2025-07-22T14:01:32.733Z] > id: XXXX
[2025-07-22T14:01:32.733Z] > owner: XXXX
[2025-07-22T14:01:32.733Z] > namespace: XXXX/devcontainers/templates
[2025-07-22T14:01:32.733Z] > registry: XXXX
[2025-07-22T14:01:32.733Z] > path: XXXX/devcontainers/templates/gluon
[2025-07-22T14:01:32.733Z] >
[2025-07-22T14:01:32.733Z] > version: 0.0.8
[2025-07-22T14:01:32.733Z] > tag?: 0.0.8
[2025-07-22T14:01:32.733Z] > digest?: undefined
[2025-07-22T14:01:32.733Z] manifest url: https://XXXX/devcontainers/templates/gluon/manifests/0.0.8
[2025-07-22T14:01:32.886Z] [httpOci] Attempting to authenticate via 'Bearer' auth.
[2025-07-22T14:01:32.889Z] [httpOci] Invoking credsStore credential helper 'desktop.exe'
[2025-07-22T14:01:32.890Z] Start: Run: docker-credential-desktop.exe get
[2025-07-22T14:01:32.969Z] Stop (79 ms): Run: docker-credential-desktop.exe get
[2025-07-22T14:01:32.970Z] [httpOci] Attempting to fetch bearer token from: https://XXXX/oauth2/token
[2025-07-22T14:01:33.283Z] [httpOci] 200 on reattempt after auth: https://XXXX/v2/integrations/devcontainers/templates/gluon/manifests/0.0.8
[2025-07-22T14:01:33.283Z] blob url: https://XXXX/v2/XXXX/devcontainers/templates/XXXX/blobs/sha256:350fc0d1a4c55619c824578a5171de0108190ae90526a2bbd9f0bcd2c465b6f3
[2025-07-22T14:01:33.293Z] [httpOci] Applying cachedAuthHeader for registry crpis03.azurecr.io...
[2025-07-22T14:01:33.536Z] [httpOci] 200 (Cached): https://XXXX/v2/XXXX/devcontainers/templates/XXXX/blobs/sha256:350fc0d1a4c55619c824578a5171de0108190ae90526a2bbd9f0bcd2c465b6f3
[2025-07-22T14:01:33.537Z] omitDuringExtraction: 'devcontainer-template.json, README.md, NOTES.md
[2025-07-22T14:01:33.537Z] Files to omit: 'devcontainer-template.json, README.md, NOTES.md'
[2025-07-22T14:01:33.539Z] Testing './'(Directory)
[2025-07-22T14:01:33.540Z] Testing './.devcontainer/'(Directory)
[2025-07-22T14:01:33.540Z] Testing './.editorconfig'(File)
[2025-07-22T14:01:33.540Z] Testing './.gitattributes'(File)
[2025-07-22T14:01:33.540Z] Testing './.prettierrc'(File)
[2025-07-22T14:01:33.540Z] Testing './devcontainer-template.json'(File)
[2025-07-22T14:01:33.540Z] Omitting './devcontainer-template.json'
[2025-07-22T14:01:33.541Z] Testing './test-project/'(Directory)
[2025-07-22T14:01:33.541Z] Testing './.devcontainer/devcontainer.json'(File)
[2025-07-22T14:01:33.541Z] Testing './.devcontainer/docker-compose.yml'(File)
[2025-07-22T14:01:33.541Z] Testing './.devcontainer/onCreate.sh'(File)
[2025-07-22T14:01:33.541Z] Testing './.devcontainer/setupInstructions.sh'(File)
[2025-07-22T14:01:33.546Z] Files extracted from blob: ./.editorconfig, ./.gitattributes, ./.prettierrc, ./.devcontainer/devcontainer.json, ./.devcontainer/docker-compose.yml, ./.devcontainer/onCreate.sh, ./.devcontainer/setupInstructions.sh
[2025-07-22T14:01:33.547Z] Found metadata file 'devcontainer-template.json' in blob
[2025-07-22T14:01:33.548Z] Scanning file './.editorconfig'
[2025-07-22T14:01:33.550Z] Scanning file './.gitattributes'
[2025-07-22T14:01:33.551Z] Scanning file './.prettierrc'
[2025-07-22T14:01:33.551Z] Scanning file './.devcontainer/devcontainer.json'
[2025-07-22T14:01:33.552Z] Scanning file './.devcontainer/docker-compose.yml'
[2025-07-22T14:01:33.552Z] Replacing XXXX with 0-9.0-noble
[2025-07-22T14:01:33.553Z] Scanning file './.devcontainer/onCreate.sh'
[2025-07-22T14:01:33.554Z] Scanning file './.devcontainer/setupInstructions.sh'
{"files":["./.editorconfig","./.gitattributes","./.prettierrc","./.devcontainer/devcontainer.json","./.devcontainer/docker-compose.yml","./.devcontainer/onCreate.sh","./.devcontainer/setupInstructions.sh"]}