Skip to content

test(e2e): name the load that never answered - #15

Merged
arloliu merged 1 commit into
mainfrom
test/browser-report-loading-failures
Aug 30, 2026
Merged

test(e2e): name the load that never answered#15
arloliu merged 1 commit into
mainfrom
test/browser-report-loading-failures

Conversation

@arloliu

@arloliu arloliu commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What

session.report() printed the requests the page sent as method and URL. It said nothing about whether any of them got an answer, so a fetch the network broke and a fetch the page abandoned read identically.

The session now subscribes Network.loadingFailed and keeps each failed load's reason, keyed by the request id. The report prints the reason beside the URL:

requests: 18 (1 failed)
  GET https://gateway/v1/limits -- no answer: canceled: net::ERR_ABORTED

Why it matters

Chrome cancels every in-flight load when the page leaves for another document, so a navigation shows up as canceled:. A broken connection shows the transport error without the prefix. That is the discriminator the console-oidc failure needs and does not currently have: today its report can say where the browser went, but not whether a panel fetch died at the transport on the way.

How it was verified

The instrument was made to fire before being kept: an aborted fetch in console-basic produced the line quoted above, correlated back to the right URL. The probe was then removed and both console scenarios pass against a live cluster (ok github.com/arloliu/profgate/test/e2e 63.139s). mise run check, mise run lint and mise run prose are clean.

Scope

Instrument only. No scenario, no product code, and no assertion changes.

A console scenario that fails on a control it cannot find prints the requests the page sent.
Those requests said only that the page asked for something, never whether it got an answer,
so a fetch the network broke and a fetch the page abandoned looked alike: both are a URL in a list.

The session now subscribes the browser's loadingFailed event and keeps what each failed load reported,
keyed by the request id the browser uses for every later event about a request.
The report prints that reason beside the URL it was for.

Chrome cancels every load still in flight when the page leaves for another document,
so the reason carries a canceled prefix when it does.
That prefix is what separates a page that navigated away from a connection that broke under it.

Proved by aborting one fetch mid-flight, against which the report reads
"GET https://gateway/v1/limits -- no answer: canceled: net::ERR_ABORTED".
@arloliu
arloliu merged commit f6f1e1f into main Aug 30, 2026
6 checks passed
@arloliu
arloliu deleted the test/browser-report-loading-failures branch August 30, 2026 13:11
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