Open jmservier opened 7 months ago
I tried also to install code-server into the directory expected by VSCode, as below, but it seems that some parameters is not used or new
WSL side
$ mkdir ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533
$ curl -Lo/tmp/code-server-4.21.1.tar.gz https://github.com/coder/code-server/releases/download/v4.21.1/code-server-4.21.1-linux-amd64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 87.8M 100 87.8M 0 0 31.3M 0 0:00:02 0:00:02 --:--:-- 42.3M
$ tar xf /tmp/code-server-4.21.1.tar.gz -C ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533/ --strip-components=1
Windows Side through VScode when clicking on connect to:
...
[2024-02-12 09:56:02.550] Starting server: ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533/bin/code-server --host=127.0.0.1 --port=0 --connection-token=1347923089-2537403701-3775612449-1797309535 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all
[2024-02-12 09:56:02.896] [2024-02-11T21:26:45.491Z] error Unknown option --connection-token=1347923089-2537403701-3775612449-1797309535
I was reproducing 2 min ago and now it works. Temp issue ?
I still have the issue. As workaround I solved like this:
connect to Distro
the install scripts is launched and failed as described
$ tar xf ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533-1707687953.tar.gz
gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now
3. check that the archive is extracted
$ [[ -d vscode-server-linux-x64 ]] && echo 'Succesfully extracted' || echo 'Error extraction failed' >2
4. move and rename the `vscode-server-linux-x64` directory at expected location
mv vscode-server-linux-x64/ ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533
5. Now connection will works from VSCode side
I had a similar issue along the lines of ~/.vscode-server/bin/<version>/code-server
not found. I ended up deleting ~/.vscode-server/bin
, and next time I tried to connect to WSL from vscode, it downloaded vscode-server again and worked.
Same issue as #1856
Once WSL extensions is installed, and click on connect to Distro, VScode on widows side detect that code-server is not present at
~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533
and then download the archive file. But this archive is corrupted for an unknown reasonI get this logs:
Into WSL distro here Ubuntu 22.04, I can see that the archive is corrupted
So I tried to install vscode directly into WSL using official documentation: https://github.com/coder/code-server
We can see that the tool is installed and functional, but as VScode (windows side) do not search code-server in $PATH but into
~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533-1707683903
it continue to download the corrupted archive fileIndeed into VSCode log we can see the line
Probing if server is already installed: if [ -d ~/.vscode-server/bin/31c37ee8f63491495ac49e43b8544550fbae4533 ]; then printf 'install-found '; fi