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
- Start the emulator or simulator in the job.
- Block until it reports boot completed.
- 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_completedbefore Maestro. - Run Maestro inside an emulator action that gates on readiness.
- Verify
adb devices/simctl listshows a ready device first.
Related guides
Maestro "Element not found" in CIFix Maestro "Element not found" in CI - a flow command could not locate the target element within its timeout…
Maestro flow "timed out" in CIFix Maestro flows that time out in CI - a command or the whole flow exceeded its timeout, often because the a…
Appium "Could not find a connected Android device" in CIFix Appium "Could not find a connected Android device" (no devices/emulators) in CI - the UiAutomator2 driver…