microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.64k stars 285 forks source link

[Remote-SSH Bug]: Can't open a file in remote #8601

Closed mo29cg closed 1 year ago

mo29cg commented 1 year ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It connects successfully

->

No response

Expected Behavior

Open a file in macOS.

Steps To Reproduce

  1. run code -r --remote ssh-remote+mac Users/suzukisatoshi/TerminalOutputs/firstLog.json in windows powershell.
  2. it timeouts although that file exist, and code -r --remote ssh-remote+mac Users/suzukisatoshi/TerminalOutputs correctly open the folder.

Remote-SSH Log

Remote-SSH Log

``` [14:32:20.270] Log Level: 2 [14:32:20.336] SSH Resolver called for "ssh-remote+mac", attempt 1 [14:32:20.337] "remote.SSH.useLocalServer": false [14:32:20.337] "remote.SSH.showLoginTerminal": true [14:32:20.337] "remote.SSH.remotePlatform": {"192.168.3.12":"macOS","192.168.2.106":"macOS","192.168.2.154":"macOS","astar":"linux","shiden":"linux","192.168.1.192":"macOS","mac":"macOS"} [14:32:20.337] "remote.SSH.path": undefined [14:32:20.337] "remote.SSH.configFile": undefined [14:32:20.338] "remote.SSH.useFlock": true [14:32:20.338] "remote.SSH.lockfilesInTmp": false [14:32:20.338] "remote.SSH.localServerDownload": auto [14:32:20.338] "remote.SSH.remoteServerListenOnSocket": false [14:32:20.338] "remote.SSH.showLoginTerminal": true [14:32:20.338] "remote.SSH.defaultExtensions": [] [14:32:20.339] "remote.SSH.loglevel": 2 [14:32:20.339] "remote.SSH.enableDynamicForwarding": true [14:32:20.339] "remote.SSH.enableRemoteCommand": false [14:32:20.339] "remote.SSH.serverPickPortsFromRange": {} [14:32:20.340] "remote.SSH.serverInstallPath": {} [14:32:20.342] VS Code version: 1.79.0 [14:32:20.342] Remote-SSH version: remote-ssh@0.102.0 [14:32:20.342] win32 x64 [14:32:20.347] SSH Resolver called for host: mac [14:32:20.347] Setting up SSH remote "mac" [14:32:20.350] Using commit id "b380da4ef1ee00e224a15c1d4d9793e27c2b6302" and quality "stable" for server [14:32:20.352] Install and start server if needed [14:32:20.354] Checking ssh with "C:\Windows\system32\ssh.exe -V" [14:32:20.356] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [14:32:20.356] Checking ssh with "C:\Windows\ssh.exe -V" [14:32:20.357] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [14:32:20.357] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [14:32:20.357] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [14:32:20.358] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [14:32:20.358] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [14:32:20.358] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [14:32:20.381] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 [14:32:20.383] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 50017 mac bash [14:32:20.385] Terminal shell path: C:\Windows\System32\cmd.exe [14:35:42.402] Resolver error: Error: Connecting with SSH timed out at m.Timeout (c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:584271) at Timeout._onTimeout (c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:680601) at listOnTimeout (node:internal/timers:559:17) at process.processTimers (node:internal/timers:502:7) [14:35:42.409] ------ [14:35:46.204] > /Users/suzukisatoshi/.bashrc: line 7: anyenv: command not found > ]0;C:\Windows\System32\cmd.exe [14:35:46.205] Got some output, clearing connection timeout [14:35:46.224] > /Users/suzukisatoshi/.bashrc: line 7: anyenv: command not found > > > > > > > > > > > > > > > > > > > > > > > [14:35:46.250] > b843336cd323: running [14:35:46.312] > Acquiring lock on /Users/suzukisatoshi/.vscode-server/bin/b380da4ef1ee00e224a15c1d4d9793e27c2b6302/vscode-remote-lock.suzukisatoshi.b380da4ef1ee00e224a15c1d4d9793e27c2b6302 > \ln /Users/suzukisatoshi/.vscode-server/bin/b380da4ef1ee00e224a15c1d4d9793e27c2b6302/vscode-remote-lock.suzukisatoshi.b380da4ef1ee00e224a15c1d4d9793e27c2b6302.target /Users/suzukisatoshi/.vscode-server/bin/b380da4ef1ee00e224a15c1d4d9793e27c2b6302/vscode-remote-lock.suzukisatoshi.b380da4ef1ee00e224a15c1d4d9793e27c2b6302 > Found existing installation at /Users/suzukisatoshi/.vscode-server/bin/b380da4ef1ee00e224a15c1d4d9793e27c2b6302... > Checking /Users/suzukisatoshi/.vscode-server/.b380da4ef1ee00e224a15c1d4d9793e27c2b6302.log and /Users/suzukisatoshi/.vscode-server/.b380da4ef1ee00e224a15c1d4d9793e27c2b6302.pid for a running server [14:35:46.324] > Looking for server with pid: 12878 [14:35:46.367] > Found running server... > > * > * Visual Studio Code Server > * > * By using the software, you agree to > * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and > * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement). > * > [14:35:46.398] > Checking server status on port 58098 with curl > b843336cd323: start > SSH_AUTH_SOCK==== > DISPLAY==== > webUiAccessToken==== > listeningOn==58098== > osReleaseId==Darwin== [14:35:46.406] > > arch==x86_64== > vscodeArch==x64== > bitness==64== > tmpDir==/tmp== > platform==macOS== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > extInstallTime==== > serverStartTime==== > connectionToken==111aa1aa-111a-11a1-1111-1111111a1111== > b843336cd323: end [14:35:46.422] > ```

Anything else?

No response

roblourens commented 1 year ago

Missing a leading / on the path?

mo29cg commented 1 year ago

code -r --remote ssh-remote+mac /Users/suzukisatoshi/TerminalOutputs/firstLog.json it timeouts with this too.

roblourens commented 1 year ago

Oh your log looks like the same error as in https://github.com/microsoft/vscode-remote-release/issues/8586