Skip to content
Latchkey

Maestro "No devices found" in CI

Maestro scans for a running Android emulator, iOS simulator, or connected device and found none. In CI this almost always means the emulator/simulator was not started or had not finished booting when maestro test ran.

What this error means

The command exits with "No devices found. Please connect a device or start an emulator/simulator before running Maestro." before any flow executes.

Maestro
No devices found. Please ensure a device is running before running Maestro.
If you are running in CI, make sure the emulator has fully booted.

Common causes

No emulator or simulator was started

The CI job runs maestro test without first booting a device, so Maestro has nothing to attach to.

The device had not finished booting

The emulator was launched but maestro test ran before boot completed, so the scan saw no ready device.

How to fix it

Boot and wait for a device before Maestro

  1. Start the emulator or simulator in the job.
  2. Block until it reports boot completed.
  3. Then run maestro test.
Terminal
adb wait-for-device
adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'
maestro test flows/

Use an emulator runner that gates on readiness

Run Maestro inside the emulator action's script so it only runs once the AVD is booted.

.github/workflows/ci.yml
- uses: reactivecircus/android-emulator-runner@v2
  with:
    api-level: 34
    script: maestro test flows/

How to prevent it

  • Boot the device and wait for sys.boot_completed before Maestro.
  • Run Maestro inside an emulator action that gates on readiness.
  • Verify adb devices / simctl list shows a ready device first.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →