fix(e2e): relaunch when the renderer comes up without a frame pipeline - #660
Merged
Conversation
About one launch in four on a self-hosted Windows runner comes up with no frame production at all: the DOM reads perfectly healthy under page.evaluate -- correct geometry, nothing covering the element -- while requestAnimationFrame never fires. Playwright's actionability check compares an element's bounding box across two rAF callbacks, so the first click of every spec hung for 30s on "waiting for element to be visible, enabled and stable", with no "intercepts pointer events" in the trace to explain it. The state never recovers. Forcing show/focus/moveTop moves isFocused but leaves the window at 0 fps, and window visibility, minimised state and focus read identically on stalled and healthy windows, so there is nothing to wait for and nothing to poke. Relaunching is the only remedy. Gate the fixture on a real animation frame and relaunch when one does not arrive, up to five times -- stalls are independent between launches, so five attempts put an all-stalled run near 0.1%, and a relaunch reuses the warm HOME rather than repeating the runtime download. Also move the first-run dismissal from the page to the context, where it lands before the main window's first load. That drops the reload round trip the page fixture needed to apply it. app and page now read from one internal fixture so both refer to the same proven launch. Measured over 19 launches on the affected box: 5 stalls, all recovered, 14/14 specs passing, zero click timeouts, zero reloads.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
About one launch in four on a self-hosted Windows runner comes up with no frame production at all. The DOM reads perfectly healthy under
page.evaluate— correct geometry, nothing covering the element — whilerequestAnimationFramenever fires.Playwright's actionability check compares an element's bounding box across two rAF callbacks, so the first click of every spec hung for 30s on:
intercepts pointer eventsnever appears, andelement is visible, enabled and stablenever prints. There is nothing in the trace to explain it.Why relaunching, and not waiting or retrying
The state never recovers. Measured on the affected machine:
show+moveTop+focusmovesisFocused0→1 but leaves the window at 0 fps, 4/4, and the click still fails.isVisible,isMinimizedandisFocusedread identically on stalled and healthy windows.There is nothing to wait for and nothing to poke, so a longer timeout or a Playwright-level retry only spends more time on a launch that cannot succeed. Chromium switches were ruled out too: this box has group policy injecting
disable-features, which silently replaces anything passed on the command line.Changes
All in
e2e/fixtures.ts; no product code.producesFrames(page)— wait for one rAF callback; 10s without one means this launch has no frame pipeline.launcherfixture — launch, get the main window, verify frames; relaunch up to 5 times otherwise. Stalls are independent between launches, so five attempts put an all-stalled run near 0.1%, and a relaunch reuses the warm HOME rather than repeating the runtime download. Every failure path closes its candidate — an abandoned Electron process holds the isolated HOME open and poisons the next attempt.appandpagenow read from one internal fixture, so both refer to the same proven launch.Verification
19 launches on the affected machine:
nav-installclick timeoutsSlowest recovery added ~2 min to a spec budgeted 15.
Scope
This does not fix the
claudeandopencodeWindows failures that have been red on the nightly for over a week — those are a separate, real defect on a different code path. After this lands they will still fail, but with a legible reason instead of an unexplained 30s timeout.