Repository navigation
ci: save the emulator state when the Android e2e job fails - #1359
Merged
plum117 merged 2 commits intoOct 18, 2026
Merged
Conversation
The Appium log does not show why the emulator screen stays black and taps and key events fail for the whole job (3 runs). Save a screenshot, logcat and dumpsys output in logs/device, which the job uploads on failure.
|
plum117
marked this pull request as ready for review
October 18, 2026 23:05
[Low impact] The PR appears safe to merge; the cleanup issue is fixed. SummarySaves Android emulator diagnostics when the e2e script fails.
Reviews (2) · Last reviewed commit: "ci: do not let a failed mkdir of the dev..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Android emulator job sometimes fails because the emulator is in a bad state for the whole job: the screen under the status bar is black, and taps and key events fail. The full page tests then fail with
the viewport of the mobile browser is not known (height 0)(#1334).height 0Cannot generate key press eventIt starts with the warm-up session and stays in the next session, although each session stops and starts Chrome again. So the emulator is in a bad state, not only Chrome. A rerun on a new runner passes. The uploaded artifacts have only the Appium log and the screenshots, so the cause is not known.
What
.github/scripts/android-emulator-e2e.sh: when the script fails, it saves the device state inlogs/device/before the action stops the emulator. The job already uploadslogs/on failure.screen.png(adb exec-out screencap)logcat.txtdumpsys-window.txt,dumpsys-activity.txt,dumpsys-input.txt,dumpsys-power.txt,dumpsys-display.txt,dumpsys-SurfaceFlinger.txtEach command has a timeout and cannot change the exit code. A job that passes runs none of them. A CI change only, so there is no changeset.
Test
adb: a failing script keeps exit code 1 and saves the 8 files; a passing script calls noadbcommand.shellcheck: no findings.🤖 Generated with Claude Code