Skip to content

fix(updater): give the Windows installer signature check 120 s instead of 20 s - #43005

Open
sibrash4 wants to merge 1 commit into
stablyai:mainfrom
sibrash4:fix/windows-updater-signature-timeout
Open

sibrash4 wants to merge 1 commit into
stablyai:mainfrom
sibrash4:fix/windows-updater-signature-timeout

Conversation

@sibrash4

Copy link
Copy Markdown
Contributor

ELI5

Before Windows installs an update, Orca checks that the installer is really signed by us. On slower PCs that check takes longer than the 20 seconds it was allowed, so a valid update was thrown away. This gives the check 120 seconds.

What Changed

Before: on slower Windows PCs the update downloads, then fails with Command failed: ... Get-AuthenticodeSignature ..., every time. The user can't update in the app.

After: the same check gets up to 120 s to finish, and the update installs.

Mechanism: electron-updater's windowsExecutableCodeSignatureVerifier.js runs Get-AuthenticodeSignature through execFile with a hardcoded timeout: 20 * 1000. When the timer fires, execFile kills PowerShell and the verifier rejects the update. A pnpm patch (config/patches/[email protected]) changes that one value to 120 * 1000. Nothing else in the verifier changes.

Why

The issue measured the check on a 225 MB installer at 15.0 s, 42.2 s and 30.6 s. Every run returned Status: Valid with the expected signer. About 5 s of that is Windows PowerShell start-up, and the rest is verifying a file that size, so 20 s leaves no margin. 120 s is about 3x the slowest run seen.

Alternatives considered:

  • Overriding verifyUpdateCodeSignature with our own verifier. Rejected: updater-setup.ts says not to do this, and a second verifier is more security-sensitive code to own than one constant.
  • Skipping or softening the check on timeout. Rejected: it would accept installers we couldn't verify.

The electron-updater timeout isn't configurable, so a patch is the smallest change. If electron-updater is upgraded, pnpm fails the install until the patch is re-applied, so it can't be dropped by accident.

Linked Issue

Fixes #42900

Visual Proof

N/A. There are no UI changes. The change only affects how long the existing signature check may run before it's killed.

Testing

  • pnpm install --frozen-lockfile from a clean install applies the patch. The installed windowsExecutableCodeSignatureVerifier.js has 120 * 1000.

  • pnpm check:changed passed all 50 checks.

  • Not tested on Windows. I don't have a slow Windows PC that reproduces the timeout. The reporter's timings above show the check finishes well within 120 s.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

No test added. A test would only assert a constant in a third-party file, which the anti-patterns doc rules out.

Risk

Level: Low

  • Security: unchanged. The Authenticode status check, the path check and the publisher-name match all still run. An unsigned or wrongly signed installer is still rejected.
  • When PowerShell really hangs (for example an EDR or a stalled revocation lookup), the user now waits up to 120 s instead of 20 s before seeing the existing "signature check could not run" error.
  • Windows only. macOS and Linux don't run this code path. SSH and mobile aren't affected.
  • Back out with a plain revert.

AI Disclosure

Written with Kiro (Claude). I reviewed the change and the PR text.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Windows Authenticode signature verification command in electron-updater now has a 120-second timeout instead of 20 seconds. The workspace configuration registers the patch for [email protected].

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 45abb · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Windows installer signature check timeout goes from 20 s to 120 s in the electron-updater patch. It uses the conventional fix(scope) prefix and matches the changes…
Description check Passed The description follows the repository template. It has ELI5, What Changed, Why, Linked Issue (Fixes #42900), Visual Proof (N/A with reason), Testing, Performance, Risk (Level: Low), AI Disclosure, Re…
Linked Issues check Passed [#42900] The reported failure is the hardcoded 20 s timeout in electron-updater's Windows Authenticode check (windowsExecutableCodeSignatureVerifier.js). The whole-PR summary shows `config/patches/e…
Out of Scope Changes check Passed The whole-PR changes, per the summary, are config/patches/[email protected] (+13 lines, timeout value change only) and pnpm-workspace.yaml (a patchedDependencies entry for `electron-…
Full details: Title check

Explanation

The title names the main change: the Windows installer signature check timeout goes from 20 s to 120 s in the electron-updater patch. It uses the conventional fix(scope) prefix and matches the changeset and linked issue #42900.

Full details: Description check

Explanation

The description follows the repository template. It has ELI5, What Changed, Why, Linked Issue (Fixes #42900), Visual Proof (N/A with reason), Testing, Performance, Risk (Level: Low), AI Disclosure, Review, Notes, and Checklist sections. Testing is explicit that the change was not tested on Windows, and the reason is stated. The Performance section reads 'None, because' with the reason cut off, which is a minor gap.

Full details: Linked Issues check

Explanation

[#42900] The reported failure is the hardcoded 20 s timeout in electron-updater's Windows Authenticode check (windowsExecutableCodeSignatureVerifier.js). The whole-PR summary shows config/patches/[email protected] changes that timeout from 20 * 1000 to 120 * 1000, with no other verifier logic changed. The issue reports measured check times of 15.0 s, 42.2 s and 30.6 s for a 225 MB installer, each returning a valid signer. A 120 s limit exceeds the slowest measured run by about 3x. The issue lists a longer-timeout verifier as a possible fix and does not require a specific approach, so this patch meets the stated outcome. The signature status, path and publisher checks still run. Limits: the change was not tested on Windows, and no automated test was added. The issue does not require a test. pnpm-lock.yaml is excluded from review (ignored_files), so its lock entry was not inspected. This does not change the result, because the patch file and its pnpm-workspace.yaml registration were reviewed through the summary.

Full details: Out of Scope Changes check

Explanation

The whole-PR changes, per the summary, are config/patches/[email protected] (+13 lines, timeout value change only) and pnpm-workspace.yaml (a patchedDependencies entry for [email protected] plus a comment that documents the 20 to 120 second change). Both files directly implement the #42900 objective. No unrelated files or behavior changes appear in the summary. The excluded pnpm-lock.yaml is the generated lock entry for the patch; its content was not inspected. The summary does not show changes since the previous review that alter this result.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bac586ff-25a0-4c89-8e7b-d1cbe5af66b7
Commits

Reviewing files that changed from the base of the PR and between 623b7ca and 45abbcf.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 1

  • pnpm-workspace.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@sibrash4
sibrash4 force-pushed the fix/windows-updater-signature-timeout branch from 75f77c9 to b3488a2 Compare November 24, 2026 08:27
…d of 20 s

electron-updater kills Get-AuthenticodeSignature after 20 s. On slower PCs the
check of the ~225 MB installer takes 15-42 s, so valid updates fail. Patch the
timeout only; the Authenticode and publisher checks are unchanged.

Fixes stablyai#42900

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows update fails: installer signature check exceeds the 20 s electron-updater timeout

1 participant