iOS: on a non-English Simulator, the `Open in` launch confirmation can be answered only by tapping coordinates: `alert accept` refuses its label and reads refuse the app that is not running
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- ios, typescript
- 領域
- cli, mobile-dev
調査の方向性
Start with RunnerAlertButtonChoice.swift, launch-confirmation.ts, and the alert command handling to trace how button labels are matched and how launch confirmations are detected. Read the related guidance in commands.md and inspect the APP_NOT_RUNNING refusal and alert tests. Done means a caller can select a uniquely matching button by its exact label on a system alert while the app is stopped, with missing or duplicate labels refused and the relevant guidance updated.
索引モデルが issue の本文から書いたものです。
説明
Summary
On an iOS simulator set to a non-English language, the Open in “<App>”? launch confirmation that open --launch-url raises cannot be answered with any agent-device command except a press at screen coordinates:
openreports it as expected:launchConfirmation: "unanswered",launchConfirmationReason: "alert-unrecognized", and a warning that says to answer it withalert accept.commands.mdgives the same step for "a non-English Simulator".alert acceptrefuses it withALERT_BUTTON_NOT_FOUND, because the button label (Ouvririn French) is not in the English label list. This refusal is intended since #3715.- The documented way to answer an alert with unrecognized labels, "read the labels with
alert get, then press the button by label throughsnapshot+press @ref" (commands.md), does not work either: the confirmation keeps the app from starting, andsnapshotandfindrefuse withAPP_NOT_RUNNING. Their hint again says to answer withalert accept.
So every step that the warning, the hints and the docs give ends in a refusal. The agent can continue only if it takes a screenshot, reads the button position, and taps the coordinates.
We do not ask alert accept to guess a localized button. We agree with the reason in #3715: a guessed tap can record a permission. We ask for a way to name the button explicitly (see Suggested fix).
Environment
- agent-device 0.21.30.
RunnerAlertButtonChoice.swift,launch-confirmation.tsand theAPP_NOT_RUNNINGrefusal are the same in 0.21.31 and onmain(b08b5e7). On 0.21.29, one run gave the sameopen,alert acceptandfind textresults (snapshot -iwas not run). - macOS 26.6.2, Xcode 27.1, Node 24.22.1.
- New iPhone 17e simulator on iOS 27.0, language
fr-FRand localefr_FR(defaults write -g AppleLanguages/AppleLocale, then a reboot). - Expo development build installed with
xcrun simctl install. Its URL scheme is not pre-approved, so iOS shows the confirmation on the first deep link.
Steps
npx agent-device open <bundle-id> --launch-url "<scheme>://..." --platform ios --udid "$SIM" --relaunch --json
npx agent-device alert get --platform ios --udid "$SIM" --json
npx agent-device alert accept --platform ios --udid "$SIM" --json # the step that the warning gives
npx agent-device snapshot -i --platform ios --udid "$SIM" --json # the documented fallback for unrecognized labels
npx agent-device find text "Ouvrir" click --platform ios --udid "$SIM"
npx agent-device press 268 451 --platform ios --udid "$SIM" # position of "Ouvrir", read on a screenshot
Results
open: exit code 0,launchConfirmation: "unanswered",launchConfirmationReason: "alert-unrecognized", warning: "iOS shows an alert this open did not recognize (alert-unrecognized), so it left the launch URL unconfirmed. Inspect the current alert withalert getbefore answering it withalert accept."alert get:message: "Ouvrir dans « Modèle RN » ?",items: ["Annuler", "Ouvrir"].alert accept: exit code 1,ALERT_BUTTON_NOT_FOUND, "alert accept button not found",details.dispatched: "no".snapshot -iandfind text "Ouvrir" click: exit code 1,runnerErrorCode: APP_NOT_RUNNING, "app '' is not running", hint: "Reads do not launch the app. Relaunch it with open; if a system prompt such as a deep-link confirmation holds its launch, answer it with alert accept."press 268 451:Tapped. After that,alert getreturnedalert not foundandappstatereturnedrunningForeground.
Cause
- The runner selects the button only from English patterns:
RunnerAlertButtonChoice(^open$,^cancel$, …). This is intended (#3715). openrecognizes the confirmation only from its English title and buttons:LAUNCH_CONFIRMATION_TITLEandisLaunchConfirmation. On a non-English Simulator, this givesalert-unrecognized, as #3732 measured.- Reads do not activate an app that is not running, so that they do not drop the URL that the confirmation holds (
notRunningRefusal, #2852). Thussnapshotandpress @refcannot reach the confirmation.
Each of these rules is correct alone. Together, they leave the alert commands, which do reach the confirmation, as the only way to answer it, and those commands only accept English labels.
Suggested fix
- Let the caller name the button: for example
alert accept --button "<label>"andalert dismiss --button "<label>", oralert press "<label>". The runner activates the button whose label is exactly the given text, through the same alert path asalert accept, so it also works on a SpringBoard alert when the app is not running. It refuses withALERT_BUTTON_NOT_FOUNDwhen no button or more than one button has that label. Nothing is guessed: the caller reads the labels withalert getand chooses one. - Point the
alert-unrecognizedwarning, theAPP_NOT_RUNNINGhint, theALERT_BUTTON_NOT_FOUNDhint,help alertandcommands.mdto that option when the labels are not English.
The same option also helps with app alerts. On the App Tracking Transparency prompt on a French simulator (Xcode 27.1, iOS 27.0), alert dismiss (0.21.29 and 0.21.30) and alert accept (0.21.29) also refuse with ALERT_BUTTON_NOT_FOUND. There, the app is running, so snapshot -i and find text "Demander à l’app de ne pas me suivre" click work, but each localized alert costs a screenshot and a lookup of the label.
Expected
On a non-English Simulator, an alert command answers the launch confirmation and other system alerts with a button that the caller names, without screen coordinates and without a guessed tap.
Related
- #3921: the
alert-unrecognizedwarning says toalert accept. Its suggested fix keepsalert acceptfor a translatedOpen inprompt, which this issue shows is refused. - #3732: added
alert-unrecognized; its live test on a French simulator saw this confirmation reported asunanswered. - #3627 / #3715:
alert dismissrefuses unknown and localized labels instead of guessing. - #2852: reads refuse an app that is not running.
- 主要言語
- TypeScript
- スター
- 5.1k
- フォーク
- 339
- 平均マージ
- 12時間 50分
- マージ済み PR(30日)
- 632
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
Taps on Jetpack Compose buttons refused because of the fake Button child node対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstack/agent-device#3982 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
callstack/agent-device#3945 ·
メンテナーはふだん 1 日以内に返信
-
Limrun iOS fill reports success but drops non-ASCII text対応中かも @mvanhorn が 5 日前に担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
callstack/agent-device#3819 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
callstack/agent-device#3981 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
VictoriaMetrics/victorialogs-datasource#747 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
esengine/DeepSeek-Reasonix#14608 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getarcaneapp/arcane#4590 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Clouditera/VulnHunter#57 ·