coder / code-server

VS Code in the browser
https://coder.com
MIT License
67.82k stars 5.57k forks source link

After each vscode update, updated code-server doesn't remove previous version #6985

Closed pawelzwronek closed 2 weeks ago

pawelzwronek commented 3 weeks ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Connect to raspberry over ssh(public/private key). Wait for code-server get installed (once)
  2. When vscode gets new update, it update code-server on the raspberry, and old version of code-server stays on the raspberry. Now I have 5 older version and 1 the latest, each 180MB

Expected

Old version should be auto-removed

Actual

Old versions of code-server stays on the server

Logs

[20:01:44.406] Log Level: 2
[20:01:44.409] VS Code version: 1.93.0
[20:01:44.409] Remote-SSH version: remote-ssh@0.114.1
[20:01:44.409] win32 x64
[20:01:44.411] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d", attempt 1
[20:01:44.411] "remote.SSH.useLocalServer": false
[20:01:44.411] "remote.SSH.useExecServer": true
[20:01:44.412] "remote.SSH.showLoginTerminal": false
[20:01:44.412] "remote.SSH.remotePlatform": {"18.156.68.68":"linux","192.168.1.123":"linux"}
[20:01:44.412] "remote.SSH.path": undefined
[20:01:44.412] "remote.SSH.configFile": C:\ELECTRO\projekty\mic_esp32-s3\src\aws\klucze\config
[20:01:44.412] "remote.SSH.useFlock": true
[20:01:44.412] "remote.SSH.lockfilesInTmp": false
[20:01:44.412] "remote.SSH.localServerDownload": auto
[20:01:44.412] "remote.SSH.remoteServerListenOnSocket": false
[20:01:44.412] "remote.SSH.showLoginTerminal": false
[20:01:44.413] "remote.SSH.defaultExtensions": []
[20:01:44.413] "remote.SSH.loglevel": 2
[20:01:44.413] "remote.SSH.enableDynamicForwarding": true
[20:01:44.413] "remote.SSH.enableRemoteCommand": false
[20:01:44.413] "remote.SSH.serverPickPortsFromRange": {}
[20:01:44.413] "remote.SSH.serverInstallPath": {}
[20:01:44.413] "remote.SSH.permitPtyAllocation": false
[20:01:44.413] "remote.SSH.preferredLocalPortRange: undefined
[20:01:44.414] "remote.SSH.useCurlAndWgetConfigurationFiles: false
[20:01:44.418] SSH Resolver called for host: pi@192.168.1.123
[20:01:44.419] Setting up SSH remote "192.168.1.123"
[20:01:44.422] Using commit id "4849ca9bdf9666755eb463db297b69e5385090e3" and quality "stable" for server
[20:01:44.425] Script variables:
 {
  "InstallExitCode.24": "AlreadyInProgress",
  "InstallExitCode.25": "ServerDownloadFailed",
  "InstallExitCode.26": "NoDownloaderAvailable",
  "InstallExitCode.27": "UnsupportedArch",
  "InstallExitCode.28": "StatusCheckFailed",
  "InstallExitCode.29": "NeedInsidersArch",
  "InstallExitCode.30": "NoDownloaderAvailableForStatusCheck",
  "InstallExitCode.31": "ServerTransferFailed",
  "InstallExitCode.32": "ServerFailedToStart",
  "InstallExitCode.33": "NeedInsidersWindows",
  "InstallExitCode.34": "CreateInstallDirFailed",
  "InstallExitCode.35": "UnsupportedPlatform",
  "InstallExitCode.36": "ServerTerminatedCVE20201416",
  "InstallExitCode.37": "UnpackFailed",
  "InstallExitCode.38": "ChangeDirFailed",
  "InstallExitCode.AlreadyInProgress": "24",
  "InstallExitCode.ServerDownloadFailed": "25",
  "InstallExitCode.NoDownloaderAvailable": "26",
  "InstallExitCode.NoDownloaderAvailableForStatusCheck": "30",
  "InstallExitCode.UnsupportedArch": "27",
  "InstallExitCode.StatusCheckFailed": "28",
  "InstallExitCode.NeedInsidersArch": "29",
  "InstallExitCode.ServerTransferFailed": "31",
  "InstallExitCode.ServerFailedToStart": "32",
  "InstallExitCode.NeedInsidersWindows": "33",
  "InstallExitCode.CreateInstallDirFailed": "34",
  "InstallExitCode.UnsupportedPlatform": "35",
  "InstallExitCode.ServerTerminatedCVE20201416": "36",
  "InstallExitCode.UnpackFailed": "37",
  "InstallExitCode.ChangeDirFailed": "38",
  "InstallUnpackCode.Success": "success",
  "InstallUnpackCode.Error": "error",
  "InstallUnpackCode.MissingFiles": "missingFiles",
  "uuid": "fe6a4736c938",
  "startMarker": "fe6a4736c938: running",
  "commitId": "4849ca9bdf9666755eb463db297b69e5385090e3",
  "quality": "stable",
  "token": "1a11a1a1-1111-11a1-11a1-aaa1111111a1",
  "vscodeAgentFolder": "$HOME/.vscode-server",
  "allowClientDownload": "1",
  "forceClientDownload": "0",
  "cliNameInArchive": "code",
  "ignoreWgetConfigFlag": " --no-config ",
  "ignoreCurlConfigFlag": " --disable ",
  "wgetTriesSegment": "--tries=1",
  "listenArgs": "--on-host=127.0.0.1 --on-port",
  "getDownloadServerStartTrigger": "fe6a4736c938:trigger_server_download",
  "getDownloadServerEndTrigger": "fe6a4736c938:trigger_server_download_end",
  "getProgressDownloading": "fe6a4736c938%%1%%",
  "getProgressInstalling": "fe6a4736c938%%2%%"
}
[20:01:44.426] Install and start server if needed
[20:01:44.428] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V"
[20:01:44.430] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[20:01:44.431] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[20:01:44.432] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[20:01:44.432] Checking ssh with "C:\Windows\ssh.exe -V"
[20:01:44.433] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[20:01:44.433] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[20:01:44.434] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[20:01:44.434] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[20:01:44.435] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[20:01:44.435] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[20:01:44.464] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

[20:01:44.466] Using SSH config file "C:\ELECTRO\projekty\mic_esp32-s3\src\aws\klucze\config"
[20:01:44.467] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 65163 -F "C:\ELECTRO\projekty\mic_esp32-s3\src\aws\klucze\config" "pi@192.168.1.123" sh
[20:01:44.468] Generated SSH command: 'type "C:\Users\p\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.1.123-346906413.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 65163 -F "C:\ELECTRO\projekty\mic_esp32-s3\src\aws\klucze\config" "pi@192.168.1.123" sh'
[20:01:44.468] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[20:01:44.950] > ]0;C:\WINDOWS\System32\cmd.exe
[20:01:44.950] Got some output, clearing connection timeout
[20:01:45.026] > P
[20:01:45.043] > Please note that SSH may not work until a valid user has been set up.
> 
> See http://rptl.io/newuser for details.
> 
[20:01:45.134] > fe6a4736c938: running
> Script executing under PID: 135960
[20:01:45.167] > Found existing installation at /home/pi/.vscode-server...
> Starting VS Code CLI...
> printenv:
>     USER=pi
>     SSH_CLIENT=192.168.1.201 65165 22
>     XDG_SESSION_TYPE=tty
>     SHLVL=0
>     MOTD_SHOWN=pam
>     HOME=/home/pi
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     LOGNAME=pi
>     _=/usr/bin/sh
>     XDG_SESSION_CLASS=user
>     XDG_SESSION_ID=313
>     PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
>     XDG_RUNTIME_DIR=/run/user/1000
>     LANG=en_GB.UTF-8
>     SHELL=/bin/bash
>     PWD=/home/pi
>     SSH_CONNECTION=192.168.1.201 65165 192.168.1.123 22
> Removing old logfile at /home/pi/.vscode-server/.cli.4849ca9bdf9666755eb463db297
> b69e5385090e3.log
> Spawned remote CLI: 135978
> Waiting for server log...
[20:01:45.183] > fe6a4736c938: start
> listeningOn==127.0.0.1:44729==
> osReleaseId==debian==
> arch==aarch64==
> vscodeArch==arm64==
> bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==1a11a1a1-1111-11a1-11a1-aaa1111111a1==
> platformDownloadPath==cli-alpine-arm64==
> fe6a4736c938: end
[20:01:45.183] Received install output: 
listeningOn==127.0.0.1:44729==
osReleaseId==debian==
arch==aarch64==
vscodeArch==arm64==
bitness==64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==35==
execServerToken==1a11a1a1-1111-11a1-11a1-aaa1111111a1==
platformDownloadPath==cli-alpine-arm64==

[20:01:45.184] Remote server is listening on port 44729
[20:01:45.184] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":44729},"osReleaseId":"debian","arch":"aarch64","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"1a11a1a1-1111-11a1-11a1-aaa1111111a1"},"serverStartTime":35,"installUnpackCode":""}
[20:01:45.184] ** Note: Support for architecture "aarch64" is in preview **
[20:01:45.187] Starting forwarding server. local port 65166 -> socksPort 65163 -> remotePort 44729
[20:01:45.188] Forwarding server listening on port 65166
[20:01:45.188] Waiting for ssh tunnel to be ready
[20:01:45.190] [Forwarding server port 65166] Got connection 0
[20:01:45.191] Tunneled port 44729 to local port 65166
[20:01:45.191] Resolved "ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d" to "port 65166"
[20:01:45.195] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d
[20:01:45.195] Resolving exec server at port 65166
[20:01:45.215] > 
[20:01:45.217] [Forwarding server port 65166] Got connection 1
[20:01:45.262] Exec server for ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d created and cached
[20:01:45.264] ------

[20:01:45.281] [server] Checking /home/pi/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/log.txt and /home/pi/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/pid.txt for a running server...
[20:01:45.318] [server] Installing and setting up Visual Studio Code Server...
[20:01:45.319] [server] Server setup complete
[20:01:45.319] [server] Starting server...
[20:01:45.319] [server] Starting server with command... Command { std: "/home/pi/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/tmp/code-a2c55d4e-0a14-4517-8d9c-8e1dab4d0ec1", kill_on_drop: false }
[20:01:45.322] [server] *
[20:01:45.322] [server] * Visual Studio Code Server
[20:01:45.322] [server] *
[20:01:45.322] [server] * By using the software, you agree to
[20:01:45.327] [server] Server bound to /tmp/code-a2c55d4e-0a14-4517-8d9c-8e1dab4d0ec1
[20:01:45.327] [server] Extension host agent listening on /tmp/code-a2c55d4e-0a14-4517-8d9c-8e1dab4d0ec1
[20:01:45.327] [server] parsed location: "/tmp/code-a2c55d4e-0a14-4517-8d9c-8e1dab4d0ec1"
[20:01:45.327] [server] 
[20:01:45.495] [server] [20:01:47] 
[20:01:45.545] [server] 
[20:01:45.545] [server] 
[20:01:45.545] [server] 
[20:01:45.555] [server] [20:01:47] Extension host agent started.
[20:01:45.604] [server] [20:01:47] [<unknown>][a6fbf37e][ManagementConnection] New connection established.
[20:01:45.648] [server] [20:01:47] [<unknown>][d472a706][ExtensionHostConnection] New connection established.
[20:01:45.765] [server] [20:01:47] [<unknown>][d472a706][ExtensionHostConnection] <136035> Launched Extension Host Process.
[20:01:46.789] Opening exec server for ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d
[20:01:46.804] Verified and reusing cached exec server for ssh-remote+7b22686f73744e616d65223a223139322e3136382e312e313233222c2275736572223a227069227d
[20:02:05.523] [server] [20:02:07] [File Watcher (parcel)] Unexpected error: inotify_add_watch on '//proc/135606/net/rpc/auth.rpcsec.init' failed: No such file or directory (EUNKNOWN) (path: /)
[20:02:05.524] [server] [20:02:07] [File Watcher (universal)] inotify_add_watch on '//proc/135606/net/rpc/auth.rpcsec.init' failed: No such file or directory
[20:06:45.549] [server] New EH opened, aborting shutdown
[20:06:45.550] [server] [20:06:47] New EH opened, aborting shutdown

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

This cannot be tested in GitHub Codespaces

Are you accessing code-server over a secure context?

Notes

No response

code-asher commented 2 weeks ago

This looks like VS Code's remote server that is downloaded when using the Remote SSH plugin, and not code-server (which is a web server around VS Code, and unrelated to the remote extension). Please submit to https://github.com/microsoft/vscode if you would, thank you!