Skip to content

Harden iOS screenshot fallback path against remaining xcrun hangs #187

@thymikee

Description

@thymikee

Summary

The recent fix for iOS simulator screenshot hangs adds a bounded timeout for simctl io ... screenshot and falls back to the XCTest runner when that command stalls.

There are still adjacent subprocess calls in the screenshot path that can run without explicit timeouts, which leaves room for the same class of daemon-level timeout to reappear in a different step.

Scope

Harden the remaining iOS screenshot subprocess calls so the whole screenshot pipeline fails fast and surfaces a useful fallback or error instead of consuming the full daemon request timeout.

Candidates

  • Add explicit timeoutMs to runner fallback copy steps in src/platforms/ios/screenshot.ts
  • xcrun devicectl device copy from
  • xcrun simctl get_app_container
  • Consider bounding open -a Simulator in src/platforms/ios/simulator.ts
  • Emit an explicit diagnostic when screenshot capture switches from simctl to runner fallback

Why

The original CI failure on PR #186 was:

  • agent-device screenshot ... --platform ios --session ios-test
  • daemon request timed out after 300000ms

The immediate root cause was an unbounded simulator screenshot subprocess. The follow-up hardening should remove the remaining unbounded subprocesses in the same path.

Acceptance Criteria

  • Screenshot-related xcrun subprocesses in the iOS path have explicit timeouts
  • Timeout or fallback behavior is covered by focused tests
  • CI failures in this path surface the failing step more clearly in diagnostics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions