Skip to content
Latchkey

macOS runner: "Unable to boot device because it cannot be located on disk" in CI

A test or simctl command asked to boot a simulator by UDID, but CoreSimulator has no device with that identifier. The device set changed (image upgrade, deleted device, or wrong runtime), so the UDID is stale.

What this error means

An xcodebuild test or simctl boot fails with "Unable to boot device because it cannot be located on disk. (DTDeviceKit ...)" or "Invalid device: <UDID>".

CoreSimulator
Unable to boot device because it cannot be located on disk.
The device "iPhone 15" (UDID 1234ABCD-...) could not be located.

Common causes

A hard-coded UDID no longer exists

UDIDs differ across runner images and runtimes. A UDID captured on one image is not present on another, so boot fails.

The requested device was deleted or never created

The named device is not in the current device set, so CoreSimulator cannot locate it on disk.

How to fix it

Resolve the device by name at runtime

  1. List available devices with xcrun simctl list devices available.
  2. Pick a device name and runtime that exist on this runner.
  3. Boot by name or create one, instead of a hard-coded UDID.
Terminal
xcrun simctl list devices available
xcrun simctl boot "iPhone 15"

Create a fresh device for the test

Create a device against an installed runtime, then boot it, so the UDID is guaranteed to exist.

Terminal
UDID=$(xcrun simctl create ci-iphone "iPhone 15" "com.apple.CoreSimulator.SimRuntime.iOS-17-5")
xcrun simctl boot "$UDID"

How to prevent it

  • Resolve simulators by name and runtime at runtime, not by UDID.
  • List available devices before selecting one.
  • Create the device in the job rather than reusing a captured UDID.

Frequently asked questions

What causes ""Unable to boot device ... cannot be located on disk""?
UDIDs differ across runner images and runtimes. A UDID captured on one image is not present on another, so boot fails.
How do I fix "Unable to boot device ... cannot be located on disk"?
Resolve the device by name at runtime

Related guides

References

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