Skip to content

Say why a navigation wait timed out - #60

Merged
Mpdreamz merged 3 commits into
mainfrom
timeout-diagnostics
Nov 16, 2026
Merged

Mpdreamz merged 3 commits into
mainfrom
timeout-diagnostics

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

Why

A navigation timeout in CI said only that 30 s passed ("Timed out after 30s waiting for the URL to match ...", "A navigation the action started did not finish loading within 30 seconds"). Two demo/edge journey runs stalled this way at the same moment and there was nothing to tell a slow origin from a hung renderer.

What

GotoAsync, an action's navigation wait and WaitForLoadState/WaitForUrl append a Page state when it gave up: block to their TimeoutException:

  • the URL and document.readyState
  • the lifecycle events the document reached
  • the requests still in flight (oldest first, five shown, with their age)
  • the last failed or 4xx/5xx requests
  • the page's last script error

Pages now enable the Network domain when created so this is known (URLs and counts only, no headers or bodies; NetworkRecording stays the opt-in for lists and HAR). The state script is bounded to two seconds, so a hung renderer is reported as not answering and never delays the timeout. Recorded in DECISIONS.md.

Verification

Full suite passes (497). Two new live tests (a hanging image in flight; a 404 image after load). Mutated StateAsync to drop the request lines and both new tests failed; restored.

🤖 Generated with Claude Code

Mpdreamz and others added 2 commits November 16, 2026 20:09
…ght and failed

A 30 s stall in CI said only that 30 s passed. GotoAsync, an action's navigation
wait and WaitForLoadState/WaitForUrl now append the page state: URL, readyState,
lifecycle events reached, the requests still in flight with their age, the last
failed or 4xx/5xx ones, and the last script error. Pages enable the Network domain
on creation to keep that (URLs and counts only). The script is bounded to 2 s.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz Mpdreamz added the enhancement An existing capability improved (minor bump) label Nov 16, 2026
A slow runner hit the 300 ms timeout inside GotoAsync itself.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz merged commit 4096abc into main Nov 16, 2026
12 checks passed
@Mpdreamz
Mpdreamz deleted the timeout-diagnostics branch November 16, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An existing capability improved (minor bump)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant