jeanp413 / open-remote-ssh

VSCode Remote Development: Open any folder on a remote machine using SSH.
MIT License
309 stars 43 forks source link

Error Installing Server - Error server contents are corrupted #143

Closed OggyP closed 8 months ago

OggyP commented 8 months ago

Hello, I'm trying to use this extension with vscodium on my pc. On my PC I have installed vscodium-bin (version 1.87.0), vscodium-bin-features and vscodium-bin-marketplace from the AUR. I am trying to setup an ssh remote connection to my sever running Ubuntu 22.04 but the server component keeps failing to install, reporting the following when the .vscode-server folder is deleted from the server before a fresh install attempt:

# Finish server setup
print_install_results_and_exit 0

[Trace  - 12:32:44.321] Server install command stderr:
2024-03-03 23:32:43 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/144590939/e5fa8cf1-743f-4c4d-b212-a79029e2573c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240303%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240303T123154Z&X-Amz-Expires=300&X-Amz-Signature=e445a36768d79d925663ea432110f499e46ba9a923d8ec85fe1e6aca4a69d1e0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=144590939&response-content-disposition=attachment%3B%20filename%3Dvscodium-reh-linux-x64-1.87.0.24060.tar.gz&response-content-type=application%2Foctet-stream [47933099/47933099] -> "vscode-server.tar.gz" [1]

[Trace  - 12:32:44.321] Server install command stdout:
Error server contents are corrupted
34df916702dbd83fa89accfe: start
exitCode==1==
listeningOn====
connectionToken====
logFile==/home/oggyp/.vscode-server/.5695cc889d3d0500fa6c7983468a699185fce828.log==
osReleaseId==ubuntu==
arch==x86_64==
platform==linux==
tmpDir==/run/user/1000==
34df916702dbd83fa89accfe: end

[Error  - 12:32:44.322] Error resolving authority
Error: Couldn't install vscode server on remote server, install script returned non-zero exit status
    at t.installCodeServer (/home/oggyp/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.45/out/extension.js:1:441144)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /home/oggyp/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.45/out/extension.js:1:404941

After this error my .vscode-server folder looks like:

total 127540
drwxrwxr-x  6 oggyp oggyp     4096 Mar  3 23:32 .
drwxrwxr-x  3 oggyp oggyp     4096 Mar  3 23:32 ..
drwxr-xr-x  4 oggyp oggyp     4096 Mar  1 10:06 bin
drwxr-xr-x 34 oggyp oggyp     4096 Mar  1 10:06 extensions
-rwxr-xr-x  1 oggyp oggyp 82609040 Mar  1 10:06 node
drwxr-xr-x 80 oggyp oggyp     4096 Mar  1 10:06 node_modules
drwxr-xr-x  3 oggyp oggyp     4096 Mar  1 10:06 out
-rw-r--r--  1 oggyp oggyp       88 Mar  1 09:49 package.json
-rw-r--r--  1 oggyp oggyp    14240 Mar  1 09:54 product.json
-rw-rw-r--  1 oggyp oggyp 47933099 Mar  1 10:06 vscode-server.tar.gz

and running ./bin/codium-server --start-server --host=127.0.0.1 --port=0 from that directory results in the server seemingly starting properly.

I'm unsure how to proceed, any help would be very much appreciated.

OggyP commented 8 months ago

I have managed to resolve this issue myself, Being unable to find the script .vscode-server/bin/5695cc889d3d0500fa6c7983468a699185fce828/bin/code-server was causing it to fail. Instead the script in this location was called codium-server. To fix this issue I changed my product.json for VSCodium from:

    "applicationName": "code",
    "serverApplicationName": "code-server",
    "tunnelApplicationName": "code-tunnel",

to

    "applicationName": "codium",
    "serverApplicationName": "codium-server",
    "tunnelApplicationName": "codium-tunnel",

This resulted in it working, and finding the correct script. Is this an issue with the package.json in VSCodium or is it mean to be code-server?

jeanp413 commented 8 months ago

@OggyP I just updated to 1.87 using the .deb release and it has the proper values in product.json so maybe it's a bug in the arch linux packaging in vscodium, you need to report it in the vscodium repo.