Skip to content

fix(e2e): harden Android E2E against launcher ANR and slow cold start#84

Merged
dianaKhortiuk-frontegg merged 2 commits into
masterfrom
fix/e2e-dismiss-anr-dialog
Jun 30, 2026
Merged

fix(e2e): harden Android E2E against launcher ANR and slow cold start#84
dianaKhortiuk-frontegg merged 2 commits into
masterfrom
fix/e2e-dismiss-anr-dialog

Conversation

@dianaKhortiuk-frontegg

@dianaKhortiuk-frontegg dianaKhortiuk-frontegg commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

The Android E2E gate flakes randomly (~1 in 4 runs) across PRs — currently reding #83, dependabot/…/babel-core, and chore/bump-build-deps-security. Root cause: under CI load the emulator's launcher ANRs and the app's cold start is slow, so the app never reaches the foreground — at failure the UI dump shows only the launcher + an "… isn't responding" dialog, no app views. In CI the suite effectively runs a single test (the other 9 skip — no credentials), so one slow launch reds the whole gate.

Two layers of hardening:

Test harness (UiTestInstrumentation)

  • openApp sets hide_error_dialogs=1 (no ANR/crash dialogs over the app) and retries the launch up to 3× until the app package is actually foregrounded, instead of proceeding after a single 5s wait.
  • waitForView dismisses any residual "isn't responding" dialog (taps Wait) on each poll.

CI (react-native-sdk-e2e.yml)

  • Sets hide_error_dialogs=1 on the emulator and retries the test task up to 3× on the same emulator — same approach the native SDK repos use for flaky E2E — so a random launcher hiccup re-runs instead of failing the gate.

Stabilizes the whole suite, not one test — should also stop flaking the dependabot/chore PRs.

@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg force-pushed the fix/e2e-dismiss-anr-dialog branch from 0f544e7 to b6bec22 Compare June 30, 2026 15:13
@dianaKhortiuk-frontegg dianaKhortiuk-frontegg changed the title fix(e2e): dismiss launcher ANR dialog to stabilize flaky Android E2E fix(e2e): harden Android E2E against launcher ANR and slow cold start Jun 30, 2026
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg force-pushed the fix/e2e-dismiss-anr-dialog branch from b6bec22 to 5bfc037 Compare June 30, 2026 15:43
…ipt line-by-line, so the multi-line run_e2e() function broke; collapse the retry to a single line
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg merged commit bf98137 into master Jun 30, 2026
5 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