Skip to content

Retry the permission dialog when its button goes stale - #7

Merged
niranjankagri merged 1 commit into
mainfrom
fix-permission-dialog-race
Nov 5, 2026
Merged

niranjankagri merged 1 commit into
mainfrom
fix-permission-dialog-race

Conversation

@niranjankagri

Copy link
Copy Markdown
Owner

The weekly run (41962058591) failed twice on the same commit:

  • Attempt 1: the emulator went offline (adb: device offline), so most tests failed. That was the runner, and this PR doesn't change it.
  • Attempt 2: 39 of 40 passed. TC-131 failed with StaleElementReferenceException on the permission button: it was found, then was gone from the page before getText().

PermissionDialog.allowOne now finds, reads and taps the button inside the wait, and the wait ignores stale elements, so a redrawn dialog is found again. If the dialog really has gone, the wait times out as before.

The race can't be triggered on demand, so a green run shows nothing broke, not that the race is gone.

🤖 Generated with Claude Code

The weekly run failed TC-131 with a StaleElementReferenceException: the
button was found, then the dialog was redrawn before its text was read.
Finding, reading and tapping are now one step of the wait, so a stale
button is found again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niranjankagri
niranjankagri merged commit 5c0a42d into main Nov 5, 2026
2 checks passed
@niranjankagri
niranjankagri deleted the fix-permission-dialog-race branch November 5, 2026 13:25
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