A hung adb shell getprop in waitForBoot stalls the emulator boot wait until "The platform did not become ready"
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- react-native, typescript
Direção de pesquisa
Comece rastreando waitForBoot até isBootCompleted e getShellProperty; em seguida, inspecione como o projeto inicia comandos adb e lida com timeouts ou sinais de cancelamento. Use o repro vinculado (repro.mjs) para reproduzir a chamada getprop que fica travada; o trabalho estará concluído quando a espera cancelada puder se recuperar dessa chamada e ser resolvida quando o emulador informar que inicializou.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 341
- Forks
- 25
- Merge médio
- 9h 46min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstackincubator/react-native-harness
-
afterEach hooks run outer suite first, unlike JestTalvez já em andamento @TheSeydiCharyyev assumiu há 26 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
callstackincubator/react-native-harness#296 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
callstackincubator/react-native-harness#128 · 1 comentário ·
-
`globalThis.jest` trap object tricks other libraries into non-native behavior and failing to loadAberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
Todas as issues de callstackincubator/react-native-harness
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
audacity/audacity.github.io#118 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouTalvez já em andamento @rmt-svc assumiu hoje. Abertaresources
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
railmapgen/rmp-gallery#4245 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
mike-north/AgentMonitors#717 ·
Mantenedores costumam responder em até 1 dia