Skip to content

android: plain close of Settings at replay teardown fails intermittently after #4881 #4895

Closed

Description

@thymikee

Android smoke test/integration/replays/android/emulator/01-settings.ad fails intermittently with:

failed at: Android app com.android.settings process remained running after close

Seen twice on 2026-11-21 on PRs based on 0.22 after it picked up #4881 (plain close and .ad script teardown now close the session app with the Android close fences):

Neither PR touches Android close. The same base passed on #4857 and #4869.

Likely cause: Android can restart Settings at once after force-stop (see the close docs: apps Android restarts at once fail with details.phase: process). Before #4881, a script that ended with plain close did not close the app, so the fence never ran on Settings at teardown. Now the fence runs and can fail on a restart that is not caused by the script.

Decide whether teardown close (and plain close without an app) should accept a restarted process the way open --relaunch does, or whether the fixture should close a different app.

Activity

  1. added this to the 0.22 - lean core milestone on Nov 21, 2026
  2. apex-sentinel-staging commented on Nov 21, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: bug

    The issue reports a reproducible intermittent Android smoke test failure caused by plain close teardown after #​4881, where Settings can restart and make the close fence fail. It includes failing test, error message, PRs, links, and likely cause, so a maintainer can investigate and decide the close/teardown behavior.

    Required sections

    • Steps to reproduce (missing)
    • Expected and actual behavior (missing)
    • Version or environment (missing)
  3. thymikee commented on Nov 21, 2026

    @thymikee
    MemberAuthor

    Another sighting: #4911 at b414200, job https://github.com/callstack/agent-device/actions/runs/44925693984/job/136911155109. The same test passed on that PR's previous head 93a810c, and the change between the two heads does not touch Android or close. Also seen today on runs 44916960661, 44913451859 and 44913308426 (other branches).

  4. thymikee commented on Nov 21, 2026

    @thymikee
    MemberAuthor

    Fixed by #4902 on main (ffef4b7), cherry-picked into 0.22 as b656532: close now succeeds once the pre-close processes are gone, so a Settings restart after the stop no longer fails the replay teardown. Duplicate of #4901.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions