Android: open leaves the real keyboard active when the test IME helper disappears while the daemon is alive
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, typescript
Research direction
Start by reading dist/src/ime-state.js, especially ensureHelperInstalled and its module-level cache; trace where open calls it and check the related tests. Reproduce by opening an Android app, uninstalling the test IME helper while the daemon stays alive, then opening again. Done when the missing helper is rechecked and reinstalled, or open warns or fails instead of reporting success with the real keyboard active.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 334
- Avg merge
- 11h 48m
- Merged PRs (30d)
- 605
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
callstack/agent-device#3353 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
iOS: fill rejects the right text as `TEXT_ENTRY_MISMATCH` when the focused field moves while typing (since 0.21.25)Possibly taken @Lanchez claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
callstack/agent-device#3595 ·
Maintainers usually reply within 1 day
-
`fold` always fails on Xcode 27.1 RC: its pose check calls `devicectl device motion hinge-angle`, which this devicectl doesn't havePossibly taken @thymikee claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstack/agent-device#3581 ·
Maintainers usually reply within 1 day
-
ready-for-agent refactor
Difficulty 4/5 3-5 days Newbie friendliness 22/100
callstack/agent-device#3576 ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
Contrib indemnité de départ à la retraite : faire le pont avec le simulateur sur la page génériqueOpenP1
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SocialGouv/code-du-travail-numerique#7561 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kubernetes-sigs/headlamp#7950 ·
Maintainers usually reply within 3 days
-
README for cliPossibly taken @Janvi-kapoor claimed this today. OpenOSCI'26
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
GauravKarakoti/SecureFlow#1308 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vitest-dev/vitest#11577 ·
Maintainers usually reply within 1 day