## TL;DR

Detox timeouts in CI come from slow emulators and over-strict synchronization. Extend timeouts for CI, calm the app's background activity, and make sure the device is actually fast enough.

## Error

```text
DetoxRuntimeError: Test timed out after 120000ms
```

## Steps

1. Confirm the app builds and installs; timeouts after a successful install are runtime issues. Expected: build ruled out.
2. Raise `testTimeout` for CI in the Detox config. Expected: slow CI gets room.
3. Calm background activity: disable animations, network polling, and timers the test does not need. Expected: Detox sync engages faster.
4. Check device performance: emulators without acceleration are too slow. Expected: KVM/HAXM enabled.
5. Re-run the single test. Expected: green within the new timeout.

## When to use

- Detox timeouts CI-only.
- After confirming the build works.

## When not to use

- Build failures (different stage).
- Local timeouts (device or app issue).

## Tool compatibility

- Detox 20.x; Android/iOS.

## Variant phrasings

### Detox test timeout

The general error; sync and speed are the levers.

### Detox synchronization timeout

The sync-specific form; calm the app.

## Why it happens

Detox waits for the app to idle. Busy apps on slow emulators never idle within the timeout.

## Edge cases

- `device.disableSynchronization()` is a last resort; it trades determinism for speed.
- Long ` detox` init on first run skews timings; warm the device.
- Split init and test timeouts; they are different knobs.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_cRP-3LehutiDNOa_Ak-acQ
