Skip to content

iOS 17.5: open --launch-url leaves the "Open in" alert unanswered because the runner reads its title as "0 pages" #3702

Closed

Description

@MoogyG

Summary

On an iOS 17.5 simulator, open --launch-url does not answer the first-deep-link confirmation alert ("Open in “”?", buttons Cancel / Open). The runner reads the alert's buttons correctly but reports its title as 0 pages, so answerLaunchConfirmation rejects it as alert-unrecognized, leaves it on screen, and open still exits 0 with no error. On iOS 27.0 the same sequence reads the right title and accepts the alert.

Environment

  • agent-device 0.21.28
  • Xcode 27.0, iPhone 15 simulator, freshly created, app installed with simctl install, deep link never received before
  • Expo development build, custom URL scheme owned by the app

Steps

npx agent-device open <bundle-id> --launch-url "<scheme>://..." --platform ios --udid "$SIM" --relaunch --foreground --json --debug
npx agent-device wait 'id="<testID>"' 15000

Results

iOS Trials open --launch-url … --json Alert
17.5 2/2 exit 0, no launchConfirmation, warning initial interactive snapshot failed (COMMAND_FAILED: app '<bundle-id>' is not running) stays on screen; alert get returns Open in “RN Template”?; alert accept then wait succeed
27.0 2/2 exit 0, launchConfirmation: "accepted" accepted

Request log (data.requestLogPath) on iOS 17.5:

ios_launch_confirmation_unanswered {"reason":"alert-unrecognized","title":"0 pages","buttons":["Cancel","Open"]}

Analysis (unverified)

launch-confirmation.js only accepts a title matching ^Open in [“"].+[”"]\?$. The title comes from preferredAlertTitle in RunnerTests+Alert.swift, which returns the first non-empty, non-button descendant label of the alert root. On iOS 17.5 that seems to pick up the Home Screen page indicator ("0 pages") rather than the alert title. A later alert get does return the right title.

Expected

  1. On iOS 17.5, open --launch-url recognizes and accepts the "Open in" alert, as it does on iOS 27.0.
  2. When an alert is present but not recognized, open reports it (launchConfirmation with an unanswered outcome and a hint such as alert accept) instead of exiting 0 silently.

Related

Activity

  1. MoogyG commented on Oct 16, 2026

    @MoogyG
    Author

    Follow-up measurement: the failure is intermittent on iOS 17.5, not systematic.

    Same setup (agent-device 0.21.28, Xcode 27.0, iPhone 15 simulators freshly created, app installed with simctl install, deep link never received before):

    iOS open --launch-url … --json
    17.5 alert left on screen 8 times out of 11 (ios_launch_confirmation_unanswered, alert-unrecognized, title 0 pages); launchConfirmation: "accepted" the other 3 times
    27.0 launchConfirmation: "accepted" 4 times out of 4

    When the alert is left, alert get then alert accept in the same session succeed every time (6/6). The successful iOS 17.5 runs were not obviously tied to one setup: one followed expo run:ios on the same simulator, the others used simctl install only. A fix should therefore be validated over several fresh iOS 17.5 simulators, not a single run.

  2. thymikee commented on Oct 16, 2026

    @thymikee
    Member

    Triage: bug; actionable without more input from you. Thanks, the 8-of-11 numbers on 17.5 help.

    Two parts. The runner's alert title read walks every descendant of the resolution root and can return a SpringBoard label ("0 pages") instead of the alert's own title. And open should surface an unanswered launch confirmation with an alert accept hint, not exit 0 silently. The fix reads the title from the alert itself, and validation covers several fresh iOS 17.5 simulators, as you suggest.

  3. thymikee commented on Oct 16, 2026

    @thymikee
    Member

    An agent is picking this up; the PR will link here.

  4. thymikee commented on Oct 20, 2026

    @thymikee
    Member

    #3732 is in nightly 0.21.29-nightly.20261019.75 (npm i -g agent-device@nightly). Two changes: the runner reads the alert's own title, and open no longer exits 0 while the launch confirmation is still on screen. It reports ios_launch_confirmation_unanswered with an alert accept hint instead. We had no iOS 17.5 runtime, so please repeat your 11-run table on fresh 17.5 simulators with the nightly:

    • how many runs still leave the alert up
    • for those runs, the --json output of open
  5. added
    needs-infoWaiting on reporter or external input
    and removed
    in-progressWork is actively in progress
    on Oct 20, 2026
  6. MoogyG commented on Oct 20, 2026

    @MoogyG
    Author

    Repeated the measurement with the nightly on fresh iOS 17.5 simulators: the alert is accepted on every run.

    Setup: Xcode 27.1, one iPhone 15 simulator created per run (deleted afterwards), app installed with simctl install, deep link never received before, then open <bundle id> --launch-url "<scheme>://…" --platform ios --udid <udid> --relaunch --foreground --json --debug.

    agent-device iOS 17.5 runs open --launch-url … --json
    0.21.29-nightly.20261020.76 11 rc 0, launchConfirmation: "accepted" 11 times out of 11; alert get afterwards: alert not found; app loads
    0.21.28 (control, same host and setup) 6 rc 0, no launchConfirmation, warning initial interactive snapshot failed (COMMAND_FAILED: app '…' is not running); request log ios_launch_confirmation_unanswered {"reason":"alert-unrecognized","title":"0 pages","buttons":["Cancel","Open"]} 6 times out of 6

    The 0.21.28 control was needed because the host moved from Xcode 27.0 to 27.1 since my earlier table; on 27.1 the old version fails every time, so the change comes from #3732, not from Xcode.

    Nightly output of a run (all 11 identical apart from ids and timings, open in 9–10 s):

    {"success":true,"data":{"appBundleId":"…","platform":"ios","launchConfirmation":"accepted","message":"Opened: …"}}

    Since no run left the alert up, the new unanswered / alert-unrecognized reporting path was not exercised.

  7. thymikee commented on Oct 21, 2026

    @thymikee
    Member

    Thanks, the 11-of-11 run against the 0.21.28 control on the same Xcode settles it. #3732 shipped in 0.21.29, so I'm closing this. If an alert is ever left up again, open now reports ios_launch_confirmation_unanswered; please open a new issue with that --json output.

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