Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode remote server.sh not finding node in wsl docker-desktop

I have:

VSCode v1.46.0

remote-wsl extension v0.44.3

Windows 10 OS build 19041.329

Docker Desktop v2.3.0.3

I am trying to open VSCode within the docker-desktop wsl and I get the below error every time. I have gone to the directory listed and see the node file I am not sure what to do?

[2020-06-17 20:30:27.337] Resolving wsl+docker-desktop, resolveAttempt: 1
[2020-06-17 20:30:27.462] Starting VS Code Server inside WSL (docker-desktop)
[2020-06-17 20:30:27.463] Extension version: 0.44.3, Windows build: 19041. Multi distro support: available. WSL path support: enabled
[2020-06-17 20:30:27.751] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d docker-desktop -e sh -c "[ -d ~/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2020-06-17 20:30:28.100] Probing result: found
[2020-06-17 20:30:28.100] Server install found in WSL
[2020-06-17 20:30:28.101] Launching C:\WINDOWS\System32\wsl.exe -d docker-desktop sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" a5d1cc28bb5da32ec67e86cc50f84c67cc690321 stable .vscode-server 0  ' in c:\Users\Eric\.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.3}
[2020-06-17 20:30:28.345] Setting up server environment: Looking for /root/.vscode-server/server-env-setup. Not found.
[2020-06-17 20:30:28.345] WSL version: 4.19.104-microsoft-standard docker-desktop
[2020-06-17 20:30:28.345] WSL2-shell-PID: 1036
[2020-06-17 20:30:28.345] Starting server: /root/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/server.sh  --port=0 --use-host-proxy --enable-remote-auto-shutdown 
[2020-06-17 20:30:28.347] /root/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/server.sh: line 12: /root/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/node: not found
[2020-06-17 20:30:28.347] VS Code Server for WSL closed unexpectedly.
[2020-06-17 20:30:28.347] For help with startup problems, go to
[2020-06-17 20:30:28.347] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2020-06-17 20:30:29.404] WSL Daemon exited with code 0
like image 785
ericv Avatar asked Dec 23 '22 17:12

ericv


1 Answers

Had a very similar problem today. VScode been working for a long time and stopped today suddenly.

/home/user/.vscode-server/bin/b5afea7e86cc50f84c67cc690321/server.sh --port=0 --use-host-proxy --enable-remote-auto-shutdown
VS Code Server for WSL closed unexpectedly

In WSL console, the server.sh is empty somehow.
My resolution: Remove WSL extension. rm -rf ./vscode-server. Reinstall WSL extension to reconstruct the corrupted file.

like image 97
Kai Zhang Avatar answered Dec 30 '22 19:12

Kai Zhang