iOS: fill/type with coordinates crashes the runner when the app AX root snapshot is rejected (XCPointerEventPath assertion)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- ios, swift, typescript
- Bereich
- mobile, testing-qa
Rechercherichtung
Start with RunnerTests+TextEntryFocus.swift and trace focusTextInputForTextEntry through the synthesized gesture and text-entry routes. Check how synthesizedCoordinateContext reports unavailable accessibility health and how the replacement route is selected; the issue also flags the sole-screen reference frame. Done means coordinate text entry does not crash the runner when AX snapshots are rejected, and the reported frame behavior is investigated.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Written by an AI agent on behalf of @gursheyss.
Problem
On iOS, fill / type with coordinates kills the XCUITest runner when the app's accessibility root can't be snapshotted. The daemon then reports:
ENGINE_FAILURE perform fill failed: Runner command "type" lost its transport response and the status probe failed
tap on the same screen keeps working, because it routes through the synthesized coordinate tap. focusTextInputForTextEntry (RunnerTests+TextEntryFocus.swift) calls tapAt(app:x:y:) instead, and that uses XCUICoordinate. With the app root rejected, XCTest asserts inside the coordinate tap and the runner's testCommand dies.
Environment
- agent-device 0.21.36 (installed from npm, driven by e2e 0.21.3)
- iPhone 17 Pro simulator, iOS 26.5, macOS arm64 host
- React Native (Expo) app
Trigger
On the failing screen, the app's accessibility tree is 62 levels deep, which is XCTest's snapshot depth limit. A raw agent-device snapshot --raw --json still succeeds there and reports max depth 62 with 7 nodes at that depth. Every XCUIApplication query, though, starts recording:
Failed to resolve query: Error kAXErrorIllegalArgument getting snapshot for element <AXUIElementRef …> {pid=<app>} {uid=[ID:1 hash:0x0]}
It begins right after a reply that renders a horizontally scrolling table inside a chat bubble, which adds about 6 levels. Screens below the limit don't show it.
Runner log (before)
AGENT_DEVICE_RUNNER_COMMAND_ACCEPTED command=tap …
AGENT_DEVICE_RUNNER_AX_SNAPSHOT_ISSUE_SUPPRESSED … kAXErrorIllegalArgument getting snapshot for element … {uid=[ID:1 hash:0x0]}
AGENT_DEVICE_RUNNER_SYNTHESIZED_SOLE_SCREEN_ROUTE resolved={{0, 0}, {320, 480}}
AGENT_DEVICE_RUNNER_SYNTHESIZED_GESTURE_POLICY kind=coordinateTap axHealth=unavailable fallbackAllowed=true fallbackAttempted=false
AGENT_DEVICE_RUNNER_COMMAND_COMPLETED command=tap … ok=1
AGENT_DEVICE_RUNNER_COMMAND_ACCEPTED command=type …
AGENT_DEVICE_RUNNER_RECORDED_ISSUE_HELD issue=Failed to resolve query: Error kAXErrorIllegalArgument getting snapshot for element …
No element snapshot found for Application … -> (201.0, 462.0)
*** Assertion failure in -[XCPointerEventPath initForTouchAtPoint:offset:], XCSynthesizedEventRecord.m:282
After this the runner never answers the type command, and the daemon reboots it, losing the rest of the session.
Workaround we're carrying (pnpm patch)
In focusTextInputForTextEntry, when synthesizedCoordinateContext(app:) reports accessibilityHealth == .unavailable, focus with performSynthesizedGesture(.coordinateTap) / synthesizedTapAt. Only if that isn't .performed does it fall back to tapAt:
var focusTapped = false
#if os(iOS)
let context = synthesizedCoordinateContext(app: app)
if context?.accessibilityHealth == .unavailable,
case .performed = performSynthesizedGesture(app, kind: .coordinateTap, context: context, synthesize: {
synthesizedTapAt(app: app, x: tapPoint.x, y: tapPoint.y, context: context)
})
{
focusTapped = true
}
#endif
if !focusTapped {
_ = tapAt(app: app, x: tapPoint.x, y: tapPoint.y)
}
With it, 7 of 7 runs kept the runner alive, with 0 transport losses (before: 4 of 7 died this way). fill still fails, but now cleanly and with a clear message:
perform fill failed: no text input found at the provided coordinates to clear
That's because textInputAt, the keyboard check and read-back all go through XCTest queries, which fail the same way. The replacement route that skips them (shouldUseResolvedCoordinateTextEntryRoute / shouldUseSynthesizedFirstResponderReplacement) only turns on when the XCTest channel is penalized, not when accessibilityHealth is .unavailable.
Asks
- Don't call the XCUICoordinate tap from text-entry focus when AX health is unavailable. A runner crash takes down every later command in the session.
- Consider letting the synthesized first-responder replacement route also cover
accessibilityHealth == .unavailable, sofillcan work on screens past the depth limit. - Separately, the sole-screen reference frame came back as
{{0, 0}, {320, 480}}on a 402×874 device. That looks wrong, though taps still landed.
We haven't built a standalone repro app. The cianru/deep-view-snapshot-poc example (136 levels) is likely enough to show the same rejection.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 5.3k
- Forks
- 377
- Ø Merge
- 13 Std. 58 Min.
- Gemergte PRs (30 T.)
- 654
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstack/agent-device
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed readEvtl. vergeben @pcbeingused333 hat das vor 6 Tagen übernommen. Offenbug ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
callstack/agent-device#4018 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
callstack/agent-device#1869 ·
Maintainer antworten meist innerhalb von 1 Tag
-
iOS simulator: in-flight `prepare ios-runner` keeps retrying the old runner port after the runner is relaunched on a new portEvtl. vergeben @twotnguyen hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
callstack/agent-device#4265 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug ready-for-agent
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
callstack/agent-device#4264 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug ready-for-agent
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
callstack/agent-device#4262 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in callstack/agent-device
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Yeraze/meshmonitor#6239 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
better-auth/better-auth#12292 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
area:ui bug effort:S priority:P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Typo in WSL project description on Projects pageEvtl. vergeben @akhil9tiet hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
microsoft/opensource.microsoft.com#1066 · 1 Kommentar ·