Skip to content

iOS physical device: latest npm 0.19.0 still hits XCTest main-thread timeouts in RN overlay/list states #1156

Description

@billsbooth

Summary

Latest published agent-device (0.19.0) is still blocking iOS physical-device QA with XCTest main thread execution timed out failures after focused React Native overlay/input states and on an authenticated animated list.

This is a follow-up to #1138, which was closed as fixed in 0.19.0. After retesting on 0.19.0, the diagnostic text is better, but the underlying automation failure still appears in daily QA. I also see that main is now 8 commits ahead of v0.19.0, including #1144, #1148, and #1149, so this may be partly fixed on main but unreleased. I am filing this because latest npm consumers still hit the blocker, and there is no open issue tracking the remaining/release state.

Environment

  • agent-device: 0.19.0
  • npm dist tag: latest -> 0.19.0
  • Host: macOS 26.5.2, Apple Silicon Mac
  • Xcode: 26.6
  • Node: 26.4.0
  • Target: physical iPhone named Test iPhone
  • App type: Expo React Native development-client app
  • App surfaces involved:
    • focused text input inside a React Native bottom-sheet/search overlay with iOS keyboard visible
    • authenticated React Native list/category screen with animated content
    • event-detail screen with a custom React Native back button

Observed behavior

The app is not frozen from a user point of view:

  • agent-device screenshot works.
  • Raw coordinate taps work.
  • Pressing visible iOS keyboard keys by coordinate enters text.
  • Tapping visible app controls by coordinate navigates.

But XCTest-backed commands fail or become unreliable:

  • snapshot -i waits about 30s and fails with main thread execution timed out
  • type waits about 30s and fails with main thread execution timed out
  • scroll waits about 30s and fails with main thread execution timed out
  • back --in-app can fail fast with in-app back control is not available even when a visible, accessible-looking app back chevron is present

This still looks like XCTest/AX/idleness getting stuck or depending on an unhealthy accessibility tree while the app remains visually responsive.

Concrete logs from the latest run

Request log snippets from 0.19.0 on 2026-07-08:

snapshot:
phase=ios_runner_command_send durationMs=30014 command=snapshot
phase=snapshot_capture durationMs=30027 backend=xctest error="main thread execution timed out"
phase=request_failed command=snapshot error="main thread execution timed out"

type:
phase=ios_runner_command_send durationMs=30015 command=type
phase=platform_command durationMs=30029 error="main thread execution timed out"
phase=request_failed command=type code=COMMAND_FAILED message="main thread execution timed out"

scroll:
phase=ios_runner_readiness_preflight_skipped reason=recent_healthy_mutation
phase=ios_runner_command_send durationMs=30013 command=scroll
phase=platform_command durationMs=30018 error="main thread execution timed out"
phase=request_failed command=scroll error="main thread execution timed out"

back:
phase=ios_runner_command_send durationMs=399 command=backInApp
phase=request_failed command=back error="in-app back control is not available"

Runner log lines from the same session:

AGENT_DEVICE_RUNNER_COMMAND_FAILED command=snapshot ... error=Error Domain=AgentDeviceRunner Code=3 "main thread execution timed out"
AGENT_DEVICE_RUNNER_COMMAND_FAILED command=type ... error=Error Domain=AgentDeviceRunner Code=3 "main thread execution timed out"
AGENT_DEVICE_RUNNER_COMMAND_FAILED command=scroll ... error=Error Domain=AgentDeviceRunner Code=3 "main thread execution timed out"

Expected behavior

For physical iOS app states where XCTest tree/idleness is unhealthy but the screen is still responsive:

  • snapshot -i, type, and scroll should either succeed or fail quickly with actionable diagnostics.
  • scroll/drag-like commands should prefer an AX-free path when possible.
  • If text entry cannot be performed through XCTest, the tool should surface that limitation without leaving the session in a long blocked state.
  • back --in-app should either find a visible accessible back control or provide enough diagnostic detail to explain why the control was not selectable.

Why this matters

This blocks daily physical-device QA because the app can be usable while the automation channel reports long XCTest main-thread timeouts. We can work around it with screenshot evidence and coordinate taps, but that reduces coverage quality and forces the run to Yellow.

Questions

  1. Are the snapshot and scroll parts expected to be fixed by current main after fix: keep XCTest tree snapshots on main #1144 and fix: keep iOS synthesized drags off AX #1148, pending a release after 0.19.0?
  2. Is type inside a focused React Native bottom-sheet/text-input still an open issue after current main?
  3. For back --in-app, is there a recommended accessibility shape that the runner requires, or should this command expose more detail when a visible back button is not detected?
  4. Would you prefer a smaller public Expo repro app for the focused bottom-sheet type failure, or are the logs above enough to track the latest-release gap first?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions