legrego / homeassistant-elasticsearch

Publish Home-Assistant events to Elasticsearch
https://legrego.github.io/homeassistant-elasticsearch/
MIT License
145 stars 38 forks source link

Dev Container fails to open with WSL on Windows #218

Closed strawgate closed 2 months ago

strawgate commented 2 months ago

When opening VS Code it offers to open the folder in a dev container. Confirming causes the following error:

image

Opening a container after the fact using the remote explorer works just fine.

[62 ms] Dev Containers 0.348.0 in VS Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6).
[61 ms] Start: Run: wsl -l -v
[192 ms] Start: Run: wsl -d Ubuntu -e wslpath -u c:\Users\willi\Github\homeassistant-elasticsearch
[364 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c cd '/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/b142b52a980815c8c4811bf60a8ca72dc6e92416a3a1bd90f8ae979e4d121e66' && /bin/sh
[369 ms] Start: Run in host: id -un
[446 ms] weaston
[446 ms] 
[446 ms] Start: Run in host:  (command -v getent >/dev/null 2>&1 && getent passwd 'weaston' || grep -E '^weaston|^[^:]*:[^:]*:weaston:' /etc/passwd || true)
[447 ms] Start: Run in host: echo ~
[448 ms] /home/weaston
[448 ms] 
[448 ms] Start: Run in host: test -x '/home/weaston/.vscode-remote-containers/bin/863d2581ecda6849923a2118d93a088b0745d9d6/node'
[449 ms] 
[449 ms] 
[449 ms] Start: Run in host: test -f '/home/weaston/.vscode-remote-containers/dist/vscode-remote-containers-server-0.348.0.js'
[449 ms] 
[449 ms] 
[451 ms] userEnvProbe: loginInteractiveShell (default)
[452 ms] userEnvProbe: not found in cache
[452 ms] userEnvProbe shell: /bin/bash
[513 ms] userEnvProbe PATHs:
Probe:     '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Go/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PowerShell/7/:/Docker/host/bin:/mnt/c/Users/willi/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/willi/.dotnet/tools:/mnt/c/Users/willi/AppData/Local/GitHubDesktop/bin:/mnt/c/ProgramData/willi/GitHubDesktop/bin:/mnt/c/Users/willi/go/bin:/snap/bin'
Container: None
[9681 ms] Start: Run in Host: docker version --format {{json .}}
[9718 ms] {"Client":{"CloudIntegration":"v1.0.35+desktop.11","Version":"25.0.3","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"4debf41","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","BuildTime":"Tue Feb  6 21:13:00 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Desktop"},"Components":[{"Name":"Engine","Version":"25.0.3","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Tue Feb  6 21:14:25 2024","Experimental":"false","GitCommit":"f417435","GoVersion":"go1.21.6","KernelVersion":"5.15.133.1-microsoft-standard-WSL2","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"1.6.28","Details":{"GitCommit":"ae07eda36dd25f8a1b98dfbf587313b99c0190bb"}},{"Name":"runc","Version":"1.1.12","Details":{"GitCommit":"v1.1.12-0-g51d5e94"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"25.0.3","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"f417435","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","KernelVersion":"5.15.133.1-microsoft-standard-WSL2","BuildTime":"2024-02-06T21:14:25.000000000+00:00"}}
[9721 ms] Start: Run in Host: wslpath -w c:/Users/willi/Github/homeassistant-elasticsearch
[9933 ms] Command failed: ls -a c:/Users/willi/Github/homeassistant-elasticsearch
[9934 ms] ls: cannot access 'c:/Users/willi/Github/homeassistant-elasticsearch': No such file or directory
[9934 ms] Exit code 2
strawgate commented 2 months ago

Seems related to https://github.com/microsoft/vscode-remote-release/issues/9357

This also happens on win11 and wsl2 and 0.349.0. Rollback to 0.309.0 fixed it.

Rolling back to 0.309.0 fixed this issue for me but now im running into another issue

strawgate commented 2 months ago

Looks good now so far