microsoft / vscode

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

Downgrade CLI version #204112

Open antoniospoletojr opened 9 months ago

antoniospoletojr commented 9 months ago

Reposting the post from another user on a "closed" issue. The issue is not closed at all, we still cannot work after code got updated and that's just absurd. We cannot either revert back cause of the following issue.

I am trying to downgrade the CLI specifically on a remote machine, have tried downloading the CLI tool from the following address:

https://update.code.visualstudio.com/1.85.2/cli-linux-x64/stable

When I run code after unpacking it, it is still looking for the updated GLIBC versions:

[mdefende@c0202 Downloads]$ ./code
./code: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ./code)

I do notice whenever I change the version number, the downloaded file is always named vscode_cli_linux_x64_cli.tar.gz whereas distinct versions of the full VSCode have some distinct tag on their tarballs. For instance, Code 1.85.2 available at https://update.code.visualstudio.com/1.85.2/linux-x64/stable is named code-stable-x64-1705560028.tar.gz whereas 1.85.1 is named code-stable-x64-1702460840.tar.gz. Are all of the CLI links accessing the same 1.86.0 file? I can't check the version or the help of the CLI binary because of the GLIBC errors

EDIT: I tested on an updated Linux distribution and the CLI download links are pointing to the correct versions. However, CLI version 1.85.2 and below (to what I've tested) are still erroring out when they don't find the new GLIBC versions. I don't know what else to try at this point.

Originally posted by @mdefende in https://github.com/microsoft/vscode/issues/203967#issuecomment-1922261345

antoniospoletojr commented 9 months ago

EDIT: Got it to work using this link instead. Had to try and error the correct link since there is no official guide from microsoft.

https://update.code.visualstudio.com/1.85.2/cli-alpine-x64/stable

mdefende commented 9 months ago

That worked for me. That needs to be updated on the Previous Releases documentation. That cli-alpine-x64 download type doesn't appear anywhere on that page.

antoniospoletojr commented 9 months ago

That worked for me. That needs to be updated on the Previous Releases documentation. That cli-alpine-x64 download type doesn't appear anywhere on that page.

The code bin on the remote machine now starts fine, but when I try to establish a connection the machine keeps downloading the server, tries to install it and loops back indefinitely. Never happened before, it probably has something to do with the downgrade. Still can't manage to work with vscode after the update...

[2024-02-04 13:02:29] trace [rpc.0] server download progress: 50528244/57245136 (88%)
[2024-02-04 13:02:29] trace [rpc.0] server download progress: 52633588/57245136 (92%)
[2024-02-04 13:02:29] trace [rpc.0] server download progress: 54738931/57245136 (96%)
[2024-02-04 13:02:29] trace [rpc.0] server download progress: 56844275/57245136 (99%)
[2024-02-04 13:02:29] trace [rpc.0] server download progress: 57245136/57245136 (100%)
[2024-02-04 13:02:30] debug [rpc.0] Resolved quality Stable to 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
[2024-02-04 13:02:32] debug [tunnels::connections::ws] received liveness pong
[2024-02-04 13:02:44] info [rpc.0] Checking /home/spoleto/.vscode/cli/servers/Stable-05047486b6df5eb8d44b2ecd70ea3bdf775fd937/log.txt and /home/spoleto/.vscode/cli/servers/Stable-05047486b6df5eb8d44b2ecd70ea3bdf775fd937/pid.txt for a running server...
[2024-02-04 13:02:44] debug [rpc.0] Installing and setting up Visual Studio Code Server...
[2024-02-04 13:02:45] debug [reqwest::async_impl::client] redirecting 'https://update.code.visualstudio.com/commit:05047486b6df5eb8d44b2ecd70ea3bdf775fd937/server-linux-x64/stable' to 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/vscode-server-linux-x64.tar.gz'
[2024-02-04 13:02:45] info [rpc.0] Downloading Visual Studio Code server -> /tmp/.tmpSHgBvf/vscode-server-linux-x64.tar.gz
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 0/57245136 (0%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 2105343/57245136 (4%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 4210686/57245136 (7%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 6316030/57245136 (11%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 8421373/57245136 (15%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 10526717/57245136 (18%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 12632060/57245136 (22%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 14737404/57245136 (26%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 16842747/57245136 (29%)
[2024-02-04 13:02:45] trace [rpc.0] server download progress: 18948091/57245136 (33%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 21053434/57245136 (37%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 23158778/57245136 (40%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 25264121/57245136 (44%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 27369465/57245136 (48%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 29474808/57245136 (51%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 31580152/57245136 (55%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 33685495/57245136 (59%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 35790839/57245136 (63%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 37896182/57245136 (66%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 40001526/57245136 (70%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 42106869/57245136 (74%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 44212213/57245136 (77%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 46317556/57245136 (81%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 48422900/57245136 (85%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 50528243/57245136 (88%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 52633587/57245136 (92%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 54738930/57245136 (96%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 56844274/57245136 (99%)
[2024-02-04 13:02:46] trace [rpc.0] server download progress: 57245136/57245136 (100%)
antoniospoletojr commented 9 months ago

Homemade fix part 2.

I manually downloaded the server with

wget https://update.code.visualstudio.com/commit:8b3775030ed1a69b13e4f4c628c612102e30a681/server-linux-x64/stable

then unpacked the folder content into ~/.vscode-server/bin/8b3775030ed1a69b13e4f4c628c612102e30a681.

Managed to make it work like this. Still embarassing I had to do this kind of stuff