microsoft / microsoft/vscode-remote-release

Timeout in start_server on remote is not communicated to client

Open
#10,859 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

cli ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Is there an existing issue for this bug?
  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot

I did not ask the @remote-ssh participant for help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

...
[14:41:21.662] Platform: linux
[14:41:21.666] > /bin/bash
[14:41:21.666] Parent Shell: bash
[14:41:21.666] Parent Shell pid: 7495
[14:41:21.667] Waiting for subshell to start
[14:41:21.672] > 3702013
[14:41:21.672] stdout -> '3702013'
[14:41:21.672] sub-process detected
[14:41:21.679] > 302696a65d5d: running
> Script executing under PID: 3702013
[14:41:21.689] > Found existing installation at /home/user/.vscode-server...
> Starting VS Code CLI...
[14:41:21.690] > Removing old logfile at /home/user/.vscode-server/.cli.ddc367ed5c8936efe395cffeec279b04ffd7db78.log
[14:41:21.695] > Spawned remote CLI: 3702031
[14:41:21.697] > Waiting for server log...
[14:41:21.731] > Waiting for server log...
[14:41:21.764] > Waiting for server log...
[14:41:21.799] > Waiting for server log...
[14:41:21.832] > Waiting for server log...
[14:41:21.867] > Waiting for server log...
[14:41:21.900] > Waiting for server log...
[14:41:21.933] > Waiting for server log...
[14:41:21.966] > Waiting for server log...
[14:41:22.000] > Waiting for server log...
[14:41:22.033] > Waiting for server log...
[14:41:22.067] > Waiting for server log...
[14:41:22.100] > Waiting for server log...
[14:41:22.133] > Waiting for server log...
[14:41:22.167] > Waiting for server log...
[14:41:22.201] > 302696a65d5d: start
> listeningOn====
> osReleaseId==debian==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/2897==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==509==
> execServerToken==11a111aa-aaa1-1aa1-aa1a-a1111a1111aa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK==/tmp/ssh-zll5DDTaLtZ4/agent.2000706==
> DISPLAY====
> 302696a65d5d: end
[14:41:22.202] Received install output: 
listeningOn====
osReleaseId==debian==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/2897==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==509==
execServerToken==11a111aa-aaa1-1aa1-aa1a-a1111a1111aa==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK==/tmp/ssh-zll5DDTaLtZ4/agent.2000706==
DISPLAY====
[14:41:22.204] Failed to parse remote port from server output
[14:41:22.204] Terminating local server
[14:41:22.209] Resolver error: Error: 
    at y.Create (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:742768)
    at t.handleInstallOutput (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:740849)
    at e (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:796388)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:819119
    at async t.withShowDetailsEvent (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:822810)
    at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:793100
    at async P (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:791155)
    at async t.resolveWithLocalServer (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:792652)
    at async x (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:815972)
    at async t.resolve (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:820211)
    at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.119.0/out/extension.js:2:1107798
[14:41:22.210] Local server exit: 15
[14:41:22.214] ------

Expected Behavior

At the very least, VSCode should show a modal that says Timed out waiting for VSCode server to start on "hostname". Ideally, the timeout is simply a bit longer than 15 * .03 seconds.

Actual Behavior

VSCode shows a Could not establish a connection to "hostname" message, which is not true.

Steps To Reproduce

Exceed the timeout in linux-exec-server-installer.sh, either by having a slow .bashrc or by manually delaying server startup.

Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with linux-exec-server-installer.sh and the Remote-SSH log around the repeated “Waiting for server log...” messages, then inspect how the resolver handles the empty listeningOn value and timeout. Done means a delayed server startup produces a timeout-specific client message naming the hostname, rather than the generic connection error; consider the requested timeout behavior as part of the issue’s expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, vscode
Domain
devtools, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.