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

Cannot install vscode server: scp: No such file or directory #5303

Closed
SmallhillCZ opened this issue Jul 8, 2021 · 10 comments
Closed

Cannot install vscode server: scp: No such file or directory #5303

SmallhillCZ opened this issue Jul 8, 2021 · 10 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug plan-review PM-highlighted item determined to be P1 or P2 ssh Issue in vscode-remote SSH verified Verification succeeded
Milestone

Comments

@SmallhillCZ
Copy link

SmallhillCZ commented Jul 8, 2021

When vscode server is being installed, it gets stuck on the following error (without failing in the UI):

scp: /home/XXXXX/.vscode-server-insiders/bin/2d23c42a936db1c7b3b006f918cde29561cc47cd6: No such file or directory

Inspecting the server filesystem, the directory 2d23c42a936db1c7b3b006f918cde29561cc47cd6 truly doesnt exist, but directory 2d23c42a936db1c7b3b06f918cde29561cc47cd6 exists. Note the missing zero:

2d23c42a936db1c7b3b006f918cde29561cc47cd6
2d23c42a936db1c7b3b06f918cde29561cc47cd6

Tried the same with stable build. The directory names were different hashes, but in both cases, one letter from the hash was missing and installation got stuck. By trying to create the "correct" directory and move files there and back I am able to get to scp to copy the files correctly but get stuck at next steps (flags created in wrong directory etc).


  • VSCode Version: 1.58.0-insider (user setup)
  • Local OS Version: Windows 11
  • Remote OS Version: CentOS 7
  • Remote Extension/Connection Type: SSH
  • Logs:
[13:10:27.759] Downloaded VS Code server to c:\Users\XXXXX\AppData\Local\Temp\c89fb356-37e5-4de2-af91-9d18a5fd1d03
[13:10:30.359] Renamed VS Code server to c:\Users\XXXXX\AppData\Local\Temp\vscode_server_1625742627759\vscode-server.tar.gz
[13:10:30.364] Checking ssh with "ssh -V"
[13:10:30.438] > OpenSSH_for_Windows_8.1p1, LibreSSL 
[13:10:30.439] > 3.0.2

[13:10:30.443] Testing scp with "scp"
[13:10:30.537] scp exited with code: 1
[13:10:30.539] Got stderr from scp: usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
            [-J destination] [-l limit] [-o ssh_option] [-P port]
            [-S program] source ... target
[13:10:30.540] Copying file to remote with scp "vscode-server.tar.gz" "vscode-scp-done.flag" "XXXXX":"/home/XXXXX/.vscode-server-insiders/bin/2d23c42a936db1c7b3b006f918cde29561cc47cd6"
[13:10:30.541] Using cwd: file:///c%3A/Users/XXXXX/AppData/Local/Temp/vscode_server_1625742627759
[13:10:30.541] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:10:30.882] > �]0;C:\WINDOWS\System32\cmd.exe�
[13:10:31.564] > scp: /home/XXXXX/.vscode-server-insiders/bin/2d23c42a936db1c7b3b006f918cde29561cc47cd6: No such file or directory
[13:10:32.896] "Copy server to host" terminal command done

Steps to Reproduce:

  1. Try to connect to host which doesn't yet have vscode server installed
  2. Installation gets stuck at Downloading vscode server
  3. Inspect the log and see the error
@SmallhillCZ SmallhillCZ changed the title Cannot install vscode server: No such file or directory Cannot install vscode server: scp: No such file or directory Jul 8, 2021
@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Jul 8, 2021
@bamurtaugh bamurtaugh added the plan-review PM-highlighted item determined to be P1 or P2 label Jul 29, 2021
@phil-harmoniq
Copy link
Member

I am also experiencing this issue. VS Code version 1.58.2, extension version v0.65.7.

[13:30:51.329] Log Level: 2
[13:30:51.331] remote-ssh@0.65.7
[13:30:51.331] win32 x64
[13:30:51.332] SSH Resolver called for "ssh-remote+orion", attempt 1
[13:30:51.332] "remote.SSH.useLocalServer": false
[13:30:51.332] "remote.SSH.showLoginTerminal": false
[13:30:51.333] "remote.SSH.remotePlatform": {"192.168.1.20":"linux","RaspberryPi":"linux"}
[13:30:51.333] "remote.SSH.path": undefined
[13:30:51.333] "remote.SSH.configFile": undefined
[13:30:51.333] "remote.SSH.useFlock": true
[13:30:51.333] "remote.SSH.lockfilesInTmp": false
[13:30:51.333] "remote.SSH.localServerDownload": auto
[13:30:51.333] "remote.SSH.remoteServerListenOnSocket": false
[13:30:51.333] "remote.SSH.showLoginTerminal": false
[13:30:51.333] "remote.SSH.defaultExtensions": []
[13:30:51.333] "remote.SSH.loglevel": 2
[13:30:51.334] SSH Resolver called for host: orion
[13:30:51.334] Setting up SSH remote "orion"
[13:30:51.351] Using commit id "c3f126316369cd610563c75b1b1725e0679adfb3" and quality "stable" for server
[13:30:51.354] Install and start server if needed
[13:30:53.055] Checking ssh with "ssh -V"
[13:30:53.083] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

[13:30:53.086] Running script with connection command: ssh -T -D 50844 orion bash
[13:30:53.088] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:30:53.320] > �]0;C:\WINDOWS\System32\cmd.exe�
[13:30:53.320] Got some output, clearing connection timeout
[13:30:55.651] > 170fd369bd27: running
[13:30:55.735] > Acquiring lock on /home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/vscode-remote-lock.ubuntu.c3f126316369cd610563c75b1b1725e0679adfb3
[13:30:55.768] > Installing to /home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3...
[13:30:55.780] > 170fd369bd27%%1%%
[13:30:55.796] > Downloading with wget
[13:30:55.805] > wget download failed
> wget: unable to resolve host address ‘update.code.visualstudio.com’
> printenv:
>     SHELL=/bin/bash
>     PWD=/home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3
>     LOGNAME=ubuntu
>     XDG_SESSION_TYPE=tty
>     MOTD_SHOWN=pam
>     HOME=/home/ubuntu
>     LANG=C.UTF-8
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     SSH_CONNECTION=192.168.1.4 50846 192.168.1.20 22
>     XDG_SESSION_CLASS=user
>     USER=ubuntu
>     SHLVL=0
>     XDG_SESSION_ID=7
>     XDG_RUNTIME_DIR=/run/user/1000
>     SSH_CLIENT=192.168.1.4 50846 22
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     OLDPWD=/home/ubuntu
>     _=/usr/bin/printenv
> Trigger local server download
> 170fd369bd27:trigger_server_download
> platform==linux==
> vscodeArch==arm64==
> destFolder==/home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679a
> adfb3==
> 170fd369bd27:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679a
> adfb3/vscode-scp-done.flag and vscode-server.tar.gz to exist
[13:30:55.806] Got request to download on client for {"platform":"linux","arch":"arm64","destFolder":"/home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679aadfb3"}
[13:30:55.806] Downloading VS Code server locally...
[13:30:55.811] > 
> 
[13:30:58.566] Downloaded VS Code server to c:\Users\Phil\AppData\Local\Temp\fb38490d-5753-4d92-b606-f7bbf0250796
[13:30:58.579] Renamed VS Code server to c:\Users\Phil\AppData\Local\Temp\vscode_server_1627839058567\vscode-server.tar.gz
[13:30:58.583] Checking ssh with "ssh -V"
[13:30:58.615] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

[13:30:58.617] Testing scp with "scp"
[13:30:58.647] scp exited with code: 1
[13:30:58.647] Got stderr from scp: usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
            [-J destination] [-l limit] [-o ssh_option] [-P port]
            [-S program] source ... target
[13:30:58.647] Copying file to remote with scp "vscode-server.tar.gz" "vscode-scp-done.flag" orion:"/home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679aadfb3"
[13:30:58.647] Using cwd: file:///c%3A/Users/Phil/AppData/Local/Temp/vscode_server_1627839058567
[13:30:58.647] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:30:58.827] > �]0;C:\WINDOWS\System32\cmd.exe�
[13:31:00.355] > scp: /home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679aadfb3: No such file or directory
[13:31:01.639] "Copy server to host" terminal command done

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Aug 9, 2021
@roblourens roblourens added this to the August 2021 milestone Aug 9, 2021
@roblourens
Copy link
Member

Waiting for /home/ubuntu/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679a
adfb3/vscode-scp-done.flag and vscode-server.tar.gz to exist

Wow, this is a new one. The line wraps and duplicates the last character for no apparent reason

@roblourens
Copy link
Member

You can probably work around it by setting "remote.SSH.useLocalServer": true. Please let me know whether that helps.

@roblourens
Copy link
Member

Basically windows 11 is duplicating a character when it wraps that line. Haven't been able to repro it, and I don't know why it happens here but not other places in the log.

Pushed a change with a really annoying workaround. I just split the path into two parts that are less likely to wrap. It will be in the nightly build tomorrow, if you want to try it out.

@mjbvz mjbvz added the author-verification-requested Issues potentially verifiable by issue author label Aug 26, 2021
@connor4312 connor4312 added the verified Verification succeeded label Aug 27, 2021
@connor4312
Copy link
Member

Reviewed the code and it looks fine. @SmallhillCZ please try this on Insiders and let us know if it's fixed for you.

@SmallhillCZ
Copy link
Author

yes, it is fixed! thanks!

@zulrang
Copy link

zulrang commented Sep 7, 2021

I ran into the same issue with the extra character being put in the hash folder name. Installed the insider version, and now it times out trying to connect to any server. The older version connects fine, but again with the wrong hash folder name.

@zulrang
Copy link

zulrang commented Sep 10, 2021

Problem has returned in the latest Insiders build. microsoft/vscode#132885

@roblourens
Copy link
Member

The fix is still only in the Nightly build, make sure you have that. I'll release it to stable soon

@zulrang
Copy link

zulrang commented Sep 11, 2021

As shown in the other thread, this returned with VS Code version: Code - Insiders 1.61.0-insider (23cffa2, 2021-09-10T17:05:11.199Z)

@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug plan-review PM-highlighted item determined to be P1 or P2 ssh Issue in vscode-remote SSH verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants