A hung adb shell getprop in waitForBoot stalls the emulator boot wait until "The platform did not become ready"
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react-native, typescript
調査の方向性
まず waitForBoot から isBootCompleted と getShellProperty までをたどり、次にプロジェクトが adb コマンドをどのように起動し、タイムアウトや中断シグナルをどのように処理するかを調べます。リンクされた再現用スクリプト(repro.mjs)を使って、停止する getprop 呼び出しを再現してください。エミュレーターが起動完了を報告したとき、中断された待機がその呼び出しから復帰して解決できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 341
- フォーク
- 25
- 平均マージ
- 9時間 46分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/react-native-harness のほかの issue
-
afterEach hooks run outer suite first, unlike Jest対応中かも @TheSeydiCharyyev が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
callstackincubator/react-native-harness#296 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstackincubator/react-native-harness#128 · コメント 1 件 ·
-
`globalThis.jest` trap object tricks other libraries into non-native behavior and failing to loadオープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
callstackincubator/react-native-harness の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
audacity/audacity.github.io#118 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhou対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
railmapgen/rmp-gallery#4245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
mike-north/AgentMonitors#717 ·
メンテナーはふだん 1 日以内に返信