Closed eplatek-safyr closed 4 weeks ago
You're saying that it works if you start normal desktop VS Code on the remote before you ssh into it? That won't affect VS Code Remote at all, but is it possible that there is some initialization that happens in one your scripts, like .bashrc, when you open vscode? And that isn't happening when you connect with VS Code Remote?
Yes, no problem when starting vscode locally on the mac, the tasks start without any trouble right away.
My default shell is zsh
, here is the .zshrc
:
I don't have a bashrc file in home
As you can see there's nothing fancy, it seems that the first run completely ignores the shell profile when starting from remote vscode
I just tried with a macbook and:
I also tried to
It's hard for me to understand what's going on, but the causes seems to lie on the remote process setup, which cannot resolve the shell profile on the first run. The machine setup is pretty straightforward, default setup with xcode, docker and nodejs
Sorry, I don't think I can understand what's going on from here. The before and after remote-ssh logs look like it starts with the same PATH in the log.
I know this is a weird behavior... I'll try to reset my machine to see if it solves the issue, but if it happens again I'll detail how I did the setup so it can be reproducible
Hey @roblourens, this issue might need further attention.
@eplatek-safyr, you can help us out by closing this issue if the problem no longer exists, or adding more information.
Hi, I do not reproduce this issue since a few weeks, I close the issue
First run of vscode-server
``` [14:08:52.824] Log Level: 2 [14:08:52.841] VS Code version: 1.88.1 [14:08:52.841] Remote-SSH version: remote-ssh@0.111.2024040515 [14:08:52.841] win32 x64 [14:08:52.854] SSH Resolver called for "ssh-remote+mac-mini", attempt 1 [14:08:52.855] "remote.SSH.useLocalServer": false [14:08:52.855] "remote.SSH.useExecServer": true [14:08:52.857] "remote.SSH.showLoginTerminal": false [14:08:52.857] "remote.SSH.remotePlatform": {"mac-dev":"macOS","mac-mini":"macOS","mac-air":"macOS"} [14:08:52.858] "remote.SSH.path": undefined [14:08:52.858] "remote.SSH.configFile": undefined [14:08:52.858] "remote.SSH.useFlock": true [14:08:52.858] "remote.SSH.lockfilesInTmp": false [14:08:52.858] "remote.SSH.localServerDownload": auto [14:08:52.858] "remote.SSH.remoteServerListenOnSocket": false [14:08:52.858] "remote.SSH.showLoginTerminal": false [14:08:52.859] "remote.SSH.defaultExtensions": [] [14:08:52.859] "remote.SSH.loglevel": 2 [14:08:52.859] "remote.SSH.enableDynamicForwarding": true [14:08:52.859] "remote.SSH.enableRemoteCommand": false [14:08:52.859] "remote.SSH.serverPickPortsFromRange": {} [14:08:52.860] "remote.SSH.serverInstallPath": {} [14:08:52.868] SSH Resolver called for host: mac-mini [14:08:52.868] Setting up SSH remote "mac-mini" [14:08:52.873] Using commit id "e170252f762678dec6ca2cc69aba1570769a5d39" and quality "stable" for server [14:08:52.878] Install and start server if needed [14:08:52.880] Checking ssh with "C:\Python312\Scripts\ssh.exe -V" [14:08:52.882] Got error from ssh: spawn C:\Python312\Scripts\ssh.exe ENOENT [14:08:52.882] Checking ssh with "C:\Python312\ssh.exe -V" [14:08:52.883] Got error from ssh: spawn C:\Python312\ssh.exe ENOENT [14:08:52.883] Checking ssh with "C:\Program Files\Oculus\Support\oculus-runtime\ssh.exe -V" [14:08:52.883] Got error from ssh: spawn C:\Program Files\Oculus\Support\oculus-runtime\ssh.exe ENOENT [14:08:52.884] Checking ssh with "C:\Python311\Scripts\ssh.exe -V" [14:08:52.884] Got error from ssh: spawn C:\Python311\Scripts\ssh.exe ENOENT [14:08:52.884] Checking ssh with "C:\Python311\ssh.exe -V" [14:08:52.885] Got error from ssh: spawn C:\Python311\ssh.exe ENOENT [14:08:52.885] Checking ssh with "C:\Windows\system32\ssh.exe -V" [14:08:52.886] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [14:08:52.886] Checking ssh with "C:\Windows\ssh.exe -V" [14:08:52.887] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [14:08:52.887] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [14:08:52.888] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [14:08:52.888] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [14:08:52.889] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [14:08:52.889] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [14:08:52.917] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 [14:08:52.924] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 53682 "mac-mini" bash [14:08:52.926] Terminal shell path: C:\Windows\System32\cmd.exe [14:08:53.638] > 1c8c3184072c: running > ]0;C:\Windows\System32\cmd.exe [14:08:53.638] Got some output, clearing connection timeout [14:08:53.645] > Found existing installation at /Users/elias/.vscode-server... > Starting VS Code CLI... "/Users/elias/.vscode-server/code-e170252f762678dec6ca2cc69aba1570769a5d39" command-shell --cli-data-dir "/Users/elias/.vscode-server/cli" --on-port --parent-process-id 450 &> "/Users/elias/.vscode-server/.cli.e170252f762678dec6ca2cc69aba1570769a5d39.log" < /dev/null > printenv: > SHELL=/bin/zsh > TMPDIR=/var/folders/rf/n21trpp57mdd8f6vc56qtq0w0000gn/T/ > SSH_CLIENT=192.168.1.29 53685 22 > USER=elias > VSCODE_AGENT_FOLDER=/Users/elias/.vscode-server > PATH=/usr/bin:/bin:/usr/sbin:/sbin > PWD=/Users/elias > SHLVL=1 > HOME=/Users/elias > LOGNAME=elias > SSH_CONNECTION=192.168.1.29 53685 192.168.1.129 22 > _=/usr/bin/printenv > Removing old logfile at /Users/elias/.vscode-server/.cli.e170252f762678dec6ca2cc69aba1570769a5d39.log > Spawned remote CLI: 477 > Waiting for server log... [14:08:53.692] > Waiting for server log... [14:08:53.740] > Waiting for server log... [14:08:53.769] > 1c8c3184072c: start > SSH_AUTH_SOCK==== > DISPLAY==== > listeningOn==127.0.0.1:49152== > osReleaseId==Darwin== > arch==arm64== > vscodeArch==arm64== > bitness==64== > tmpDir==/tmp== > platform==macOS== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > serverStartTime==0== > execServerToken==11111a11-1111-11a1-1a1a-111111a11a11== > 1c8c3184072c: end [14:08:53.769] Received install output: SSH_AUTH_SOCK==== DISPLAY==== listeningOn==127.0.0.1:49152== osReleaseId==Darwin== arch==arm64== vscodeArch==arm64== bitness==64== tmpDir==/tmp== platform==macOS== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== serverStartTime==0== execServerToken==11111a11-1111-11a1-1a1a-111111a11a11== [14:08:53.770] Remote server is listening on port 49152 [14:08:53.770] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":49152},"osReleaseId":"Darwin","arch":"arm64","sshAuthSock":"","display":"","tmpDir":"/tmp","platform":"macOS","execServerToken":"11111a11-1111-11a1-1a1a-111111a11a11"},"serverStartTime":0,"installUnpackCode":""} [14:08:53.770] ** Note: Support for architecture "arm64" is in preview ** [14:08:53.772] Starting forwarding server. local port 53686 -> socksPort 53682 -> remotePort 49152 [14:08:53.773] Forwarding server listening on port 53686 [14:08:53.773] Waiting for ssh tunnel to be ready [14:08:53.775] [Forwarding server port 53686] Got connection 0 [14:08:53.775] Tunneled port 49152 to local port 53686 [14:08:53.776] Resolved "ssh-remote+mac-mini" to "port 53686" [14:08:53.782] Initizing new exec server for ssh-remote+mac-mini [14:08:53.782] Resolving exec server at port 53686 [14:08:53.799] > [14:08:53.800] [Forwarding server port 53686] Got connection 1 [14:08:53.811] Exec server for ssh-remote+mac-mini created and cached [14:08:53.813] ------ [14:08:53.825] [server] Checking /Users/elias/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/log.txt and /Users/elias/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/pid.txt for a running server... [14:08:53.825] [server] Installing and setting up Visual Studio Code Server... [14:08:53.826] [server] Server setup complete [14:08:53.826] [server] Starting server... [14:08:53.826] [server] Starting server with command... Command { std: "/Users/elias/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/var/folders/rf/n21trpp57mdd8f6vc56qtq0w0000gn/T/code-1862be9c-e88b-4237-9210-0406bdc73b5b", kill_on_drop: false } [14:08:53.985] [server] * [14:08:53.985] [server] * Visual Studio Code Server [14:08:53.986] [server] * [14:08:53.986] [server] * By using the software, you agree to [14:08:53.986] [server] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and [14:08:53.986] [server] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement). [14:08:53.986] [server] * [14:08:53.987] [server] Server bound to /var/folders/rf/n21trpp57mdd8f6vc56qtq0w0000gn/T/code-1862be9c-e88b-4237-9210-0406bdc73b5b [14:08:53.987] [server] Extension host agent listening on /var/folders/rf/n21trpp57mdd8f6vc56qtq0w0000gn/T/code-1862be9c-e88b-4237-9210-0406bdc73b5b [14:08:53.987] [server] parsed location: "/var/folders/rf/n21trpp57mdd8f6vc56qtq0w0000gn/T/code-1862be9c-e88b-4237-9210-0406bdc73b5b" [14:08:53.987] [server] [14:08:53.987] [server] Server started [14:08:54.055] [server] [14:08:54] [14:08:54.055] [server] [14:08:54.055] [server] [14:08:54.055] [server] [14:08:54.069] [server] [14:08:54] Extension host agent started. [14:08:54.093] [server] [14:08:54] [Steps to Reproduce:
env: node: No such file or directory
)Does this issue occur when you try this locally?: Yes Does this issue occur when you try this locally and all extensions are disabled?: Yes
Workaround:
vscode-server
process is created by local user and can be used correctly by remote sshOR
vscode-server
process, and restart local vscodeLogs after killing first process of `vscode-server`
[14:16:14.177] Log Level: 2 [14:16:14.191] SSH Resolver called for "ssh-remote+mac-mini", attempt 1 [14:16:14.192] "remote.SSH.useLocalServer": false [14:16:14.192] "remote.SSH.useExecServer": true [14:16:14.192] "remote.SSH.showLoginTerminal": false [14:16:14.192] "remote.SSH.remotePlatform": {"mac-dev":"macOS","mac-mini":"macOS","mac-air":"macOS"} [14:16:14.192] "remote.SSH.path": undefined [14:16:14.192] "remote.SSH.configFile": undefined [14:16:14.192] "remote.SSH.useFlock": true [14:16:14.192] "remote.SSH.lockfilesInTmp": false [14:16:14.192] "remote.SSH.localServerDownload": auto [14:16:14.192] "remote.SSH.remoteServerListenOnSocket": false [14:16:14.192] "remote.SSH.showLoginTerminal": false [14:16:14.192] "remote.SSH.defaultExtensions": [] [14:16:14.192] "remote.SSH.loglevel": 2 [14:16:14.193] "remote.SSH.enableDynamicForwarding": true [14:16:14.193] "remote.SSH.enableRemoteCommand": false [14:16:14.193] "remote.SSH.serverPickPortsFromRange": {} [14:16:14.193] "remote.SSH.serverInstallPath": {} [14:16:14.194] VS Code version: 1.88.1 [14:16:14.194] Remote-SSH version: remote-ssh@0.111.2024040515 [14:16:14.194] win32 x64 [14:16:14.197] SSH Resolver called for host: mac-mini [14:16:14.197] Setting up SSH remote "mac-mini" [14:16:14.200] Using commit id "e170252f762678dec6ca2cc69aba1570769a5d39" and quality "stable" for server [14:16:14.203] Install and start server if needed [14:16:14.207] Checking ssh with "C:\Python312\Scripts\ssh.exe -V" [14:16:14.209] Got error from ssh: spawn C:\Python312\Scripts\ssh.exe ENOENT [14:16:14.209] Checking ssh with "C:\Python312\ssh.exe -V" [14:16:14.209] Got error from ssh: spawn C:\Python312\ssh.exe ENOENT [14:16:14.209] Checking ssh with "C:\Program Files\Oculus\Support\oculus-runtime\ssh.exe -V" [14:16:14.210] Got error from ssh: spawn C:\Program Files\Oculus\Support\oculus-runtime\ssh.exe ENOENT [14:16:14.211] Checking ssh with "C:\Python311\Scripts\ssh.exe -V" [14:16:14.211] Got error from ssh: spawn C:\Python311\Scripts\ssh.exe ENOENT [14:16:14.211] Checking ssh with "C:\Python311\ssh.exe -V" [14:16:14.212] Got error from ssh: spawn C:\Python311\ssh.exe ENOENT [14:16:14.212] Checking ssh with "C:\Windows\system32\ssh.exe -V" [14:16:14.213] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [14:16:14.213] Checking ssh with "C:\Windows\ssh.exe -V" [14:16:14.214] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [14:16:14.214] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [14:16:14.215] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [14:16:14.215] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [14:16:14.215] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [14:16:14.216] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [14:16:14.234] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4. [14:16:14.235] > 3
[14:16:14.237] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 53751 "mac-mini" bash [14:16:14.239] Terminal shell path: C:\Windows\System32\cmd.exe [14:16:14.639] > 2f25f81c3c42: running
[14:16:14.702] Remote server is listening on port 49170 [14:16:14.702] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":49170},"osReleaseId":"Darwin","arch":"arm64","sshAuthSock":"","display":"","tmpDir":"/tmp","platform":"macOS","execServerToken":"1a1111aa-111a-1111-1a11-11a1aa11a111"},"serverStartTime":0,"installUnpackCode":""} [14:16:14.702] Note: Support for architecture "arm64" is in preview [14:16:14.704] Starting forwarding server. local port 53753 -> socksPort 53751 -> remotePort 49170 [14:16:14.705] Forwarding server listening on port 53753 [14:16:14.705] Waiting for ssh tunnel to be ready [14:16:14.706] [Forwarding server port 53753] Got connection 0 [14:16:14.707] Tunneled port 49170 to local port 53753 [14:16:14.707] Resolved "ssh-remote+mac-mini" to "port 53753" [14:16:14.712] Initizing new exec server for ssh-remote+mac-mini [14:16:14.713] Resolving exec server at port 53753 [14:16:14.729] > [14:16:14.730] [Forwarding server port 53753] Got connection 1 [14:16:14.738] Exec server for ssh-remote+mac-mini created and cached [14:16:14.740] ------
[14:16:14.747] [server] Checking /Users/elias/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/log.txt and /Users/elias/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/pid.txt for a running server... [14:16:14.747] [server] Found running server (pid=1007)