You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: INSTRUMENTATION_FAILED on the first snapshot after a boot or restore is not retried #4109
The helper is installed and current (android_snapshot_helper_install_decision says reason: current, and the sha matches). The session first exits with android_snapshot_helper_session_exited_before_ready, then the fallback capture fails within about 200 ms. The next snapshot works, every time we looked.
Version. 0.21.31, Android 36 emulator.
Proposal. Treat INSTRUMENTATION_FAILED as retriable once inside the capture, after the runtime reset that already happens in the failure path. We run that as a local patch; the error is already reported as retriable: true, so the caller's only other option is to repeat the command itself.
Triage: bug; actionable without more input from you. The error is already reported as retriable: true, so one retry inside the capture, after the helper runtime reset, is a smaller fix than every caller repeating the command. Scope: retry once, only for INSTRUMENTATION_FAILED before the helper session is ready; a second failure surfaces as it does today. Related: #4005 and #4030 track other first-capture failures of the same helper.
The fix is up in #4156: on a refused helper start before the session is ready, the capture resets the helper runtime and retries once. The retry fires only on the system's exact refusal record (INSTRUMENTATION_FAILED, id=ActivityManagerService, status code -1, and nothing a started helper prints), so other failures still surface as before.
We couldn't reproduce the refusal on our Android 15 emulator. If you can run #4156's branch on your Android 36 setup instead of your local patch, please post whether android_snapshot_helper_start_retry shows up in the debug log and whether the snapshot then succeeds. If it doesn't fire, the raw helper stdout from one failure would show whether Android 36 words the refusal differently.
Activity
thymikee commentedon Oct 31, 2026
Triage: bug; actionable without more input from you. The error is already reported as
retriable: true, so one retry inside the capture, after the helper runtime reset, is a smaller fix than every caller repeating the command. Scope: retry once, only forINSTRUMENTATION_FAILEDbefore the helper session is ready; a second failure surfaces as it does today. Related: #4005 and #4030 track other first-capture failures of the same helper.thymikee commentedon Nov 2, 2026
An agent is picking this up; the PR will link here.
thymikee commentedon Nov 2, 2026
The fix is up in #4156: on a refused helper start before the session is ready, the capture resets the helper runtime and retries once. The retry fires only on the system's exact refusal record (
INSTRUMENTATION_FAILED,id=ActivityManagerService, status code -1, and nothing a started helper prints), so other failures still surface as before.We couldn't reproduce the refusal on our Android 15 emulator. If you can run #4156's branch on your Android 36 setup instead of your local patch, please post whether
android_snapshot_helper_start_retryshows up in the debug log and whether the snapshot then succeeds. If it doesn't fire, the raw helper stdout from one failure would show whether Android 36 words the refusal differently.refactor(android): keep one refused-start fact on the error, and keep…
fix(android): retry a refused helper start once, and scope the sessio…