You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Stale processes** — one Metro (`:8081`), one emulator set (`:8080`, `:9099`, `:9000`, `:4400`, …). Stray listener on `:8090` after a run → [pre-flight recovery](#pre-flight-recovery), then restart background services with [Rules §1–2](#rules) (`yarn tests:packager:jet`, `yarn tests:emulator:start`).
Detox's default emulator launch **restores the AVD Quick Boot snapshot** unless told otherwise. On `TestingAVD` that can leave the device **`offline` on a gray screen** — `adb devices` shows `emulator-XXXX offline` and Detox hangs on `wait-for-device`.
508
+
509
+
**Root cause:** warm boot paths — Quick Boot snapshot restore on Detox launch, and (pre-fix) `adb reboot` on Jet retry — skip a full cold boot.
510
+
511
+
**Fix (committed):**[`tests/.detoxrc.js`](../../tests/.detoxrc.js) sets `bootArgs: '-no-snapshot-load -no-snapshot-save'` on the `TestingAVD` device. Jet retry in [`tests/e2e/firebase.test.js`](../../tests/e2e/firebase.test.js) cold-restarts the same emulator (kill + relaunch with the same args) instead of `adb reboot`.
512
+
513
+
**Detect:**
514
+
515
+
```bash
516
+
adb devices -l # emulator-XXXX offline
517
+
pgrep -fl 'qemu-system.*TestingAVD'
518
+
rg 'SPAWN_CMD.*@TestingAVD' /tmp/rnfb-e2e-android.log # no -no-snapshot-load → stale runbook / config
adb kill-server && adb start-server && adb devices # must be empty
527
+
# If gray screen persists after cold-boot config, wipe Quick Boot snapshots:
528
+
# rm -rf ~/.android/avd/TestingAVD.avd/snapshots
529
+
```
530
+
531
+
Then rerun [pre-flight](#pre-flight-is-the-host-clear-to-start) and `yarn tests:android:test-cover`. Cold boot adds ~30–60s to the first Android launch vs Quick Boot — expected.
532
+
506
533
507
534
Detox injects a prebuilt **`Detox.framework`** and XCUITest runner from a versioned cache under **`~/Library/Detox/ios/`** (hashed by Xcode version). iOS `:test-cover` / `:build`**fail before any test runs** if that cache is missing or stale (common after Xcode upgrade, first checkout, or a failed Detox postinstall).
Copy file name to clipboardExpand all lines: tests/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ This action will launch a new simulator (if not already open) and run the tests
105
105
> Or you can change this name in the `package.json` of the tests project (don't commit the change though please).
106
106
> **DO NOT** rename an existing AVD to this name - it will not work, rename does not change the file path currently so Detox will
107
107
> fail to find the AVD in the correct directory. Create a new one with Google Play Services.
108
+
> Detox cold-boots `TestingAVD` on every run (`-no-snapshot-load`) to avoid Quick Boot gray-screen failures — see [running e2e § Android gray screen](../okf-bundle/testing/running-e2e.md#android-emulator-gray-screen--quick-boot-blocking).
0 commit comments