Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Android: open leaves the real keyboard active when the test IME helper disappears while the daemon is alive

Aperta Adatta ai principianti
#3,407 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, typescript
Ambito
mobile, testing

Direzione di ricerca

Inizia leggendo dist/src/ime-state.js, soprattutto ensureHelperInstalled e la sua cache a livello di modulo; segui i punti in cui open la chiama e controlla i test correlati. Riproduci il problema aprendo un’app Android, disinstallando l’IME helper di test mentre il daemon resta attivo e aprendola di nuovo. Il lavoro è terminato quando l’assenza dell’helper viene verificata di nuovo e questo viene reinstallato, oppure quando open mostra un avviso o fallisce invece di segnalare il successo mentre la tastiera reale è attiva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.latin
  • snapshot --json: keyboard.kind is visible

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.

Lingua principale
TypeScript
Stelle
4.9k
Fork
328
Merge medio
12h 18m
PR unite (30g)
561

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstack/agent-device

Tutte le issue di callstack/agent-device

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.