A hung adb shell getprop in waitForBoot stalls the emulator boot wait until "The platform did not become ready"
Chưa có ai nhận issue nà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
- 78/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ệ
- react-native, typescript
Hướng nghiên cứu
Bắt đầu bằng cách lần theo waitForBoot đến isBootCompleted và getShellProperty, sau đó kiểm tra cách dự án khởi chạy các lệnh adb và xử lý thời gian chờ hoặc tín hiệu hủy. Dùng repro được liên kết (repro.mjs) để tái hiện lời gọi getprop bị treo; hoàn tất khi lượt chờ đã bị hủy có thể phục hồi sau lời gọi đó và được giải quyết khi trình giả lập báo đã khởi động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
On CI, I'm experiencing Android tests intermittently fail with "The platform did not become ready". With verbose logging on, the last thing the harness does is poll adb shell getprop sys.boot_completed while the emulator boots, and that call never returns.
waitForBoot checks its abort signal between polls:
while (!signal.aborted) {
// getDeviceIds → getEmulatorName → isBootCompleted
await waitWithSignal(1000, signal);
}
But isBootCompleted goes through getShellProperty, which spawns adb with no timeout and without the signal. If one adb shell call hangs during early boot, the loop never polls again, even after the emulator has booted, and never sees the abort. The run sits there until platformReadyTimeout fails it.
No idea why adb shell hangs.
I've included a workaround patch that seems to resolve this in the repro sample.
System Info
CI: GitHub-hosted ubuntu-26.04 runner, via the react-native-harness GitHub action (v1.6.0)
Emulator: API 27, Nexus 6 profile, x86_64, AVD created fresh each run (cacheAvd: false)
React Native Harness Version
1.6.0
Reproduction
https://github.com/bryan-lamb777/react-native-harness-adb-boot-hang-repro
Steps to reproduce
The repro simulates the hang without an emulator. A fake adb reports one emulator, hangs on the first getprop sys.boot_completed, and reports the emulator as booted on every later call. repro.mjs calls waitForBoot with a signal that aborts after 30s, standing in for platformReadyTimeout.
- pnpm install
- pnpm repro
Expected: waitForBoot gives up on the hung call, polls again and resolves the emulator
Actual: waitForBoot is still pending 15s after the signal aborts. Only one getprop is ever made:
[0.0s] waiting for emulator "test-avd" to boot
[30.0s] signal aborted
[45.0s] FAIL: waitForBoot is still pending 15s after the signal aborted.
adb calls made:
adb devices
adb -s emulator-5554 emu avd name
adb -s emulator-5554 shell getprop sys.boot_completed
To see the workaround pass, uncomment patchedDependencies in pnpm-workspace.yaml and run pnpm install again.
- Ngôn ngữ chính
- TypeScript
- Star
- 341
- Fork
- 25
- Merge trung bình
- 9 giờ 46 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 callstackincubator/react-native-harness
-
afterEach hooks run outer suite first, unlike JestCó thể đã có người làm @TheSeydiCharyyev đã nhận 26 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
callstackincubator/react-native-harness#296 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/react-native-harness#128 · 1 bình luận ·
-
`globalThis.jest` trap object tricks other libraries into non-native behavior and failing to loadĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Tất cả issue của callstackincubator/react-native-harness
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
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
audacity/audacity.github.io#118 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouCó thể đã có người làm @rmt-svc đã nhận hôm nay. Đang mởresources
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
railmapgen/rmp-gallery#4245 ·
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 83/100
mike-north/AgentMonitors#717 ·
Maintainer thường phản hồi trong vòng 1 ngày