stablyai/orca · error · EmulatorError
emulator_device_not_found
emulator_device_not_found
Error message
Simulator ${udid} not found. Create one via Xcode > Window > Devices and Simulators. What it means
ensureSimulatorBooted lists devices via simctl and the requested udid is not among them. The simulator must already exist before it can be booted; Orca does not create devices implicitly.
Source
Thrown at src/main/emulator/simctl-simulator-devices.ts:134
if (typeof device === 'string' && device.toLowerCase().includes(deviceOrName.toLowerCase())) {
return device
}
}
} catch {}
return deviceOrName
}
export async function ensureSimulatorBooted(udid: string): Promise<void> {
if (platform() !== 'darwin') {
throw new EmulatorError(
'emulator_not_macos',
'iOS Simulator requires macOS with Xcode Command Line Tools.'
)
}
const devices = await listSimulatorDevices()
const device = devices.find((candidate) => candidate.udid === udid)
if (!device) {
throw new EmulatorError(
'emulator_device_not_found',
`Simulator ${udid} not found. Create one via Xcode > Window > Devices and Simulators.`
)
}
if (device.state === 'Booted') {
return
}
try {
await new Promise<void>((resolve, reject) => {
execFile('xcrun', ['simctl', 'boot', udid], { timeout: 45_000 }, (error, _stdout, stderr) => {
if (error) {
const message = error.message.toLowerCase()
if (message.includes('booted') || message.includes('current state')) {
resolve()
return
}
reject(mapSimctlError(error, stderr))View on GitHub (pinned to 1136503c6a)
Solutions
- Create the simulator in Xcode > Window > Devices and Simulators, or `xcrun simctl create <name> <type>`.
- Copy the udid exactly from `xcrun simctl list devices`.
- Run `xcode-select -p` to confirm the expected Xcode is active.
Example fix
// before
await ensureSimulatorBooted('BOGUS-UDID')
// after
const devices = await listSimulatorDevices()
if (!devices.some((d) => d.udid === udid)) {
throw new Error(`Create ${udid} first: xcrun simctl create ...`)
}
await ensureSimulatorBooted(udid) Defensive patterns
Strategy: validation
Validate before calling
const devices = await listSimulatorDevices()
if (!devices.some((d) => d.udid === udid)) { /* create device or fix udid */ } Type guard
function isEmulatorError(e: unknown, code = 'emulator_device_not_found'): e is import('./emulator-errors').EmulatorError {
return e instanceof Error && (e as any).code === code && e.name === 'EmulatorError'
} Try / catch
try { await ensureSimulatorBooted(udid) }
catch (e) { if (isEmulatorError(e, 'emulator_device_not_found')) { udid = await pickOrCreateSimulator() } else throw e } Prevention
- Copy udids from `xcrun simctl list devices`.
- Create devices via Xcode or `xcrun simctl create` before scripting.
- Confirm the active Xcode with `xcode-select -p`.
When it happens
Trigger: listSimulatorDevices().find(candidate => candidate.udid === udid) returns undefined (simctl-simulator-devices.ts:131-137).
Common situations: udid typo; the device was erased/deleted; a fresh Xcode install with no simulators; the wrong Xcode is active (xcode-select).
Related errors
- emulator_no_active
- emulator_helper_failed
- emulator_not_macos
- emulator_device_not_found
- emulator_device_not_found
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/64783d09cf004308.
Report an issue: GitHub.