Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Android test-IME fill commits into a stale InputConnection session after focus moves to a new field

未关闭
#3,052 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, react-native, typescript

调研方向

Start in packages/platform-android/src/text-input.ts at fillAndroidImeHelper and trace how the commit result is checked after focus changes. Reproduce the sequential onboarding echoes scenario under Android load, then verify that a failed commit with the hint still showing causes a fresh IME start before retrying and that the text lands in the new field.

由索引模型根据 Issue 内容生成。

描述

What happens

On an API 36 emulator under CPU load, fill into a freshly mounted, autofocused React Native TextInput sometimes fails with Android fill verification failed. The trigger is a wizard step change: Continue unmounts one field and mounts the next. The field keeps showing its hint: failureReason: text_mismatch, actual: "e.g. Jane", hintShowing: true, focused: true, and target and actual are the same node.

The test IME does commit, and logs commitText length=4. The app drops the text:

W/RemoteInputConnectionImpl: Session id mismatch header.sessionId: 0 currentSessionId: 1 while calling ...commitText

The helper's retry refocuses 2 s later and hits the same mismatch, so the IME was still on the previous connection session that long after focus moved.

Seen

  • e2e mobile benchmark CI: 4 of 45 Android runs (sequential onboarding echoes the exact values).
  • Locally: about 1 in 30 under load, 0 in 30 idle.

Tried

Waiting, before the commit, for dumpsys input_method's curEditorInfo.hintText to match the target's placeholder did not help (1/60 vs 1/30 baseline). The system-side editor info is already current when the IME's connection is stale.

Likely direction

Detect "text never landed" (hint still showing after the commit) and force a fresh startInput for the IME before the retry, e.g. by moving focus off the field and back, instead of re-tapping the already focused field. The check would live in fillAndroidImeHelper in packages/platform-android/src/text-input.ts.

主要语言
TypeScript
星标
4.8k
派生
315
平均合并
11 小时 25 分钟
30 天内合并 PR
545

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。