Skip to content

fix(e2e): give render enough time to mount the first WebView - #123

Open
CAMOBAP wants to merge 1 commit into
masterfrom
fix/e2e-render-mount-timeout
Open

CAMOBAP wants to merge 1 commit into
masterfrom
fix/e2e-render-mount-timeout

Conversation

@CAMOBAP

@CAMOBAP CAMOBAP commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

The problem

The Android e2e job fails on master and on every PR run:

● native WebView prewarm › accepts idle SDK readiness after the loading deadline
  Render timeout: Element did not mount within 1000ms

It isn't the prewarm logic. The test never gets past render.

Why

None of the render calls in prewarm.harness.js, example.harness.js or
authFlow.harness.js pass a timeout, so each uses the harness default of 1s.

The failing test is the first in its file. Its render creates the process's first native WebView,
and on the CI Android emulator that cold start takes longer than a second. Later renders get a
warm WebView and fit inside 1s. That's why only this one test fails, why it fails every time, and
why iOS (faster WebView creation) never hits it.

darkTheme.harness.js has always passed a 10s mount timeout, which is why it never hit this.

Change

Every render in the three suites now passes a 10s mount timeout (MOUNT_OPTIONS), not just the
failing one, so a change in test order can't move the failure to another test. What the tests
assert is unchanged.

Not covered

example.harness.js › opens, dismisses, and reopens the live demo challenge also failed once on
master's Android run with a different error (expected [] to have a length of 1). It talks to the
live hCaptcha demo and passed on the two PR runs since, so it looks like network flakiness, not
this bug.

Unblocks the e2e checks on #120.

🤖 Generated with Claude Code

The Android e2e job fails `prewarm › accepts idle SDK readiness after the
loading deadline` on master and on every PR run with `Render timeout: Element
did not mount within 1000ms`. No `render` call in the prewarm, example or auth
flow suites passed a timeout, so each used the harness default of 1s. The
failing test is the first in its file: its render creates the process's first
native WebView, which on the CI Android emulator takes longer than that. Later
renders get a warm WebView and fit, which is why only that one test fails and
iOS never does.

Every render in those suites now passes a 10s mount timeout, matching the dark
theme suite, so a change in test order cannot move the failure elsewhere. What
the tests assert is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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