Remote SSH: incomplete extraction is treated as an installed server, preventing recovery after upgrades

Open Beginner friendly
#17,249 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, linux, typescript
Domain
backend, devtools

Research direction

Read extensions/open-remote-ssh/src/serverSetup.ts around lines 461–507, especially the installation guard and download/extraction branch. The issue includes a launcher-only fixture and reports that generateBashInstallScript fails twice; use that reproduction to inspect recovery behavior. Done means an incomplete installation is detected and reinstalled, with the requested server starting successfully.

Written by the indexing model from the issue text.

Description

area: remote host bug support

System details

Positron and OS details
  • Positron 2026.11.1 build 4; commit e915bbd8bcb9a26b119ab8fbbec94db5bdf53265.
  • Code OSS 1.138.0.
  • Client: Windows desktop, using bundled Remote SSH.
  • Remote: RHEL Linux, x86_64, glibc 2.34. The affected home directory is NFS-backed.
Session details

The failure occurs before an R or Python session starts.

Describe the issue

Remote SSH has repeatedly stopped working after desktop upgrades. In the latest occurrence, a corrupt server archive had been partially extracted: bin/positron-server existed, but node, product.json, and out/server-main.js were missing.

On reconnect, the installer treated the presence of the launcher as a completed installation and skipped downloading/extracting the server. Every subsequent attempt failed at startup instead of repairing the incomplete installation.

This appears to be a partial-extraction recovery case related to #8848, which was closed as fixed. The current script does remove previous downloads, but that cleanup is inside the branch that only runs when the launcher is absent.

Relevant released source: installation guard and download/extraction branch.

Steps to reproduce the issue

This deliberately constructs the incomplete-installation state. It does not claim to reproduce the original download corruption. Use a test SSH connection; the normal installation is not modified.

  1. Establish a working Remote SSH connection with the matching Positron build, so its server launcher is available on the Linux host.

  2. On that host, copy only the genuine launcher into a separate temporary server-data directory:

    commit=e915bbd8bcb9a26b119ab8fbbec94db5bdf53265
    launcher="$HOME/.positron-server/bin/$commit/bin/positron-server"
    test -x "$launcher" || { echo "First install the matching server normally"; exit 1; }
    repro_dir="$(mktemp -d /tmp/positron-partial-install.XXXXXX)"
    mkdir -p "$repro_dir/bin/$commit/bin"
    cp -- "$launcher" "$repro_dir/bin/$commit/bin/positron-server"
    printf 'Temporary server-data directory: %s\n' "$repro_dir"
    
  3. In Windows Positron's user settings, set remoteSSH.serverInstallPath for the SSH alias used for the test. Substitute that alias and the directory printed above:

    "remoteSSH.serverInstallPath": {
      "<test-ssh-alias>": "<printed-temporary-directory>"
    }
    
  4. Connect to that SSH alias. The installer reports the launcher is already installed, then fails because the runtime and metadata are missing.

  5. Reconnect. The same failure occurs; the incomplete installation is still not repaired.

Remove the test setting afterward. Only the temporary directory is disposable; there is no need to remove the normal .positron-server directory.

The corresponding released generateBashInstallScript was also invoked directly twice against a launcher-only fixture on local /tmp. Both attempts reported exitCode==1== and left the required files missing. This verifies the installer-side recovery failure independently of the NFS-backed home directory; it does not reproduce the upgrade/download event.

Expected or desired behavior

Detect an incomplete installation and reinstall the requested server automatically. A launcher file alone should not be sufficient evidence that extraction finished successfully.

Error messages and diagnostic evidence

Anonymized output from the controlled installer reproduction:

Server script already installed in <repro-dir>/server/bin/e915bbd8bcb9a26b119ab8fbbec94db5bdf53265/bin/positron-server
Error server did not start successfully
exitCode==1==
listeningOn====
serverCommit====
serverVersion====

The server log reports:

<repro-dir>/server/bin/e915bbd8bcb9a26b119ab8fbbec94db5bdf53265/bin/positron-server: line 22: <repro-dir>/server/bin/e915bbd8bcb9a26b119ab8fbbec94db5bdf53265/node: No such file or directory

In the original affected installation:

  • gzip -t reported invalid compressed data--format violated.
  • The retained archive was 1,653,822,627 bytes, exactly three times the official CDN Content-Length of 551,274,209 bytes.
  • A fresh download of the same release passed archive validation, contained the missing files, and restored server startup after replacement.

The reason the original archive became corrupt is not established. The threefold size is diagnostic evidence, not proof of a particular retry, proxy, or network bug.

Prepared with GPT-6.1 Sol through GitHub Copilot CLI 1.0.109, based on an actual reported failure and an isolated reproduction.

Dominant language
TypeScript
Stars
4.4k
Forks
207
Avg merge
1d 16h
Merged PRs (30d)
308

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from posit-dev/positron

All issues in posit-dev/positron

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.