Repository navigation
fix(electron): do not drop windows that have not navigated while connecting - #43250
Merged
Merged
Conversation
…ecting When connecting, pages without a renderer are probed with Inspector.enable and dropped as crashed or discarded. An Electron window that has not navigated yet has no renderer either, so a packaged app, which creates its windows while Playwright is still connecting, lost its first window. Only probe pages that have a url. Fixes: #43247
Pavel Feldman (pavelfeldman)
marked this pull request as ready for review
October 9, 2026 16:17
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Instead of checking the target url, do not send Inspector.enable to Electron windows. An Electron window that has not navigated yet has no renderer, but it is not crashed.
Pavel Feldman (pavelfeldman)
force-pushed
the
fix-43247
branch
from
October 9, 2026 17:49
213efb0 to
a6ef516
Compare
Dmitry Gozman (dgozman)
approved these changes
Oct 9, 2026
Pavel Feldman (pavelfeldman)
added a commit
that referenced
this pull request
Oct 9, 2026
… navigated while connecting
Contributor
Test results for "tests 1"5 flaky52153 passed, 1261 skipped Merge workflow run. |
Contributor
Test results for "MCP"1 failed 9112 passed, 1495 skipped Merge workflow run. |
Contributor
|
Hi, I'm the Playwright bot and I took a first look at the CI failure. 🟢 The failure is a confirmed pre-existing flakeThe same Windows Firefox test failed with the same assertion on six other SHAs before this PR and passed on 104 of 111 recent runs. This PR changes Chromium connection and Electron code, not the failing Firefox MCP path. DetailsThe CI failure is not likely caused by this PR. Pre-existing flake / infra
Triaged by the Playwright bot - agent run |
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.
While connecting, #42936 and #43075 send
Inspector.enableto each page. A page without a renderer (crashed or discarded) then reportsInspector.targetCrashedand is dropped instead of stalling the connection. But an Electron window that has not navigated yet has no renderer either. Packaged apps are launched without our loader, so theirreadyhandler creates windows while Playwright is still connecting. Such a window is reported as crashed and dropped, andfirstWindow()times out.Inspector.enablewhile connecting to Electron.Ref: #43247