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

`devices` reports a phantom Android emulator named after the emulator's crashdata INFO banner

未关闭 适合新手
#3,716 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@airowe 已经在做这个了。

开始于 2026年10月16日。

  • #3743 来自 @airowe —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
android, typescript
领域
mobile

调研方向

问题出在 Android 设备列表是如何根据 emulator -list-avds 的输出构建的。报告称,该输出被按行拆分,且没有任何过滤。请找到运行该命令并解析其 stdout 的代码,然后通过桩化该命令,使其输出 INFO 横幅而不输出任何 AVD 名称来复现问题。当横幅不再作为设备出现在 devices --json 或 doctor 的 Android 数量中,并且有测试覆盖横幅的情况时,即视为完成。

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

描述

Summary

On a machine with zero AVDs, agent-device devices still reports one Android
emulator, whose id and name are the Android emulator's Crashpad banner:

INFO    | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 98765
Environment
  • agent-device 0.21.28 (npm global)
  • macOS 15.7.5 (24G624), arm64
  • Node v24.14.0
  • ANDROID_HOME=/Users//Library/Android/sdk
Steps to reproduce
  1. Install the Android SDK/emulator, create no AVD (~/.android/avd/ is empty).
  2. Run agent-device devices --json.
Expected

No Android device listed.

Actual

One phantom entry (booted: false), with the embedded PID changing on every run:

{
  "platform": "android",
  "id": "INFO    | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 6727",
  "name": "INFO    | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 6727",
  "kind": "emulator",
  "target": "mobile",
  "booted": false
}

agent-device doctor counts it as well: device: ... Android 1 available, 0 booted.

Likely cause

The Android emulator writes that banner to stdout (verified with Python
capture_output=True; stderr is empty and exit code is 0):

$ emulator -list-avds 2>/dev/null
INFO    | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 8114

$ emulator -list-avds 2>&1 1>/dev/null   # stderr
(empty)

$ echo $?
0

So splitting stdout of emulator -list-avds by line yields one bogus "AVD" per run.
Filtering to plausible AVD names (or reading ~/.android/avd/*.ini) would avoid it.

Confirmed there is genuinely no device here: adb devices -l is empty and
~/.android/avd/ has no .ini files. The banner reproduces on every invocation
(three consecutive runs, only the PID differs).

主要语言
TypeScript
星标
5k
派生
334
平均合并
12 小时 29 分钟
30 天内合并 PR
663

环境准备

  • 没有 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 摘要。