Skip to content

e2e: an iframe load cut off by the test's own navigation is not a browser problem - #56

Merged
reoring merged 1 commit into
mainfrom
fix/preview-probe-abort-flake
Dec 4, 2026
Merged

reoring merged 1 commit into
mainfrom
fix/preview-probe-abort-flake

Conversation

@reoring

@reoring reoring commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Problem

main run 47333414898 (e0b4fba, a comment-only change) failed app-build-ai.mock.spec.ts:137 with

Browser problems (1): transport failure net::ERR_ABORTED: GET …/dev-workspaces/ws-0006/proxy/preview/ (fetch)

The PR run of the same change passed. This is a third cause, separate from #54.

Cause

From the failing trace: the second builder tab's preview iframe started loading its document at 82924.75 ms, and the story's reload() began at 82931 ms, 6 ms later. The iframe load was cut off (status 200, net::ERR_ABORTED, sec-fetch-dest: iframe).

The collector handled that failure as follows:

  1. The navigation scope excluded every document request, an iframe's included.
  2. The frame-removed rule applies only if the frame is already detached when the failure event arrives. Here it was not.
  3. The failure therefore joined the aborted reads that are paired, by URL, with the cancellations the page reports for its own fetch calls. The preview probe fetch uses the same URL, so the iframe took one probe's report (4 aborted GETs, 3 reports) and a probe was left as the reported problem.

Whether step 2 holds depends on event order, hence the intermittent failure.

Change (e2e/support/browser-problems.ts)

  • The navigation scope covers an iframe's document load: it is a read of the page the test is navigating. The page's own document load stays judged. The frame's parent is kept after detach, so this no longer depends on event order.
  • Only fetch requests are paired with the page's cancellation reports, which only fetch produces.

README describes both rules.

Verification

  • The story 6 times with the change: all pass; the cut-off iframe load is counted as navigationDiscarded (4 of 6 runs had one), never against the probes.
  • Full suite once locally: 87 passed (9.4 min). typecheck:e2e: clean.

Not reproduced: the exact failing order (failure event before detach) could not be forced locally; before the change the same story passed 3 of 3 here. The cause is read from the CI trace.

…wser problem

main run 47333414898 failed app-build-ai:137 with ERR_ABORTED on the preview probe.
The story reloaded 6 ms after the preview iframe started loading. The collector judged
the aborted iframe document only by whether its frame was already detached when the
failure event arrived; when it was not, the failure was paired by URL with the page's
fetch cancellations and took the report of a preview probe of the same URL.

- The navigation scope covers an iframe's document load; the page's own load stays judged.
- Only fetch reads are paired with the page's cancellation reports.
@reoring
reoring merged commit 9010278 into main Dec 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant