Skip to content

fix: ios press idle timeout#543

Merged
thymikee merged 2 commits into
callstackincubator:mainfrom
demchenkoalex:fix/ios-press-idle-timeout
May 15, 2026
Merged

fix: ios press idle timeout#543
thymikee merged 2 commits into
callstackincubator:mainfrom
demchenkoalex:fix/ios-press-idle-timeout

Conversation

@demchenkoalex
Copy link
Copy Markdown
Contributor

[Disclaimer: code is written by Codex so not to be taken seriously, but I hope it gives out some hints, if there is even a problem]

Hello! Thanks a lot for this project, it should save a ton of time for me :)

I was testing this at my job, and I started with simple commands as per README - open, snapshot and press. Unfortunately, press command timed out every single time.

OS and Node version:
macOS 15.7.3
node v24.14.1

Xcode/Android SDK versions
Xcode 26.3
iOS simulator 26.3

Exact command and output
agent-device open [my bundle id] --platform ios
agent-device snapshot -i
[list of items]
@e204 [button] "Go to More"
agent-device press @e204 --debug

full log: [agent-device][diag] {"ts":"2026-05-15T09:04:29.742Z","level":"info","phase":"daemon_startup","session":"default","requestId":"458b4bd0a6dca39e","command":"press","durationMs":5,"data":{"requestId":"458b4bd0a6dca39e","session":"default"}} [agent-device][diag] {"ts":"2026-05-15T09:04:29.743Z","level":"info","phase":"daemon_request_prepare","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"requestId":"458b4bd0a6dca39e","command":"press","session":"default"}} [agent-device][diag] {"ts":"2026-05-15T09:00:54.509Z","level":"info","phase":"request_start","session":"default","requestId":"d2b5d4d4da8a84a7","command":"press","data":{"session":"default","command":"press"}} [agent-device][diag] {"ts":"2026-05-15T09:00:54.511Z","level":"error","phase":"request_failed","session":"default","requestId":"d2b5d4d4da8a84a7","command":"press","data":{"code":"SESSION_NOT_FOUND","message":"No active session. Run open first."}} Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -only-testing AgentDeviceRunnerUITests/RunnerTests/testCommand -parallel-testing-enabled NO -test-timeouts-enabled NO -collect-test-diagnostics never -maximum-concurrent-test-simulator-destinations 1 -destination-timeout 20 -xctestrun /Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner.env.session-F12C18EA-7E1C-4461-A1A5-42D19EE11159-55350.xctestrun -destination "platform=iOS Simulator,id=F12C18EA-7E1C-4461-A1A5-42D19EE11159"

2026-05-15 11:01:33.930 xcodebuild[10542:17955821] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:01:33.937 xcodebuild[10542:17955821] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:01:34.256 xcodebuild[10542:17955821] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:01:34.994 xcodebuild[10542:17955821] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:01:35.711292+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] [Default] Running tests...
t = nans Interface orientation changed to Portrait
Test Suite 'Selected tests' started at 2026-05-15 11:01:36.257.
Test Suite 'AgentDeviceRunnerUITests.xctest' started at 2026-05-15 11:01:36.257.
Test Suite 'RunnerTests' started at 2026-05-15 11:01:36.257.
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' started.
t = 0.00s Start Test at 2026-05-15 11:01:36.258
t = 0.02s Set Up
t = 0.02s Open com.callstack.agentdevice.runner
t = 0.02s Launch com.callstack.agentdevice.runner
t = 0.63s Setting up automation session
t = 1.33s Wait for com.callstack.agentdevice.runner to idle
2026-05-15 11:01:38.798117+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] AGENT_DEVICE_RUNNER_DESIRED_PORT=55350
2026-05-15 11:01:38.801671+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] AGENT_DEVICE_RUNNER_WAITING
2026-05-15 11:01:38.802000+0200 AgentDeviceRunnerUITests-Runner[10545:17956083] [] nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
2026-05-15 11:01:38.802245+0200 AgentDeviceRunnerUITests-Runner[10545:17955991] AGENT_DEVICE_RUNNER_LISTENER_READY
2026-05-15 11:01:38.802303+0200 AgentDeviceRunnerUITests-Runner[10545:17955991] AGENT_DEVICE_RUNNER_PORT=55350
2026-05-15 11:01:39.079707+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] AGENT_DEVICE_RUNNER_ACTIVATE bundle=com.redacted.bundle state=3 reason=bundle_changed
t = 2.82s Open com.redacted.bundle
t = 2.82s Activate com.redacted.bundle
t = 2.85s Wait for com.redacted.bundle to idle
t = 2.90s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 3.95s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 3.95s Checking existence of Application 'com.redacted.bundle'
t = 4.13s Get all elements bound by index for: Descendants matching type Alert
t = 4.15s Get all elements bound by index for: Descendants matching type Sheet
t = 4.17s Get all elements bound by index for: Descendants matching type Window
t = 4.30s Checking existence of Window (Element at index 0)
t = 4.43s Find the Window (Element at index 0)
t = 4.57s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 4.71s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 4.83s Find the Application 'com.redacted.bundle'
[agent-device][diag] {"ts":"2026-05-15T09:01:51.376Z","level":"info","phase":"request_start","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"session":"default","command":"press"}}
[agent-device][diag] {"ts":"2026-05-15T09:01:51.378Z","level":"debug","phase":"platform_command_prepare","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"command":"press","platform":"ios","kind":"simulator"}}
t = 15.12s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 16.15s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 16.16s Checking existence of Application 'com.redacted.bundle'
t = 16.27s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 17.31s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 17.31s Checking existence of Application 'com.redacted.bundle'
t = 17.88s Find the Application 'com.redacted.bundle'
t = 18.00s Find the Window (First Match)
t = 18.01s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.01s Get all elements bound by index for: Descendants matching type Window
t = 18.13s Checking existence of Window (Element at index 0)
t = 18.26s Find the Window (Element at index 0)
t = 18.38s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.51s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (362.0, 816.0)
t = 18.51s Wait for com.redacted.bundle to idle
t = 18.51s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.63s Check for interrupting elements affecting Window
t = 18.76s Synthesize event
t = 18.76s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.88s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.01s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.42s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:01:55.679Z","level":"debug","phase":"retry","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"phase":"ios_runner_connect","event":"succeeded","attempt":1,"maxAttempts":180,"elapsedMs":4301,"remainingMs":40699}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.679Z","level":"info","phase":"platform_command","session":"default","requestId":"232b7e9835dcb4e1","command":"press","durationMs":4301,"data":{"command":"press","platform":"ios"}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.680Z","level":"debug","phase":"record_action","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"command":"press","session":"default"}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.680Z","level":"info","phase":"request_success","session":"default","requestId":"232b7e9835dcb4e1","command":"press"}
t = 65.25s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 66.29s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 66.29s Checking existence of Application 'com.redacted.bundle'
t = 66.49s Get all elements bound by index for: Descendants matching type Alert
t = 66.51s Get all elements bound by index for: Descendants matching type Sheet
t = 66.53s Get all elements bound by index for: Descendants matching type Window
t = 66.65s Checking existence of Window (Element at index 0)
t = 66.78s Find the Window (Element at index 0)
t = 66.90s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 67.03s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 67.15s Find the Application 'com.redacted.bundle'
[agent-device][diag] {"ts":"2026-05-15T09:02:54.377Z","level":"info","phase":"request_start","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"session":"default","command":"press"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:54.377Z","level":"debug","phase":"platform_command_prepare","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"command":"press","platform":"ios","kind":"simulator"}}
t = 78.12s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 79.16s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 79.16s Checking existence of Application 'com.redacted.bundle'
t = 79.27s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 80.31s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 80.31s Checking existence of Application 'com.redacted.bundle'
t = 80.64s Find the Application 'com.redacted.bundle'
t = 80.76s Find the Window (First Match)
t = 80.77s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 80.77s Get all elements bound by index for: Descendants matching type Window
t = 80.89s Checking existence of Window (Element at index 0)
t = 81.01s Find the Window (Element at index 0)
t = 81.13s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.26s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (298.0, 816.0)
t = 81.26s Wait for com.redacted.bundle to idle
t = 81.26s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.38s Check for interrupting elements affecting Window
t = 81.51s Synthesize event
t = 81.51s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.63s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.76s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"debug","phase":"retry","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"phase":"ios_runner_connect","event":"succeeded","attempt":1,"maxAttempts":180,"elapsedMs":4048,"remainingMs":40952}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"info","phase":"platform_command","session":"default","requestId":"ac1aa065ef870641","command":"press","durationMs":4048,"data":{"command":"press","platform":"ios"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"debug","phase":"record_action","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"command":"press","session":"default"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"info","phase":"request_success","session":"default","requestId":"ac1aa065ef870641","command":"press"}
t = 82.16s Wait for com.redacted.bundle to idle
2026-05-15 11:03:38.945953+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] AGENT_DEVICE_RUNNER_WAIT_RESULT=XCTWaiterResult(rawValue: 1)
t = 122.69s Tear Down
t = 122.90s Checking for crash reports corresponding to unexpected termination of com.callstack.agentdevice.runner
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' passed (123.936 seconds).
Test Suite 'RunnerTests' passed at 2026-05-15 11:03:40.195.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.938) seconds
Test Suite 'AgentDeviceRunnerUITests.xctest' passed at 2026-05-15 11:03:40.201.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.944) seconds
Test Suite 'Selected tests' passed at 2026-05-15 11:03:40.201.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.945) seconds
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 126.198 elapsed -- Testing started completed.
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 126.198 sec, +126.198 sec -- end

Test session results, code coverage, and logs:
/Users/alex/Library/Developer/Xcode/DerivedData/AgentDeviceRunner-feesenornylowmerbxdptdfbtwgc/Logs/Test/Test-AgentDeviceRunner-2026.05.15_11-01-33-+0200.xcresult

** TEST EXECUTE SUCCEEDED **

Testing started
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -only-testing AgentDeviceRunnerUITests/RunnerTests/testCommand -parallel-testing-enabled NO -test-timeouts-enabled NO -collect-test-diagnostics never -maximum-concurrent-test-simulator-destinations 1 -destination-timeout 20 -xctestrun /Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner.env.session-F12C18EA-7E1C-4461-A1A5-42D19EE11159-55652.xctestrun -destination "platform=iOS Simulator,id=F12C18EA-7E1C-4461-A1A5-42D19EE11159"

2026-05-15 11:04:11.674 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:11.681 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:12.000 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:12.611 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:13.331802+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] [Default] Running tests...
t = nans Interface orientation changed to Portrait
Test Suite 'Selected tests' started at 2026-05-15 11:04:13.865.
Test Suite 'AgentDeviceRunnerUITests.xctest' started at 2026-05-15 11:04:13.865.
Test Suite 'RunnerTests' started at 2026-05-15 11:04:13.865.
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' started.
t = 0.00s Start Test at 2026-05-15 11:04:13.866
t = 0.02s Set Up
t = 0.02s Open com.callstack.agentdevice.runner
t = 0.02s Launch com.callstack.agentdevice.runner
t = 0.63s Setting up automation session
t = 1.36s Wait for com.callstack.agentdevice.runner to idle
2026-05-15 11:04:16.441477+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_DESIRED_PORT=55652
2026-05-15 11:04:16.444798+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_WAITING
2026-05-15 11:04:16.445161+0200 AgentDeviceRunnerUITests-Runner[11711:17962929] [] nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
2026-05-15 11:04:16.445394+0200 AgentDeviceRunnerUITests-Runner[11711:17962932] AGENT_DEVICE_RUNNER_LISTENER_READY
2026-05-15 11:04:16.445492+0200 AgentDeviceRunnerUITests-Runner[11711:17962932] AGENT_DEVICE_RUNNER_PORT=55652
2026-05-15 11:04:17.146924+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_ACTIVATE bundle=com.redacted.bundle state=2 reason=bundle_changed
t = 3.28s Open com.redacted.bundle
t = 3.28s Activate com.redacted.bundle
t = 3.31s Wait for com.redacted.bundle to idle
t = 3.40s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 4.40s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 4.40s Checking existence of Application 'com.redacted.bundle'
t = 4.59s Get all elements bound by index for: Descendants matching type Alert
t = 4.61s Get all elements bound by index for: Descendants matching type Sheet
t = 4.63s Get all elements bound by index for: Descendants matching type Window
t = 4.76s Checking existence of Window (Element at index 0)
t = 4.88s Find the Window (Element at index 0)
t = 5.02s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 5.16s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 5.29s Find the Application 'com.redacted.bundle'
[agent-device][diag] {"ts":"2026-05-15T09:04:29.744Z","level":"info","phase":"request_start","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"session":"default","command":"press"}}
[agent-device][diag] {"ts":"2026-05-15T09:04:29.744Z","level":"debug","phase":"platform_command_prepare","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"command":"press","platform":"ios","kind":"simulator"}}
t = 15.88s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 16.92s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 16.92s Checking existence of Application 'com.redacted.bundle'
t = 17.03s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 18.07s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 18.07s Checking existence of Application 'com.redacted.bundle'
t = 18.65s Find the Application 'com.redacted.bundle'
t = 18.76s Find the Window (First Match)
t = 18.77s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.77s Get all elements bound by index for: Descendants matching type Window
t = 18.89s Checking existence of Window (Element at index 0)
t = 19.02s Find the Window (Element at index 0)
t = 19.14s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.27s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (362.0, 816.0)
t = 19.27s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:04:49.747Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":180,"elapsedMs":20003,"remainingMs":24997}}
[agent-device][diag] {"ts":"2026-05-15T09:04:49.747Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":1,"maxAttempts":180,"delayMs":338.5077220718457,"elapsedMs":20003,"remainingMs":24997}}
[agent-device][diag] {"ts":"2026-05-15T09:05:10.091Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":2,"maxAttempts":180,"elapsedMs":40347,"remainingMs":4653}}
[agent-device][diag] {"ts":"2026-05-15T09:05:10.092Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":2,"maxAttempts":180,"delayMs":685.3676246677435,"elapsedMs":40348,"remainingMs":4652}}
[agent-device][diag] {"ts":"2026-05-15T09:05:14.748Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"exhausted","attempt":180,"maxAttempts":180,"elapsedMs":45004,"remainingMs":0}}
[agent-device][diag] {"ts":"2026-05-15T09:05:14.747Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":3,"maxAttempts":180,"elapsedMs":45003,"remainingMs":0}}
2026-05-15 11:05:20.091868+0200 AgentDeviceRunnerUITests-Runner[11711:17963022] [connection] nw_socket_handle_socket_event [C4:1] Socket SO_ERROR [54: Connection reset by peer]
2026-05-15 11:05:20.092054+0200 AgentDeviceRunnerUITests-Runner[11711:17963022] [connection] nw_protocol_socket_reset_linger [C4:1] setsockopt SO_LINGER failed [22: Invalid argument]
[agent-device][diag] {"ts":"2026-05-15T09:05:29.752Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":60,"elapsedMs":15003,"remainingMs":0}}
[agent-device][diag] {"ts":"2026-05-15T09:05:29.752Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"exhausted","attempt":60,"maxAttempts":60,"elapsedMs":15003,"remainingMs":0}}
** BUILD INTERRUPTED **
[agent-device][diag] {"ts":"2026-05-15T09:05:30.442Z","level":"info","phase":"runner_xctestrun_cache","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"action":"reuse","reason":"reuse_ready","derived":"/Users/alex/.agent-device/ios-runner/derived","xctestrunPath":"/Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner_AgentDeviceRunner_iphonesimulator26.2-arm64.xctestrun"}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.462Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":180,"elapsedMs":1,"remainingMs":44999}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.462Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":1,"maxAttempts":180,"delayMs":252.27366058723106,"elapsedMs":1,"remainingMs":44999}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.716Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":2,"maxAttempts":180,"delayMs":655.4649460366638,"elapsedMs":255,"remainingMs":44745}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.716Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":2,"maxAttempts":180,"elapsedMs":255,"remainingMs":44745}}
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -only-testing AgentDeviceRunnerUITests/RunnerTests/testCommand -parallel-testing-enabled NO -test-timeouts-enabled NO -collect-test-diagnostics never -maximum-concurrent-test-simulator-destinations 1 -destination-timeout 20 -xctestrun /Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner.env.session-F12C18EA-7E1C-4461-A1A5-42D19EE11159-55713.xctestrun -destination "platform=iOS Simulator,id=F12C18EA-7E1C-4461-A1A5-42D19EE11159"

2026-05-15 11:05:31.229 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:05:31.236 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
[agent-device][diag] {"ts":"2026-05-15T09:05:31.373Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":3,"maxAttempts":180,"elapsedMs":912,"remainingMs":44088}}
[agent-device][diag] {"ts":"2026-05-15T09:05:31.373Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":3,"maxAttempts":180,"delayMs":1330.6922946961802,"elapsedMs":912,"remainingMs":44088}}
2026-05-15 11:05:31.553 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:05:32.161 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
[agent-device][diag] {"ts":"2026-05-15T09:05:32.705Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":4,"maxAttempts":180,"delayMs":2380.312207028922,"elapsedMs":2244,"remainingMs":42756}}
[agent-device][diag] {"ts":"2026-05-15T09:05:32.705Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":4,"maxAttempts":180,"elapsedMs":2244,"remainingMs":42756}}
2026-05-15 11:05:32.884693+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] [Default] Running tests...
t = nans Interface orientation changed to Portrait
Test Suite 'Selected tests' started at 2026-05-15 11:05:33.412.
Test Suite 'AgentDeviceRunnerUITests.xctest' started at 2026-05-15 11:05:33.412.
Test Suite 'RunnerTests' started at 2026-05-15 11:05:33.412.
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' started.
t = 0.00s Start Test at 2026-05-15 11:05:33.413
t = 0.02s Set Up
t = 0.02s Open com.callstack.agentdevice.runner
t = 0.02s Launch com.callstack.agentdevice.runner
t = 0.43s Setting up automation session
t = 1.28s Wait for com.callstack.agentdevice.runner to idle
[agent-device][diag] {"ts":"2026-05-15T09:05:35.091Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":5,"maxAttempts":180,"elapsedMs":4630,"remainingMs":40370}}
[agent-device][diag] {"ts":"2026-05-15T09:05:35.091Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":5,"maxAttempts":180,"delayMs":1863.8701827976045,"elapsedMs":4630,"remainingMs":40370}}
2026-05-15 11:05:35.914483+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_DESIRED_PORT=55713
2026-05-15 11:05:35.918253+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_WAITING
2026-05-15 11:05:35.918786+0200 AgentDeviceRunnerUITests-Runner[12045:17965098] [] nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
2026-05-15 11:05:35.919167+0200 AgentDeviceRunnerUITests-Runner[12045:17965116] AGENT_DEVICE_RUNNER_LISTENER_READY
2026-05-15 11:05:35.919219+0200 AgentDeviceRunnerUITests-Runner[12045:17965116] AGENT_DEVICE_RUNNER_PORT=55713
2026-05-15 11:05:36.978214+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_ACTIVATE bundle=com.redacted.bundle state=2 reason=bundle_changed
t = 3.57s Open com.redacted.bundle
t = 3.57s Activate com.redacted.bundle
t = 3.60s Wait for com.redacted.bundle to idle
t = 3.61s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 4.69s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 4.69s Checking existence of Application 'com.redacted.bundle'
t = 4.81s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 5.85s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 5.85s Checking existence of Application 'com.redacted.bundle'
t = 6.22s Find the Application 'com.redacted.bundle'
t = 6.34s Find the Window (First Match)
t = 6.34s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 6.35s Get all elements bound by index for: Descendants matching type Window
t = 6.47s Checking existence of Window (Element at index 0)
t = 6.60s Find the Window (Element at index 0)
t = 6.72s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 6.85s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (362.0, 816.0)
t = 6.85s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:05:56.955Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":6,"maxAttempts":180,"elapsedMs":26494,"remainingMs":18506}}
[agent-device][diag] {"ts":"2026-05-15T09:05:56.955Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":6,"maxAttempts":180,"delayMs":1791.1067548734652,"elapsedMs":26494,"remainingMs":18506}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.861Z","level":"error","phase":"daemon_request_timeout","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"timeoutMs":90000,"requestId":"458b4bd0a6dca39e","command":"press","timedOutRunnerPidsTerminated":1,"daemonPidReset":10214,"daemonPidForceKilled":true}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.861Z","level":"error","phase":"daemon_request","session":"default","requestId":"458b4bd0a6dca39e","command":"press","durationMs":90118,"data":{"requestId":"458b4bd0a6dca39e","command":"press","error":"Daemon request timed out"}}
Error (COMMAND_FAILED): Daemon request timed out
Hint: Retry with --debug and check daemon diagnostics logs. Timed-out iOS runner xcodebuild processes were terminated when detected.
Diagnostic ID: mp6oy5gm-1687f0eb
Diagnostics Log: /Users/alex/.agent-device/logs/default/2026-05-15/2026-05-15T09-05-59-861Z-mp6oy5gm-1687f0eb.ndjson
{
"timeoutMs": 90000,
"requestId": "458b4bd0a6dca39e"
}

[daemon log]
t = 18.51s Wait for com.redacted.bundle to idle
t = 18.51s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.63s Check for interrupting elements affecting Window
t = 18.76s Synthesize event
t = 18.76s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.88s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.01s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.42s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:01:55.679Z","level":"debug","phase":"retry","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"phase":"ios_runner_connect","event":"succeeded","attempt":1,"maxAttempts":180,"elapsedMs":4301,"remainingMs":40699}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.679Z","level":"info","phase":"platform_command","session":"default","requestId":"232b7e9835dcb4e1","command":"press","durationMs":4301,"data":{"command":"press","platform":"ios"}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.680Z","level":"debug","phase":"record_action","session":"default","requestId":"232b7e9835dcb4e1","command":"press","data":{"command":"press","session":"default"}}
[agent-device][diag] {"ts":"2026-05-15T09:01:55.680Z","level":"info","phase":"request_success","session":"default","requestId":"232b7e9835dcb4e1","command":"press"}
t = 65.25s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 66.29s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 66.29s Checking existence of Application 'com.redacted.bundle'
t = 66.49s Get all elements bound by index for: Descendants matching type Alert
t = 66.51s Get all elements bound by index for: Descendants matching type Sheet
t = 66.53s Get all elements bound by index for: Descendants matching type Window
t = 66.65s Checking existence of Window (Element at index 0)
t = 66.78s Find the Window (Element at index 0)
t = 66.90s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 67.03s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 67.15s Find the Application 'com.redacted.bundle'
[agent-device][diag] {"ts":"2026-05-15T09:02:54.377Z","level":"info","phase":"request_start","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"session":"default","command":"press"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:54.377Z","level":"debug","phase":"platform_command_prepare","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"command":"press","platform":"ios","kind":"simulator"}}
t = 78.12s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 79.16s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 79.16s Checking existence of Application 'com.redacted.bundle'
t = 79.27s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 80.31s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 80.31s Checking existence of Application 'com.redacted.bundle'
t = 80.64s Find the Application 'com.redacted.bundle'
t = 80.76s Find the Window (First Match)
t = 80.77s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 80.77s Get all elements bound by index for: Descendants matching type Window
t = 80.89s Checking existence of Window (Element at index 0)
t = 81.01s Find the Window (Element at index 0)
t = 81.13s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.26s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (298.0, 816.0)
t = 81.26s Wait for com.redacted.bundle to idle
t = 81.26s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.38s Check for interrupting elements affecting Window
t = 81.51s Synthesize event
t = 81.51s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.63s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 81.76s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"debug","phase":"retry","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"phase":"ios_runner_connect","event":"succeeded","attempt":1,"maxAttempts":180,"elapsedMs":4048,"remainingMs":40952}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"info","phase":"platform_command","session":"default","requestId":"ac1aa065ef870641","command":"press","durationMs":4048,"data":{"command":"press","platform":"ios"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"debug","phase":"record_action","session":"default","requestId":"ac1aa065ef870641","command":"press","data":{"command":"press","session":"default"}}
[agent-device][diag] {"ts":"2026-05-15T09:02:58.425Z","level":"info","phase":"request_success","session":"default","requestId":"ac1aa065ef870641","command":"press"}
t = 82.16s Wait for com.redacted.bundle to idle
2026-05-15 11:03:38.945953+0200 AgentDeviceRunnerUITests-Runner[10545:17955954] AGENT_DEVICE_RUNNER_WAIT_RESULT=XCTWaiterResult(rawValue: 1)
t = 122.69s Tear Down
t = 122.90s Checking for crash reports corresponding to unexpected termination of com.callstack.agentdevice.runner
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' passed (123.936 seconds).
Test Suite 'RunnerTests' passed at 2026-05-15 11:03:40.195.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.938) seconds
Test Suite 'AgentDeviceRunnerUITests.xctest' passed at 2026-05-15 11:03:40.201.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.944) seconds
Test Suite 'Selected tests' passed at 2026-05-15 11:03:40.201.
Executed 1 test, with 0 failures (0 unexpected) in 123.936 (123.945) seconds
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 126.198 elapsed -- Testing started completed.
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2026-05-15 11:03:40.496 xcodebuild[10542:17955821] [MT] IDETestOperationsObserverDebug: 126.198 sec, +126.198 sec -- end

Test session results, code coverage, and logs:
/Users/alex/Library/Developer/Xcode/DerivedData/AgentDeviceRunner-feesenornylowmerbxdptdfbtwgc/Logs/Test/Test-AgentDeviceRunner-2026.05.15_11-01-33-+0200.xcresult

** TEST EXECUTE SUCCEEDED **

Testing started
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -only-testing AgentDeviceRunnerUITests/RunnerTests/testCommand -parallel-testing-enabled NO -test-timeouts-enabled NO -collect-test-diagnostics never -maximum-concurrent-test-simulator-destinations 1 -destination-timeout 20 -xctestrun /Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner.env.session-F12C18EA-7E1C-4461-A1A5-42D19EE11159-55652.xctestrun -destination "platform=iOS Simulator,id=F12C18EA-7E1C-4461-A1A5-42D19EE11159"

2026-05-15 11:04:11.674 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:11.681 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:12.000 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:12.611 xcodebuild[11709:17962746] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:04:13.331802+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] [Default] Running tests...
t = nans Interface orientation changed to Portrait
Test Suite 'Selected tests' started at 2026-05-15 11:04:13.865.
Test Suite 'AgentDeviceRunnerUITests.xctest' started at 2026-05-15 11:04:13.865.
Test Suite 'RunnerTests' started at 2026-05-15 11:04:13.865.
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' started.
t = 0.00s Start Test at 2026-05-15 11:04:13.866
t = 0.02s Set Up
t = 0.02s Open com.callstack.agentdevice.runner
t = 0.02s Launch com.callstack.agentdevice.runner
t = 0.63s Setting up automation session
t = 1.36s Wait for com.callstack.agentdevice.runner to idle
2026-05-15 11:04:16.441477+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_DESIRED_PORT=55652
2026-05-15 11:04:16.444798+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_WAITING
2026-05-15 11:04:16.445161+0200 AgentDeviceRunnerUITests-Runner[11711:17962929] [] nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
2026-05-15 11:04:16.445394+0200 AgentDeviceRunnerUITests-Runner[11711:17962932] AGENT_DEVICE_RUNNER_LISTENER_READY
2026-05-15 11:04:16.445492+0200 AgentDeviceRunnerUITests-Runner[11711:17962932] AGENT_DEVICE_RUNNER_PORT=55652
2026-05-15 11:04:17.146924+0200 AgentDeviceRunnerUITests-Runner[11711:17962890] AGENT_DEVICE_RUNNER_ACTIVATE bundle=com.redacted.bundle state=2 reason=bundle_changed
t = 3.28s Open com.redacted.bundle
t = 3.28s Activate com.redacted.bundle
t = 3.31s Wait for com.redacted.bundle to idle
t = 3.40s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 4.40s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 4.40s Checking existence of Application 'com.redacted.bundle'
t = 4.59s Get all elements bound by index for: Descendants matching type Alert
t = 4.61s Get all elements bound by index for: Descendants matching type Sheet
t = 4.63s Get all elements bound by index for: Descendants matching type Window
t = 4.76s Checking existence of Window (Element at index 0)
t = 4.88s Find the Window (Element at index 0)
t = 5.02s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 5.16s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 5.29s Find the Application 'com.redacted.bundle'
[agent-device][diag] {"ts":"2026-05-15T09:04:29.744Z","level":"info","phase":"request_start","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"session":"default","command":"press"}}
[agent-device][diag] {"ts":"2026-05-15T09:04:29.744Z","level":"debug","phase":"platform_command_prepare","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"command":"press","platform":"ios","kind":"simulator"}}
t = 15.88s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 16.92s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 16.92s Checking existence of Application 'com.redacted.bundle'
t = 17.03s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 18.07s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 18.07s Checking existence of Application 'com.redacted.bundle'
t = 18.65s Find the Application 'com.redacted.bundle'
t = 18.76s Find the Window (First Match)
t = 18.77s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 18.77s Get all elements bound by index for: Descendants matching type Window
t = 18.89s Checking existence of Window (Element at index 0)
t = 19.02s Find the Window (Element at index 0)
t = 19.14s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 19.27s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (362.0, 816.0)
t = 19.27s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:04:49.747Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":180,"elapsedMs":20003,"remainingMs":24997}}
[agent-device][diag] {"ts":"2026-05-15T09:04:49.747Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":1,"maxAttempts":180,"delayMs":338.5077220718457,"elapsedMs":20003,"remainingMs":24997}}
[agent-device][diag] {"ts":"2026-05-15T09:05:10.091Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":2,"maxAttempts":180,"elapsedMs":40347,"remainingMs":4653}}
[agent-device][diag] {"ts":"2026-05-15T09:05:10.092Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":2,"maxAttempts":180,"delayMs":685.3676246677435,"elapsedMs":40348,"remainingMs":4652}}
[agent-device][diag] {"ts":"2026-05-15T09:05:14.748Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"exhausted","attempt":180,"maxAttempts":180,"elapsedMs":45004,"remainingMs":0}}
[agent-device][diag] {"ts":"2026-05-15T09:05:14.747Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":3,"maxAttempts":180,"elapsedMs":45003,"remainingMs":0}}
2026-05-15 11:05:20.091868+0200 AgentDeviceRunnerUITests-Runner[11711:17963022] [connection] nw_socket_handle_socket_event [C4:1] Socket SO_ERROR [54: Connection reset by peer]
2026-05-15 11:05:20.092054+0200 AgentDeviceRunnerUITests-Runner[11711:17963022] [connection] nw_protocol_socket_reset_linger [C4:1] setsockopt SO_LINGER failed [22: Invalid argument]
[agent-device][diag] {"ts":"2026-05-15T09:05:29.752Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":60,"elapsedMs":15003,"remainingMs":0}}
[agent-device][diag] {"ts":"2026-05-15T09:05:29.752Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"exhausted","attempt":60,"maxAttempts":60,"elapsedMs":15003,"remainingMs":0}}
** BUILD INTERRUPTED **
[agent-device][diag] {"ts":"2026-05-15T09:05:30.442Z","level":"info","phase":"runner_xctestrun_cache","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"action":"reuse","reason":"reuse_ready","derived":"/Users/alex/.agent-device/ios-runner/derived","xctestrunPath":"/Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner_AgentDeviceRunner_iphonesimulator26.2-arm64.xctestrun"}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.462Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":1,"maxAttempts":180,"elapsedMs":1,"remainingMs":44999}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.462Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":1,"maxAttempts":180,"delayMs":252.27366058723106,"elapsedMs":1,"remainingMs":44999}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.716Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":2,"maxAttempts":180,"delayMs":655.4649460366638,"elapsedMs":255,"remainingMs":44745}}
[agent-device][diag] {"ts":"2026-05-15T09:05:30.716Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":2,"maxAttempts":180,"elapsedMs":255,"remainingMs":44745}}
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -only-testing AgentDeviceRunnerUITests/RunnerTests/testCommand -parallel-testing-enabled NO -test-timeouts-enabled NO -collect-test-diagnostics never -maximum-concurrent-test-simulator-destinations 1 -destination-timeout 20 -xctestrun /Users/alex/.agent-device/ios-runner/derived/Build/Products/AgentDeviceRunner.env.session-F12C18EA-7E1C-4461-A1A5-42D19EE11159-55713.xctestrun -destination "platform=iOS Simulator,id=F12C18EA-7E1C-4461-A1A5-42D19EE11159"

2026-05-15 11:05:31.229 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:05:31.236 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
[agent-device][diag] {"ts":"2026-05-15T09:05:31.373Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":3,"maxAttempts":180,"elapsedMs":912,"remainingMs":44088}}
[agent-device][diag] {"ts":"2026-05-15T09:05:31.373Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":3,"maxAttempts":180,"delayMs":1330.6922946961802,"elapsedMs":912,"remainingMs":44088}}
2026-05-15 11:05:31.553 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
2026-05-15 11:05:32.161 xcodebuild[12041:17964934] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
[agent-device][diag] {"ts":"2026-05-15T09:05:32.705Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":4,"maxAttempts":180,"delayMs":2380.312207028922,"elapsedMs":2244,"remainingMs":42756}}
[agent-device][diag] {"ts":"2026-05-15T09:05:32.705Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":4,"maxAttempts":180,"elapsedMs":2244,"remainingMs":42756}}
2026-05-15 11:05:32.884693+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] [Default] Running tests...
t = nans Interface orientation changed to Portrait
Test Suite 'Selected tests' started at 2026-05-15 11:05:33.412.
Test Suite 'AgentDeviceRunnerUITests.xctest' started at 2026-05-15 11:05:33.412.
Test Suite 'RunnerTests' started at 2026-05-15 11:05:33.412.
Test Case '-[AgentDeviceRunnerUITests.RunnerTests testCommand]' started.
t = 0.00s Start Test at 2026-05-15 11:05:33.413
t = 0.02s Set Up
t = 0.02s Open com.callstack.agentdevice.runner
t = 0.02s Launch com.callstack.agentdevice.runner
t = 0.43s Setting up automation session
t = 1.28s Wait for com.callstack.agentdevice.runner to idle
[agent-device][diag] {"ts":"2026-05-15T09:05:35.091Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":5,"maxAttempts":180,"elapsedMs":4630,"remainingMs":40370}}
[agent-device][diag] {"ts":"2026-05-15T09:05:35.091Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":5,"maxAttempts":180,"delayMs":1863.8701827976045,"elapsedMs":4630,"remainingMs":40370}}
2026-05-15 11:05:35.914483+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_DESIRED_PORT=55713
2026-05-15 11:05:35.918253+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_WAITING
2026-05-15 11:05:35.918786+0200 AgentDeviceRunnerUITests-Runner[12045:17965098] [] nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory]
2026-05-15 11:05:35.919167+0200 AgentDeviceRunnerUITests-Runner[12045:17965116] AGENT_DEVICE_RUNNER_LISTENER_READY
2026-05-15 11:05:35.919219+0200 AgentDeviceRunnerUITests-Runner[12045:17965116] AGENT_DEVICE_RUNNER_PORT=55713
2026-05-15 11:05:36.978214+0200 AgentDeviceRunnerUITests-Runner[12045:17965061] AGENT_DEVICE_RUNNER_ACTIVATE bundle=com.redacted.bundle state=2 reason=bundle_changed
t = 3.57s Open com.redacted.bundle
t = 3.57s Activate com.redacted.bundle
t = 3.60s Wait for com.redacted.bundle to idle
t = 3.61s Waiting 30.0s for Application 'com.redacted.bundle' to exist
t = 4.69s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 4.69s Checking existence of Application 'com.redacted.bundle'
t = 4.81s Waiting 2.0s for Application 'com.redacted.bundle' to exist
t = 5.85s Checking Expect predicate existsNoRetry == 1 for object Application 'com.redacted.bundle'
t = 5.85s Checking existence of Application 'com.redacted.bundle'
t = 6.22s Find the Application 'com.redacted.bundle'
t = 6.34s Find the Window (First Match)
t = 6.34s Checking existence of Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 6.35s Get all elements bound by index for: Descendants matching type Window
t = 6.47s Checking existence of Window (Element at index 0)
t = 6.60s Find the Window (Element at index 0)
t = 6.72s Find the Window at {{0.0, 0.0}, {402.0, 874.0}}
t = 6.85s Tap Window at {{0.0, 0.0}, {402.0, 874.0}}[0.00, 0.00] -> (362.0, 816.0)
t = 6.85s Wait for com.redacted.bundle to idle
[agent-device][diag] {"ts":"2026-05-15T09:05:56.955Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":6,"maxAttempts":180,"elapsedMs":26494,"remainingMs":18506}}
[agent-device][diag] {"ts":"2026-05-15T09:05:56.955Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":6,"maxAttempts":180,"delayMs":1791.1067548734652,"elapsedMs":26494,"remainingMs":18506}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.751Z","level":"warn","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"attempt_failed","attempt":7,"maxAttempts":180,"elapsedMs":29290,"remainingMs":15710}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.751Z","level":"error","phase":"request_failed","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"code":"COMMAND_FAILED","message":"request canceled"}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.751Z","level":"error","phase":"platform_command","session":"default","requestId":"458b4bd0a6dca39e","command":"press","durationMs":90007,"data":{"command":"press","platform":"ios","error":"request canceled"}}
[agent-device][diag] {"ts":"2026-05-15T09:05:59.751Z","level":"debug","phase":"retry","session":"default","requestId":"458b4bd0a6dca39e","command":"press","data":{"phase":"ios_runner_connect","event":"retry_scheduled","attempt":7,"maxAttempts":180,"delayMs":2085.7591577428975,"elapsedMs":29290,"remainingMs":15710}}
** BUILD INTERRUPTED **

or log.txt

but basically XCTest hangs after Tap on Wait for bundle id to idle

a description of possible fix from Codex:

Fixes an iOS runner failure where agent-device press @ref resolves the ref correctly and synthesizes the tap, but XCTest then hangs at:

Tap Window ... -> (362.0, 816.0)
Wait for com.redacted.bundle to idle

In the attached log, the press request then keeps retrying runner connection attempts and eventually fails with:

Error (COMMAND_FAILED): Daemon request timed out
timeoutMs: 90000
timedOutRunnerPidsTerminated: 1

The fix keeps read-only commands on the existing retry/startup path, but changes mutating commands to probe runner readiness with uptime and then send the actual press once. It also runs XCTest gestures with pre/post quiescence waiting skipped when supported, so the runner does not block forever after a tap on apps that do not report idle promptly.

Copilot AI review requested due to automatic review settings May 15, 2026 09:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to address iOS press commands timing out/hanging (notably around XCTest “Wait for … to idle”) by changing how runner commands are dispatched (read-only vs mutating) and by adjusting XCTest interaction behavior to avoid quiescence waits that can hang indefinitely.

Changes:

  • Refactors runner endpoint resolution and introduces sendRunnerCommandOnce for one-shot (non-retrying) command dispatch.
  • Routes read-only commands through the existing waitForRunner retry/fallback path, while mutating commands do a readiness probe (uptime) and then send the actual command once.
  • Updates iOS runner UI tests lifecycle helpers to skip pre/post-gesture quiescence when supported, and adds a transport-level unit test for the one-shot dispatch behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/platforms/ios/runner-transport.ts Extracts endpoint resolver logic and adds sendRunnerCommandOnce for non-retrying command sends.
src/platforms/ios/runner-session.ts Changes command execution flow: read-only uses waitForRunner, mutating commands probe readiness then send once.
src/platforms/ios/runner-client.ts Narrows the “restart runner session on connect failure” behavior to read-only commands.
src/platforms/ios/__tests__/runner-transport.test.ts Adds unit test asserting sendRunnerCommandOnce does not retry/fallback.
ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift Skips quiescence waits (when supported) and guards idle-timeout mutation more defensively.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +176 to +204
export async function sendRunnerCommandOnce(
device: DeviceInfo,
port: number,
command: RunnerCommand,
timeoutMs: number = RUNNER_COMMAND_TIMEOUT_MS,
signal?: AbortSignal,
): Promise<Response> {
if (signal?.aborted) {
throw createRequestCanceledError();
}
const { getEndpoints } = createRunnerEndpointResolver(device, port);
const { endpoints } = await getEndpoints(timeoutMs);
const endpoint = endpoints[0];
if (!endpoint) {
throw new AppError('COMMAND_FAILED', 'Runner command endpoint not available', {
port,
endpoints,
});
}
return await fetchWithTimeout(
endpoint,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(command),
},
timeoutMs,
signal,
);
Comment on lines +338 to 363
const readOnlyCommand = isReadOnlyRunnerCommand(command.command);
if (readOnlyCommand) {
const response = await waitForRunner(
device,
session.port,
command,
logPath,
timeoutMs,
session,
signal,
);
return await parseRunnerResponse(response, session, logPath);
}

const readinessResponse = await waitForRunner(
device,
session.port,
command,
{ command: 'uptime' },
logPath,
timeoutMs,
RUNNER_STARTUP_TIMEOUT_MS,
session,
signal,
);
await parseRunnerResponse(readinessResponse, session, logPath);
const response = await sendRunnerCommandOnce(device, session.port, command, timeoutMs, signal);
return await parseRunnerResponse(response, session, logPath);
Copilot AI review requested due to automatic review settings May 15, 2026 10:51
@thymikee thymikee force-pushed the fix/ios-press-idle-timeout branch from 764327d to abf46a3 Compare May 15, 2026 10:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@thymikee thymikee force-pushed the fix/ios-press-idle-timeout branch from abf46a3 to 8f36b12 Compare May 15, 2026 11:13
Copilot AI review requested due to automatic review settings May 15, 2026 11:18
@thymikee thymikee force-pushed the fix/ios-press-idle-timeout branch from 8f36b12 to b92e6ec Compare May 15, 2026 11:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@thymikee thymikee merged commit d67e988 into callstackincubator:main May 15, 2026
12 checks passed
@thymikee
Copy link
Copy Markdown
Member

Thank you @demchenkoalex!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants