Maestro `eraseText` fails on real Android devices: `test` and `replay` cannot opt in to the test IME
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 74/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- android, typescript
调研方向
Start with packages/maestro/src/daemon-port/daemon-runtime-port.ts and src/daemon/session-lifecycle/internal/session-open-execution.ts, then trace the test and replay command entry points. Check how open --test-ime activates the helper and how shouldActivateAndroidTestIme handles real devices. Done means test and replay offer an opt-in, eraseText passes on real devices, and the device keyboard is restored while the default remains off.
由索引模型根据 Issue 内容生成。
描述
Summary
On a real Android device, a Maestro flow with eraseText fails under agent-device test --maestro:
Replay failed at step 27 (eraseText): Android text input requires provider-native text injection or the bundled test IME helper for non-ASCII/control characters; the adb-shell fallback supports ASCII text only. On emulators the test IME activates automatically; on real devices pass `open --test-ime` to enable it
The same flow passes on an emulator. ASCII inputText works on the device.
Cause
eraseText types backspace characters:
Backspace is a control character, so it needs the test IME. On real devices the test IME is opt-in through open --test-ime:
test and replay have no such flag, so a flow run on a real device never gets the test IME.
What I tried
open --test-ime --session <name>, thentest --session <name>: fails atlaunchAppwithandroid device <serial> is owned by session "<name>"- same with
replay --maestro --session <name>: same error {"testIme": true}in a config file passed throughAGENT_DEVICE_CONFIG:teststill fails with the error aboveadb shell ime setto the helper beforetest: still fails with the error above
Check with the test IME on
Local patch: shouldActivateAndroidTestIme returns true for real devices. With it, a flow with eraseText passes on the device, and the device keyboard is restored after the run.
Request
An opt-in for flow runs. The real-device default stays off, as decided in #1198. For example:
--test-imeontestandreplay- or
testImefromagent-device.jsonfor flow runs
Environment
- agent-device 0.21.14. Same gating in 0.21.15 and on
mainat 16e0757 - Pixel 8, Android 17, USB
- macOS host
- 主要语言
- TypeScript
- 星标
- 4.7k
- 派生
- 304
- 平均合并
- 11 小时 25 分钟
- 30 天内合并 PR
- 545
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
ready-for-agent
难度 2/5 1-3 小时 新手友好度 84/100
callstack/agent-device#2995 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 75/100
callstack/agent-device#3047 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 45/100
callstack/agent-device#3021 ·
维护者通常 1 天内回复
-
ready-for-agent
难度 3/5 1-2 天 新手友好度 68/100
callstack/agent-device#3004 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
priority: P2
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 65/100
prime-radiant-inc/evener#3291 ·
维护者通常 1 天内回复
-
accessibility bug revealjs
难度 2/5 1-3 小时 新手友好度 84/100
quarto-dev/quarto-cli#14961 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
supabase/agent-skills#614 ·
-
Content
难度 2/5 1-3 小时 新手友好度 68/100
RunestoneInteractive/rs#1559 · 1 条评论 ·
维护者通常 2 天内回复