Skip to content

iOS runner prepare times out on Xcode 26.5 and leaves suspended runner app #791

@knchst

Description

@knchst

Summary

agent-device prepare ios-runner can time out while the XCTest runner app remains installed/running in the simulator in a suspended state. After the timeout, subsequent prepare attempts can inherit a dirty simulator state unless the runner app is manually terminated.

Environment

  • agent-device: 0.17.2
  • Host: macOS, Apple Silicon
  • Xcode: 26.5 (17F42)
  • Reproduced on:
    • iPhone Air simulator, iOS 26.5
    • iPhone 16 simulator, iOS 18.6

Reproduction

agent-device prepare ios-runner \
  --platform ios \
  --udid <booted-simulator-udid> \
  --timeout 90000 \
  --debug

Observed

The command times out before the runner listener becomes reachable:

Error (COMMAND_FAILED): Daemon request timed out
Diagnostic ID: mqb3239w-3a20a90d

The session runner.log shows the runner build succeeded, then xcodebuild test-without-building starts and repeatedly logs:

[MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
** BUILD INTERRUPTED **

The runner process is left behind in the simulator in a suspended state, for example:

.../AgentDeviceRunnerUITests-Runner.app/AgentDeviceRunnerUITests-Runner  Ts

The Swift runner never logs AGENT_DEVICE_RUNNER_HEADLESS_STARTUP or AGENT_DEVICE_RUNNER_LISTENER_READY, so the test body appears not to reach the listener setup.

Expected

  • prepare ios-runner should either start the XCTest runner and pass the health check, or fail with complete cleanup.
  • On timeout/abort, the simulator should not retain an orphaned AgentDeviceRunnerUITests-Runner process.

Notes

I verified that manually terminating the runner bundles clears the leftover simulator process:

xcrun simctl terminate <udid> com.callstack.agentdevice.runner.uitests.xctrunner
xcrun simctl terminate <udid> com.callstack.agentdevice.runner.uitests
xcrun simctl terminate <udid> com.callstack.agentdevice.runner

A follow-up PR will cover the cleanup part by terminating the simulator runner bundle IDs during runner disposal. The underlying Xcode 26.5 test-without-building startup hang may still need separate investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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