Skip to content

iOS 17.5: open --launch-url still leaves the "Open in" alert up in 5/22 runs on 0.21.29: the runner's accept times out (main thread execution timed out) #3861

Open

Description

@MoogyG

Summary

Follow-up to #3702, as requested when it was closed. With 0.21.29 on fresh iOS 17.5 simulators, open --launch-url now reads the "Open in “”?" title correctly, but still leaves the alert on screen in 5 runs out of 22. In those runs, the runner times out while pressing Open, so open fails with launch_confirmation_unanswered and no session is opened. Answering by hand with alert accept then also failed in 3 of 4 tries.

Environment

Steps

npx agent-device open <bundle-id> --launch-url "<scheme>://..." --platform ios --udid "$SIM" --relaunch --foreground --json --debug
npx agent-device alert get --platform ios --udid "$SIM"
npx agent-device alert accept --platform ios --udid "$SIM"   # only when open failed
npx agent-device wait 'id="<testID>"' 30000 --platform ios --udid "$SIM"

Results

Series Runs open --launch-url … --json
1 11 exit 0, launchConfirmation: "accepted" 10 times; exit 1 once
2 11 exit 0, launchConfirmation: "accepted" 7 times; exit 1 4 times

When open fails, it returns this --json output, the same in all 5 runs (local paths and diagnostic ID removed):

{
  "success": false,
  "error": {
    "code": "COMMAND_FAILED",
    "message": "The Simulator has not completed the launch URL for <bundle-id>.",
    "hint": "iOS may still be holding an \"Open in\" prompt, or the answer died with the runner session that raised it. Inspect the current alert before deciding on another action.",
    "details": {
      "reason": "launch_confirmation_unanswered",
      "appBundleId": "<bundle-id>",
      "dispatched": "unknown"
    }
  }
}

The request log contains ios_launch_confirmation_unanswered {"reason":"alert-still-present"}. In each failed run, alert get then returns Open in “RN Template”? (exit 0), so the title is no longer the problem.

In the one failed run where I read the runner log (series 1), the sequence inside open is:

  1. The first alert read is sent right after runner startup (health check about 9.8 s) and completes ok=1.
  2. The alert accept fails after 10 s: AGENT_DEVICE_RUNNER_COMMAND_FAILED command=alert … error=… "main thread execution timed out".
  3. A second alert read completes and finds the alert still present, so open fails.

In series 2, I followed the open hint and ran alert accept by hand in the 4 failed runs:

alert accept Runs
accepted 1
ALERT_DEADLINE_EXCEEDED ("alert accept exhausted its deadline", hint "The button was activated once") 2
COMMAND_FAILED "main thread execution timed out" 1

Because open failed, no session exists afterwards, so the following wait returns SESSION_NOT_FOUND even after a successful alert accept. I did not measure recovery by a second open.

All 17 runs where open returned accepted went on normally: alert get returned alert not found, and wait succeeded.

A second simulator, booted by an unrelated CI job, was running on the same host at least at the start of the measurement, so host load may play a role. I have not established that it does.

Expected

On iOS 17.5, open --launch-url accepts the "Open in" alert on every run, as it did with the nightly and does on iOS 27.0. If pressing the button can time out on a runner that has just started, I would expect it to be retried within open's own budget rather than failing the open.

Related

Activity

  1. thymikee commented on Oct 22, 2026

    @thymikee
    Member

    Triage: bug; actionable without more input from you. Thanks, the 5-of-22 table and the runner-log sequence pin it down. The title is now read correctly. The remaining failure is the accept itself: on a freshly started runner, the Open press can time out with "main thread execution timed out". open then reads the alert as still present and fails, even though its own budget has time left for another accept. The fix keeps answering the confirmation within open's budget while the alert is still up. An agent can pick this up.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions