A hung adb shell getprop in waitForBoot stalls the emulator boot wait until "The platform did not become ready"
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react-native, typescript
Línea de trabajo
Empieza siguiendo waitForBoot hasta isBootCompleted y getShellProperty. Después, inspecciona cómo el proyecto inicia comandos de adb y gestiona los tiempos de espera o las señales de cancelación. Usa la reproducción enlazada (repro.mjs) para reproducir la llamada bloqueada a getprop; el trabajo estará terminado cuando la espera cancelada pueda recuperarse de esa llamada y resolverse cuando el emulador indique que ha arrancado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 341
- Forks
- 25
- Merge medio
- 9 h 46 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/react-native-harness
-
afterEach hooks run outer suite first, unlike JestPosiblemente ocupada @TheSeydiCharyyev la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
callstackincubator/react-native-harness#296 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstackincubator/react-native-harness#128 · 1 comentario ·
-
`globalThis.jest` trap object tricks other libraries into non-native behavior and failing to loadAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
Todos los issues de callstackincubator/react-native-harness
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
audacity/audacity.github.io#118 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouPosiblemente ocupada @rmt-svc la tomó hoy. Abiertoresources
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
railmapgen/rmp-gallery#4245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
mike-north/AgentMonitors#717 ·
Los mantenedores suelen responder en 1 día