microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.83k stars 29.5k forks source link

[wsl] Use curl instead of wget to download VS Code server #221851

Open brettcannon opened 4 months ago

brettcannon commented 4 months ago

I use wcurl/curl and not wget, but VS Code requires I keep wget installed to install the VS Code server. I suspect curl is more widely installed than wget, so if it could use curl instead that would be nice.

roblourens commented 4 months ago

Is this Remote-SSH or another remote extension? SSH tries wget, and falls back to curl. Is it failing to fall back? Can you share the log?

brettcannon commented 4 months ago

It's WSL.

brettcannon commented 4 months ago
➲ code-insiders
Updating VS Code Server to version 50560b991207e2bb70a6e177f2c2e88949a01e6c
Removing previous installation...
ERROR: Failed to download the VS Code server. 'wget' not installed.
Please install wget:
Debian/Ubuntu: sudo apt-get install wget
vs-code-engineering[bot] commented 3 months ago

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!

enihcam commented 3 months ago

VSCode requires particular option of wget which is not available. We need support of attempting with multiple downloaders, or at least configurable.

[11:16:21.873] Platform: linux
[11:16:21.890] > /bin/bash
[11:16:21.890] Shell: bash
[11:16:21.890] Creating bash subshell inside "bash"
[11:16:21.906] > bash version:  4.2.46(1)-release-by_linux22_v1005
[11:16:21.926] > 64328aa73d74: running
[11:16:21.940] > Installing to /root/.vscode-server...
[11:16:21.944] > 64328aa73d74%%1%%
[11:16:21.947] > Downloading with wget
[11:16:21.951] > wget download failed
> wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wget --help' for more options.
wynnw commented 3 months ago

Looks like it works with wget v1.21.4, but not with wget 1.14 (those are the versions on ubuntu 24.04 vs amazonlinux2 respectively). One more way to try and kick us off the old platforms ! ;)

If I just delete wget from my system then vscode remote ssh startup works fine.

enihcam commented 3 months ago

If I just delete wget from my system then vscode remote ssh startup works fine.

vscode tries curl if wget is not found.

aeschli commented 3 months ago

Please note, this issue is about the WSL extension, not 'Remote SSH'. Please file a new issue if you have problems with wget or curl when opening a Remote SSH window.

aeschli commented 3 months ago

@brettcannon What distro are you using? Is it one from the Microsoft Store?

enihcam commented 3 months ago

Please note, this issue is about the WSL extension, not 'Remote SSH'. Please file a new issue if you have problems with wget or curl when opening a Remote SSH window.

@roblourens

brettcannon commented 3 months ago

@aeschli Debian from the Microsoft Store.

gabrielpan147 commented 3 months ago

Hello, I'm using a Mac with M2 chips trying to connect to our remote server and facing the same issue. Downloading vscode server with wget failed with wget download failed > wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try wget --help' for more options.. It worked fine before so I suspect it is related to a recent update of vscode or remoteSSH.

gabrielpan147 commented 3 months ago

Hello, I'm using a Mac with M2 chips trying to connect to our remote server and facing the same issue. Downloading vscode server with wget failed with wget download failed > wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try wget --help' for more options.. It worked fine before so I suspect it is related to a recent update of vscode or remoteSSH.

Fixed by rollback Remote-SSH version

anthropikos commented 2 months ago

I am trying to do remote SSH to a VSCode server hosted on a cluster. The cluster uses NFS and it seems that when the VSCode Remote SSH extension tries to download and install the vscode-server the wget process gets stuck with a state of D indicating an uninterruptible sleep.

A quick search of wget with an uninterruptible sleep shows that this happens with NFS systems and it would be helpful curl can be used instead.