Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Remote-SSH Bug]: Double slash prevents connection to host #9888

Closed
3 tasks done
radiradev opened this issue May 16, 2024 · 1 comment
Closed
3 tasks done

[Remote-SSH Bug]: Double slash prevents connection to host #9888

radiradev opened this issue May 16, 2024 · 1 comment
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@radiradev
Copy link

radiradev commented May 16, 2024

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

No response

Expected Behavior

No response

Steps To Reproduce

No response

Remote-SSH Log

Remote-SSH Log

[12:26:00.783] Creating bash subshell inside "bash"
[12:26:01.079] > bash version:  5.0.17(1)-release
> bash version:  5.0.17(1)-release
[12:26:01.184] > bash version:  5.0.17(1)-release
> bash version:  5.0.17(1)-release
[12:26:01.283] > bash version:  5.0.17(1)-release
[12:26:01.285] > 6a321db8bc5c: running
[12:26:01.591] > Acquiring lock on ~/.vscode-container/edep/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-remote-lock.rradev.dc96b837cf6bb4af9cd736aa3af08cf8279f7685
> Installing to ~/.vscode-container/edep/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685...
> Trigger local server download
> 6a321db8bc5c:trigger_server_download
> artifact==server-linux-x64==
> destFolder==~/.vscode-container/edep/.vscode-server/bin/==
> destFolder2==/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-server.tar.gz==
> 6a321db8bc5c:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for ~/.vscode-container/edep/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-server.tar.gz.done and vscode-server.tar.gz to exist
>  
[12:26:01.592] Got request to download on client for {"artifact":"server-linux-x64","destPath":"~/.vscode-container/edep/.vscode-server/bin//dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-server.tar.gz"}
[12:26:01.594] Downloading VS Code server locally...
[12:26:04.583] >  
[12:26:07.624] >  
[12:26:10.579] >  
[12:26:13.626] >  
[12:26:16.595] >  
[12:26:19.663] >  
[12:26:22.602] >  
[12:26:25.635] >  
[12:26:28.608] >  
[12:26:31.635] >  
[12:26:34.689] >  
[12:26:37.643] >  
[12:26:40.621] >  
[12:26:43.695] >  
[12:26:46.655] >  
[12:26:49.641] >  
[12:26:52.600] Downloaded VS Code server to /var/folders/6d/kwrh74d16zqd76v24vk387vh0000gn/T/da59fc64-5ee0-456f-b035-7e56ada68226
[12:26:52.600] Renamed VS Code server to /var/folders/6d/kwrh74d16zqd76v24vk387vh0000gn/T/vscode_server_1715855212600/vscode-server.tar.gz

[12:26:52.602] Checking ssh with "ssh -V"
[12:26:52.606] > OpenSSH_9.6p1, LibreSSL 3.3.6

[12:26:52.606] Testing scp with "scp"
[12:26:52.611] scp exited with code: 1
[12:26:52.611] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
           [-i identity_file] [-J destination] [-l limit] [-o ssh_option]
           [-P port] [-S program] [-X sftp_option] source ... target
[12:26:52.611] Copying file to remote with scp -o ConnectTimeout=50 'vscode-server.tar.gz' 'vscode-server.tar.gz.done' 'edepsim~server':'~/.vscode-container/edep/.vscode-server/bin//dc96b837cf6bb4af9cd736aa3af08cf8279f7685'
[12:26:52.611] Using cwd: file:///var/folders/6d/kwrh74d16zqd76v24vk387vh0000gn/T/vscode_server_1715855212600
> 
[12:26:55.747] >  
[12:26:58.637] >  
[12:26:58.760] > scp: remote mkdir ".vscode-container/edep/.vscode-server/bin//dc96b837cf6bb4af9cd736aa3af08cf8279f7685": No such file or directory
[12:26:59.214] "Copy server to host" terminal command done

Anything else?

The issue is coming from the double slash created by joining these two directories

> destFolder==~/.vscode-container/edep/.vscode-server/bin/==
> destFolder2==/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-server.tar.gz==

These seem to be appended together creating a double slash . When VSCode tries to copy with scp is it unable to locate the directory because of the .../bin//... in the path.

[12:26:01.592] Got request to download on client for {"artifact":"server-linux-x64","destPath":"~/.vscode-container/edep/.vscode-server/bin//dc96b837cf6bb4af9cd736aa3af08cf8279f7685/vscode-server.tar.gz"
@radiradev radiradev added the ssh Issue in vscode-remote SSH label May 16, 2024
@roblourens roblourens assigned connor4312 and unassigned roblourens May 17, 2024
@roblourens
Copy link
Member

@connor4312 it looks like the second slash got added last year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants