Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Maestro `eraseText` fails on real Android devices: `test` and `replay` cannot opt in to the test IME

Ouverte
#2,997 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
74/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
android, typescript
Domaine
cli, mobile, testing

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

ready-for-agent

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:

https://github.com/callstack/agent-device/blob/16e07572ab28227563fd76ab062cb375c4b7e1db/packages/maestro/src/daemon-port/daemon-runtime-port.ts#L262-L265

Backspace is a control character, so it needs the test IME. On real devices the test IME is opt-in through open --test-ime:

https://github.com/callstack/agent-device/blob/16e07572ab28227563fd76ab062cb375c4b7e1db/src/daemon/session-lifecycle/internal/session-open-execution.ts#L128-L134

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>, then test --session <name>: fails at launchApp with android device <serial> is owned by session "<name>"
  • same with replay --maestro --session <name>: same error
  • {"testIme": true} in a config file passed through AGENT_DEVICE_CONFIG: test still fails with the error above
  • adb shell ime set to the helper before test: 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-ime on test and replay
  • or testIme from agent-device.json for flow runs

Environment

  • agent-device 0.21.14. Same gating in 0.21.15 and on main at 16e0757
  • Pixel 8, Android 17, USB
  • macOS host
Langage dominant
TypeScript
Étoiles
4.8k
Forks
315
Merge moyen
11 h 25 min
PR mergées (30 j)
545

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de callstack/agent-device

Toutes les issues de callstack/agent-device

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.