Android: open leaves the real keyboard active when the test IME helper disappears while the daemon is alive
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- android, typescript
调研方向
先阅读 dist/src/ime-state.js,尤其是 ensureHelperInstalled 及其模块级缓存;追踪 open 在哪里调用它,并检查相关测试。通过以下步骤复现:打开一个 Android 应用,在 daemon 仍运行时卸载测试用 IME helper,然后再次打开应用。完成时应能重新检查 helper 是否缺失并重新安装,或者 open 发出警告或失败,而不是在真实键盘处于活动状态时报告成功。
由索引模型根据 Issue 内容生成。
描述
Summary
On Android, the daemon remembers per device that the test IME helper (com.callstack.agentdevice.imehelper) is installed, and never re-checks it during its lifetime. If the helper disappears from the device while the daemon is still alive, the next open leaves the real keyboard active and reports success, with no warning.
Reproduction
agent-device 0.21.24, Android emulator API 32, single daemon started by the first command.
npx agent-device open com.android.settings --platform android
adb shell settings get secure default_input_method # com.callstack.agentdevice.imehelper/.TestInputMethodService
npx agent-device close
adb uninstall com.callstack.agentdevice.imehelper # Success
npx agent-device open com.android.settings --platform android # "Opened: com.android.settings", rc 0
adb shell settings get secure default_input_method # com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
With a field focused after the second open:
keyboard status:Keyboard visible: yes,Input method: com.google.android.inputmethod.latinsnapshot --json:keyboard.kindisvisible
After daemon stop, the same open reinstalls the helper and selects it (TestInputMethodService, Keyboard visible: no, kind: absent).
Expected
open either reinstalls the helper when it is missing, or fails / warns that the test IME could not be selected.
Likely cause
dist/src/ime-state.js: ensureHelperInstalled is called with a module-level cache: new Set(). Once a device id is in the set, the installation is not checked again.
When it happens in practice
An AVD wiped (-wipe-data) or recreated under the same serial (emulator-5554), or the helper uninstalled, then reopened within the daemon's idle timeout (~5 min after the last close). A plain emulator restart with the helper still installed does not trigger it.
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 12 小时 18 分钟
- 30 天内合并 PR
- 561
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
callstack/agent-device#3353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
needs-triage
难度 3/5 1-2 天 新手友好度 76/100
callstack/agent-device#3453 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
callstack/agent-device#3451 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 55/100
callstack/agent-device#3449 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
enhancement
难度 1/5 1 小时以内 新手友好度 80/100
alunduil/projects-v2-sync#21 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-node#1539 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
christopher-buss/eslint-plugin-flawless#72 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
openwatersio/slackwater-database#281 ·
维护者通常 1 天内回复