Skip to content
Latchkey

Detox "Failed to run application on the device" in CI

Detox found a device but could not get the app running on it: the binary path is wrong, the build was never produced, or install/launch failed on the device. The config binaryPath and the build step are the first things to check.

What this error means

The Detox run aborts early with "Failed to run application on the device" or "Cannot find app binary at path ...". No tests execute because the app never launched.

Detox
DetoxRuntimeError: Failed to run application on the device
HINT: Most likely, your app has crashed prematurely during launch.
Cannot boot the app, the app binary at .../Build/Products/Debug-iphonesimulator/app.app
does not exist.

Common causes

The app binary was not built for this configuration

The detox build step did not run, or built a different configuration than binaryPath in .detoxrc points to, so there is nothing to install.

Install or launch failed on the device

An architecture mismatch or a crash on launch prevents the app from starting even though the binary exists.

How to fix it

Build before test and match binaryPath

  1. Run detox build --configuration <cfg> in the job before detox test.
  2. Confirm binaryPath for that configuration points at the produced .app/.apk.
  3. Use the same configuration name for build and test.
Terminal
detox build --configuration ios.sim.debug
detox test --configuration ios.sim.debug --cleanup

Verify the binary exists at the configured path

Check .detoxrc.js apps[].binaryPath against the actual build output directory; a stale path is the most common cause.

.detoxrc.js
apps: {
  'ios.debug': {
    type: 'ios.app',
    binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/App.app',
  },
}

How to prevent it

  • Always detox build before detox test in CI.
  • Keep binaryPath in sync with the build output directory.
  • Use one configuration name across build and test steps.

Frequently asked questions

What causes ""Failed to run application on the device""?
The detox build step did not run, or built a different configuration than binaryPath in .detoxrc points to, so there is nothing to install.
How do I fix "Failed to run application on the device"?
Build before test and match binaryPath

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card