fix(cli): surface HYPERFRAMES_BROWSER_PATH hint on Windows chrome-headless-shell launch crashes#2481
Open
vanceingalls wants to merge 1 commit into
Open
fix(cli): surface HYPERFRAMES_BROWSER_PATH hint on Windows chrome-headless-shell launch crashes#2481vanceingalls wants to merge 1 commit into
vanceingalls wants to merge 1 commit into
Conversation
…dless-shell launch crashes Field feedback (#hyperframes-cli-feedback ts=1784116246, win32/x64, CLI 0.7.58) hit `Failed to launch the browser process ... Code: 3221225595` with no stderr. Exit code 3221225595 = 0xC0000409 = STATUS_STACK_BUFFER_OVERRUN, a Windows stack- corruption fatal from the pinned chrome-headless-shell binary. The reporter recovered by pointing HYPERFRAMES_BROWSER_PATH at system Chrome; render then used the screenshot fallback and produced the MP4 cleanly. The generic "Try --docker" hint the CLI already emits didn't name that env var, so the workaround was undiscoverable. Add a Windows-scoped launch-crash remediation sibling to `chromeLaunchRemediation` (Linux, `linuxDeps.ts`) and `wrapDownloadFailureWithBrowserPathHint` (download-time, `manager.ts` — #2443). Fresh concrete case for the #2078 lineage (closed with explicit invite to resubmit on a concrete case). - New `packages/cli/src/browser/windowsCrash.ts` — `isWindowsChromeCrashError` gates on Puppeteer's `Failed to launch the browser process` wrapper AND the specific crash code (decimal `3221225595`, hex `0xC0000409`, or symbol `STATUS_STACK_BUFFER_OVERRUN`), so unrelated Windows launch failures don't mis-fire this hint. `windowsChromeCrashRemediation` returns the actionable block scoped to win32. - `render.ts` `handleRenderError` calls it after the existing `chromeLaunchRemediation` (Linux) check; both fall through to the generic errorBox if neither matches. - Tests: 9 vitest cases covering positive matches on all three code forms, negative on Linux-shared-lib launch failures, negative on the code alone without the launch wrapper, and off-platform / non-launch short-circuits. — Via
miga-heygen
reviewed
Jul 15, 2026
miga-heygen
left a comment
Contributor
There was a problem hiding this comment.
Review — #2481 fix(cli): surface HYPERFRAMES_BROWSER_PATH hint on Windows chrome-headless-shell launch crashes
Verdict: LGTM — clean, focused, well-tested sibling to #2443.
SSOT check
HYPERFRAMES_BROWSER_PATH remediation now surfaces from three distinct failure modes:
| Trigger | File | Detection |
|---|---|---|
| Download failure | manager.ts (#2443) |
installWithCorruptArchiveRecovery catch |
| Windows launch crash | windowsCrash.ts (this PR) |
Puppeteer wrapper + STATUS_STACK_BUFFER_OVERRUN |
| Linux missing libs | linuxDeps.ts |
Shared-lib error pattern |
Each has genuinely different detection logic and platform-specific remediation text. No duplicated decisions.
Code review
- Detection gating — correctly requires BOTH the Puppeteer
Failed to launch the browser processwrapper AND one of the three crash-code forms (decimal3221225595, hex0xC0000409, symbolSTATUS_STACK_BUFFER_OVERRUN). Prevents mis-firing on unrelated Windows launch failures that need different remediation. - Platform guard —
windowsChromeCrashRemediationreturnsundefinedoff Windows. Usesset(Windows env syntax) instead ofexport. Consistent. - Windows Chrome path —
C:\Program Files\Google\Chrome\Application\chrome.exematchesbrowserPathHintForPlatform()from #2443. Consistent. - Integration point — slotted immediately after the existing
chromeLaunchRemediation(Linux) inhandleRenderError. Clean ordering: Linux check → Windows check → generic fallback. - File separation —
windowsCrash.tsparallel tolinuxDeps.ts. Single responsibility. The comment about bikeshedding when a third platform arrives is practical.
Tests
9 cases: all three positive forms (decimal/hex/symbol), three negatives (no crash code, no launch wrapper, unrelated error), three windowsChromeCrashRemediation negatives (off-platform, non-launch, missing code). Good coverage.
No blockers. Ship it.
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a Windows-scoped launch-crash remediation to
handleRenderErrorinpackages/cli/src/commands/render.ts. When the pinnedchrome-headless-shellbinary fails to launch withSTATUS_STACK_BUFFER_OVERRUN(exit0xC0000409/3221225595), surface a scopederrorBoxthat namesHYPERFRAMES_BROWSER_PATHwith an actionable per-platform example — same remediation as the download-time hint (#2443) and the closed-with-invite arm64 macOS sibling (#2078), different trigger + platform.Why
Field feedback in
#hyperframes-cli-feedback— message ts1784116246,win32/x64, HyperFrames CLI0.7.58— hit the exact errorFailed to launch the browser process ... Code: 3221225595with no stderr. Exit code3221225595==0xC0000409==STATUS_STACK_BUFFER_OVERRUN, a Windows stack-corruption fatal reported against the pinnedchrome-headless-shellbinary on some Win10/Win11 hosts (typically pre-24H2 or particular AV/EDR combinations). The reporter recovered by pointingHYPERFRAMES_BROWSER_PATHat their system Google Chrome; the render then used the screenshot fallback and produced a complete MP4.The CLI's generic post-render hint (
Try --docker, etc.) doesn't name that env var, so the workaround is undiscoverable unaided. Same discoverability issue #2443 solved for the download-time failure mode; this is its launch-time sibling on Windows.#2078 is the arm64-macOS sibling, closed 2026-07-14 with an explicit invitation: "Please reopen or resubmit against current main if the need is still concrete." This report is that fresh concrete case — distinct platform (win32/x64 vs darwin/arm64), distinct exit code (
0xC0000409vs SIGTRAP/EXC_BREAKPOINT), same remediation surface.How
packages/cli/src/browser/windowsCrash.ts— exportsisWindowsChromeCrashError(errorMessage)andwindowsChromeCrashRemediation(errorMessage). The detector requires BOTH the Puppeteer wrapper text (Failed to launch the browser process) AND the specific crash-code signal (decimal3221225595, hex0xC0000409, or symbol nameSTATUS_STACK_BUFFER_OVERRUN) so unrelated Windows launch failures — which need different remediation — don't mis-fire this hint.windowsChromeCrashRemediationreturnsundefinedoff Windows.render.tshandleRenderErrorinvokeswindowsChromeCrashRemediation(message)immediately after the existingchromeLaunchRemediation(Linux) check. Neither matching → fall through to the genericerrorBox("Render failed", ...). Linux path is untouched; the download-time wrap inmanager.ts(fix(cli): surface HYPERFRAMES_BROWSER_PATH hint on pinned browser download failures #2443) is untouched.linuxDeps.tsfor the Linux launch-side; new file for Windows-side to preserve single-responsibility. Bikeshed name in a follow-up if a third platform arrives.Net diff: +132 / -0 across 3 files.
Test plan
packages/cli/src/browser/windowsCrash.test.ts(9 vitest cases):chromeLaunchRemediation)bunx vitest run src/browser/windowsCrash.test.ts— 9 passedbunx oxlint packages/cli/src/browser/windowsCrash{,\.test}.ts packages/cli/src/commands/render.ts— 0 warnings 0 errorsbunx oxfmt— clean on all three filesEnterprise release / feature flag holdout
UX/Screenshot recording
— Via