Repository navigation
Organization browser tests: say in the log whether a lost page crashed or was closed - #2310
Merged
Merged
Conversation
…d or was closed organization-unavailable-chat has failed three times in the WebKit job with "Target page, context or browser has been closed", always in the audit log's filter step, and never on a Linux box running it hundreds of times. Playwright gives those same words whether the browser crashed the page or something closed it, so the failures said nothing of which. The shared harness for these tests now logs a line starting [browser lost] when a page crashes, when a page closes without the test closing it, or when a browser disconnects before the tests are done with it, naming the engine, the window and where the page was. The failing test's name follows those lines in the output. Nothing changes for a test that passes.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 27, 2026 08:29
…says-crash-or-close
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.
Why
organization-unavailable-chathas failed three times in the WebKit job with "Target page, context or browser has been closed", always in the audit log's filter step (jobs 139604506143, 140034085631, 140356745256). It never failed in over 600 runs on a Linux box in the CI's Playwright image, under load, or in 192 rounds of a test that styles the open filter menu again and again. Playwright gives those same words whether the browser crashed the page or something closed it, so the failures can't say which it was.What changed
The shared harness behind the organization browser tests (
app/tests/organization-notices-browser.ts) now logs a line starting[browser lost]when:crashevent),Each line names the engine, the window and where the page was. Bun gives a test no way to read its own name, so the failing test's name is the
(fail)line that follows. Playwright doesn't expose the WebKit process's exit code, so the browser line says only that it disconnected.Nothing changes for a test that passes: no retries, no waits, no assertions.
Proof
chrome://crashlogged "the page crashed", and a page the test closed, plusstop()closing the browsers, logged nothing.organization-unavailable-chat.test.tsxin Chromium and WebKit: 18 of 18 pass, and no[browser lost]line.style()and the imports in the same file; this changesstart,stopandopen.