Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#3,716 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@airowe đang làm issue này rồi.

Từ ngày 16/10/2026.

  • #3743 của @airowe — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Lỗi nằm ở cách danh sách thiết bị Android được tạo từ đầu ra của emulator -list-avds, mà theo báo cáo được tách theo từng dòng mà không có bất kỳ bộ lọc nào. Hãy tìm đoạn mã chạy lệnh đó và phân tích stdout của nó. Tái hiện lỗi bằng cách giả lập lệnh để in ra banner INFO và không in tên AVD nào. Xong khi banner không còn xuất hiện như một thiết bị trong devices --json hoặc trong số lượng thiết bị Android của doctor, và có một bài kiểm thử bao phủ trường hợp banner.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
TypeScript
Star
5k
Fork
334
Merge trung bình
12 giờ 2 phút
Pull request đã merge (30 ngày)
678

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.