`devices` reports a phantom Android emulator named after the emulator's crashdata INFO banner
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- Install the Android SDK/emulator, create no AVD (
~/.android/avd/is empty). - 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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/agent-device
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
callstack/agent-device#3792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
macOS helper audio-probe always reports -90 dBFS: AVAudioPCMBuffer frameLength set after the copyĐang mởbug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
callstack/agent-device#3771 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/agent-device#1869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent refactor
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
callstack/agent-device#3794 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug in-progress ready-for-agent
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
callstack/agent-device#3787 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstack/agent-device
Issue tương tự
-
area:security documentation effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
app:web meta:ops
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
osu-tournament-rating/otr#1113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
typegoose/mongodb-memory-server#1040 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100