open-remote-ssh icon indicating copy to clipboard operation
open-remote-ssh copied to clipboard

Error resolving authority

Open LiamFry opened this issue 1 year ago • 4 comments

Using VSCodium v1.95.3 Using Open Remote SSH v0.0.47

I try to connect and I get the following error:

[Trace  - 05:59:15.226] Creating forwarding server 43729(local) => 37331(socks) => 42135(remote)
[Error  - 05:59:15.227] Error resolving authority
Error: Illegal argument: connectionToken
	at xe (file:///app/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:7:1336)
	at iD (file:///app/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:26198)
	at new eF (file:///app/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:108:26556)
	at /home/siff/.var/app/com.vscodium.codium/data/codium/extensions/jeanp413.open-remote-ssh-0.0.47-universal/out/extension.js:1:405786
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I've tried the following:

  • uninstall/reinstall the VSCodium extension
  • checked remote host for an already-running instance of node; there is none
  • on remote host: rm -rfv ~/.vscodium-server/bin; reattempt remote connection
  • on remote host: rm -rfv ~/.vscodium-server; reattempt remote connection

My "connection name" (or whatever you call it) is dc5a551c256719475d2d0959270e3836c9bbb632 When I cat ~/.vscodium-server/.dc5a551c256719475d2d0959270e3836c9bbb632.log it shows ...

Server bound to 127.0.0.1:42135 (IPv4)
Extension host agent listening on 42135

The connection token defined in '/home/siff/.vscodium-server/.dc5a551c256719475d2d0959270e3836c9bbb632.token does not adhere to the characters 0-9, a-z, A-Z, _, or -.

When I cat the token file, it's empty.

LiamFry avatar Dec 07 '24 06:12 LiamFry

Found a workaround:

  1. Try connecting to the remote server through VSCodium
  2. Copy the script from the output tab (Begins with # Server installation script, ends with print_install_results_and_exit 0 )
  3. ssh into the remote server through a terminal (in a separate VSCodium window or an entirely different app), paste the copied script into an .sh file and execute it - the token should be generated and written into the .token file as normal.
  4. Without closing the ssh connection in the terminal, try connecting to the remote server through VSCodium again and it should connect normally

I've got no clue why the token gets generated but fails to get written into the .token file when running from VSCodium - clearly an issue.

Update:

Figured it out! Add set +o noclobber to .bashrc

If noclobber is set, > strictly creates new files, and >| overwrites existing files. In the server setup script empty .token files are created with touch, and their content is written later, using >, effectively overwriting the pre-existing files, which noclobber does not allow when using >.

Solution: The script should use >| to overwrite existing files on systems where noclobber is set. Or just unset noclobber on the remote system.

TheBrch avatar Dec 10 '24 19:12 TheBrch

No luck. An now the error I'm getting is this:

gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

The entire log file is this:

Server bound to 127.0.0.1:43591 (IPv4)
Extension host agent listening on 43591

[10:58:14] 




[10:58:14] Extension host agent started.
[10:58:14] Started initializing default profile extensions in extensions installation folder. file:///home/siff/.vscodium-server/extensions
[10:58:14] Completed initializing default profile extensions in extensions installation folder. file:///home/siff/.vscodium-server/extensions

LiamFry avatar Dec 21 '24 15:12 LiamFry

It seems that there was a problem with the downloaded archive and its extraction. Have you tried deleting the .vscodium-server/ directory from the remote machine?

TheBrch avatar Dec 21 '24 23:12 TheBrch

In my case, when running in a docker container "wget" was missing, so installing that worked :) although nothing was said in the log, debug logging could really be improved ;)

stableversion avatar Jan 22 '25 10:01 stableversion