Repository navigation
fix(cli): a page whose renderer crashes fails at once, named as the crash - #6598
Merged
Merged
Conversation
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 116 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 1ec5660f
I was asked to review 8f8126c1, but that head failed Comments (the comment-share ratchet on launch.ts and errorMessage.ts). The new head 1ec5660f removes those comments and inlines messageOf, which only names the crash for Error instances (Puppeteer rejects with those). I reviewed that delta, and this approval covers 1ec5660f only.
Scope and checks
- Every CLI page is created through
launchOwnedBrowser'snewPage; no CLI code creates pages throughcreateBrowserContextorpages(). ThefailWhenPageDieshandler incheckBrowseris registered aftercloseOnRendererCrash, socheckstill rejects with "The page crashed" from the same emit. No caller matches onTarget closedtext, so the prefix breaks nothing. The process-wide flag is called out in the body, and the only long-lived CLI process (warm check) serves one request. - Ran locally: the new crash test passed 3 of 3 runs together with
browserFallback. Withlaunch.tsreverted to main, it times out at 60 s. - CI on
1ec5660fis all green: CI, Windows render verification, Comments, regression, preview-regression, PR captures and CodeQL.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 27, 2026
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 changes
When a page's renderer crashes (most often out of memory, for example a composition with hundreds of video clips), Puppeteer emits a page
errorevent and nothing else. Every call still pending on that page waits for the protocol timeout (180 s by default). The command then fails withRuntime.callFunctionOn timed out, which says nothing about the crash.Now:
launchOwnedBrowser, the one owner of CLI browsers, which wrapsbrowser.newPagethe same waylaunchCaptureBrowseralready does.snapshot,check,layout,validateand capture all get it.normalizeErrorMessagenames the follow-on close errors (Target closed,detached Frame,Session closed):On a composition with 400 clips cut from one long 720p source, the renderer grows past 7 GB and crashes about 15 s in.
snapshotused to fail after 180 s or more with the timeout message. With this change it fails with the crash named, in under 30 s.Limits
Tests
captureCompositionFrame.pageCrash.browser.test.ts. It opens a real composition page throughopenSettledCompositionPage(the pathsnapshotandcheckuse), leaves a call pending, crashes the renderer withPage.crashand expects a named rejection within 10 s.launch.tsanderrorMessage.tsreverted to main, it times out at 60 s.browserFallback.test.tsgainsonce.Why under 100 lines
P0 crash fix, ships alone so the Desktop pin can take it today.