{"record":{"id":"1522d91b706bbfc6","repo":"expo/expo","slug":"device-not-found-target-device","errorCode":null,"errorMessage":"Device not found: ${TARGET_DEVICE}","messagePattern":"Device not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/bare-expo/scripts/start-ios-e2e-test.ts","lineNumber":43,"sourceCode":"import { getDylibPath } from '../e2e/image-comparison/inspector/ScreenInspectorIOS';\n\nconst TARGET_DEVICE = 'iPhone 17 Pro';\nconst TARGET_DEVICE_IOS_VERSION = 26;\nconst APP_ID = 'dev.expo.Payments';\nconst OUTPUT_APP_PATH = 'ios/build/BareExpo.app';\nconst NUM_OF_RETRIES = 6;\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n(async () => {\n  try {\n    const startMode = getStartMode(__filename);\n\n    const projectRoot = path.resolve(__dirname, '..');\n    const deviceId = await queryDeviceIdAsync(TARGET_DEVICE_IOS_VERSION, TARGET_DEVICE);\n    if (!deviceId) {\n      throw new Error(`Device not found: ${TARGET_DEVICE}`);\n    }\n\n    const appBinaryPath = path.join(projectRoot, OUTPUT_APP_PATH);\n    if (startMode === 'BUILD' || startMode === 'BUILD_AND_TEST') {\n      const binaryPath = await buildAsync(projectRoot, deviceId);\n      await ensureDirAsync(path.dirname(appBinaryPath));\n      await fs.cp(binaryPath, appBinaryPath, { recursive: true });\n    }\n    if (startMode === 'TEST' || startMode === 'BUILD_AND_TEST') {\n      const e2eDir = path.join(projectRoot, 'e2e');\n\n      // The simulator, the app and the maestro driver survive across maestro invocations,\n      // so set everything up only once instead of paying for it on every flow and retry.\n      await startSimulatorAsync(deviceId);\n      await preApproveDeepLinkPromptAsync(deviceId);\n      await installAppAsync(deviceId, appBinaryPath);\n      await launchAppWithInspectorAsync(deviceId);\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/expo/expo/blob/b09195aac27c9e4a63daaf12dcb6f00b6b2e08ee/apps/bare-expo/scripts/start-ios-e2e-test.ts#L25-L61","documentation":"Error \"Device not found: ${TARGET_DEVICE}\" thrown in expo/expo.","triggerScenarios":"Thrown at apps/bare-expo/scripts/start-ios-e2e-test.ts:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b09195aac27c9e4a63daaf12dcb6f00b6b2e08ee","analyzedAt":"2026-08-12T15:59:58.304Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}