Skip to content

Android emulator smoke: Home and Recents screenshot comparisons fail intermittently #4710

Closed

Description

@thymikee

Problem

The Android emulator smoke test live Android emulator fixture E2E (test/integration/smoke-android-emulator.test.ts) fails intermittently on unrelated PRs and on main. It fails at one of two screenshot comparisons in test/integration/android-emulator-e2e/live-automation-scenario.ts (assertHomeAndRecentsRestoration):

  • Android Home should replace fixture pixels: the screenshot after home matches the fixture foreground screenshot.
  • Android Recents should differ from Home pixels: the screenshot after app-switcher matches the Home screenshot.

Each check captures a screenshot right after the navigation command and asserts that the two PNGs differ. When the launcher or the Recents transition has not drawn yet, the second capture still shows the previous surface.

Evidence

On 2026-11-18 the job failed on these runs:

Run Branch Assertion
44292953822 main Home
44297223355 (three attempts) fix/swift-cache-trust Home
44354219083 fix/swift-cache-trust Recents

The same branch passed Android on earlier heads, and none of these changes touch Android navigation or screenshots.

Proposed fix

After home and app-switcher, wait until the foreground surface has changed before capturing: poll the app state, or poll for a screenshot that differs within a bounded timeout. Assert on that instead of on a single capture taken immediately after the command.

Acceptance criteria

  • The two comparisons wait for the transition, with a bounded timeout, before asserting.
  • The smoke job passes on 10 consecutive reruns of an unchanged head.
  • A real failure is still caught: if Home or Recents never changes the surface, the test fails within its timeout.

Activity

  1. apex-sentinel-staging commented on Nov 18, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: bug

    The issue reports intermittent failures in an existing Android emulator smoke test, with specific failing job runs and assertions, caused by screenshot comparisons capturing stale surfaces before navigation transitions finish.

    Required sections

    • Steps to reproduce (missing)
    • Expected and actual behavior (missing)
    • Version or environment (missing)
  2. added
    bug
    in-progress
    on Nov 18, 2026
  3. thymikee commented on Nov 18, 2026

    @thymikee
    MemberAuthor

    I’m taking this. The smoke test will wait for Home and Recents to render, with the existing screenshot assertions and a bounded timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions