iOS input fails in 0.21.34+ when Apple tools resolve past a stale Xcode selection symlink
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios, macos, typescript
- 領域
- mobile-dev
調査の方向性
Start in packages/platform-apple/src/runner/runner-toolchain-identity.ts, where selectionLinkTarget() throws on a dangling /var/db/xcode_select_link, then read its test at src/runner/tests/runner-toolchain-identity.test.ts lines 68-79, which enforces that assumption. Run that test file to see the current failure. Done means a stale legacy link no longer blocks input when the active developer directory resolves. Open PR #4146 already targets this, so check it before starting.
索引モデルが issue の本文から書いたものです。
説明
agent-device 0.21.35 rejects iOS input on a Mac where Apple's tools successfully resolve the current Xcode, because an obsolete /var/db/xcode_select_link still points at a deleted installation. The same interaction succeeds with 0.21.33 on the unchanged machine.
Environment
- macOS 27.0.1, build 26A434, Apple Silicon
- Xcode 27.0, build 27A266a, installed at
/Applications/Xcode.app - iOS Simulator 27.0; tested on an iPhone 18 Pro simulator
- Node.js 22.20.0
DEVELOPER_DIRis unset- Tested versions: 0.21.33 passes, 0.21.35 fails
Toolchain state
The obsolete symlink exists, but its target no longer exists:
/var/db/xcode_select_link -> /Applications/Xcode-16.2.0.16C5032a.app/Contents/Developer
Apple's tools resolve the installed Xcode successfully, including with an empty environment:
$ env -i PATH=/usr/bin:/bin /usr/bin/xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ env -i PATH=/usr/bin:/bin /usr/bin/xcrun --find xcodebuild
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
$ xcodebuild -version
Xcode 27.0
Build version 27A266a
$ xcrun --sdk iphonesimulator --show-sdk-version
27.0
$ xcrun --sdk iphonesimulator --show-sdk-build-version
24A430
Reproduction
On a Mac with the toolchain state above, use agent-device 0.21.35's MCP server and a booted iOS simulator:
- Call
openwith a named session,platform: "ios", the simulator'sudid, andapp: "com.apple.Preferences". - Call
snapshotwith that session andinteractiveOnly: true. - Call
presson the current snapshot ref for General, withsettle: true.
open and snapshot succeed. screenshot also succeeds. press fails before dispatch:
code: COMMAND_FAILED
reason: apple_toolchain_unreadable
file: /var/db/xcode_select_link
detail: dangling selection link
dispatched: no
The error says it could not read the Xcode toolchain versions used for the Apple runner cache key, and suggests checking xcode-select -p or DEVELOPER_DIR. xcode-select -p already reports the working installation above.
Version comparison
With 0.21.33, on the same booted simulator and with no DEVELOPER_DIR override or system configuration changes, I verified:
- Open Settings and read its accessibility snapshot.
- Press General and verify that About appears on the resulting screen.
- Navigate back and close the session.
After pinning Mobile Dev to 0.21.33, I repeated the interaction through its packaged Claude server, including a screenshot and a batch command; all passed without an Xcode override.
Regression source
This comes from #3995, first included in 0.21.34. The published 0.21.34 and 0.21.35 packages contain the new identity reader; 0.21.33 does not. The live failing interaction above was tested on 0.21.35.
selectionLinkTarget() in v0.21.35 throws when the legacy symlink cannot be resolved. Its assumption that a dangling link means Apple cannot resolve a working developer directory does not hold on this machine. The corresponding test explicitly enforces that assumption.
I understand the change avoids stalled xcrun probes on hosted runners. The remaining correctness requirement is that the cache fingerprint identify the same Xcode that Apple's tools actually use. A stale legacy symlink should not block device input when the active developer directory resolves successfully.
- 主要言語
- TypeScript
- スター
- 5.2k
- フォーク
- 359
- 平均マージ
- 13時間 31分
- マージ済み PR(30日)
- 664
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
callstack/agent-device#4112 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed read対応中かも @pcbeingused333 が 2 日前に担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
callstack/agent-device#4018 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 48/100
callstack/agent-device#4142 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
callstack/agent-device#4110 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
LibreChat-AI/LibreChat#17733 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TypeStrong/typedoc#3150 ·
-
accessibility bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Normalize image-source MIME types before SVG dispatch対応中かも @HarsH-1877 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tscircuit/image-utils#58 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信