xcrun exited with non-zero code: 148 Invalid device or device pair

I am trying to run a project that uses Expo, but I am running into this error

$ expo start --ios
Starting project at /Users/[REDACTED]
Developer tools running on http://localhost:19002
Opening developer tools in the browser...
Starting Metro Bundler
xcrun exited with non-zero code: 148
Invalid device or device pair: 84732E63-ABA0-4C7F-8AC8-AA89BB69AAD3
Error: xcrun exited with non-zero code: 148
    at ChildProcess.completionListener (/opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
    at Object.onceWrapper (node:events:510:26)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)
    ...
    at spawnAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at xcrunAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:427:18)
    at runBootAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:217:11)
    at bootAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:189:9)
    at action (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:142:19)
    at waitForActionAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/apple/utils/waitForActionAsync.ts:17:22)
    at waitForDeviceToBootAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:141:10)
    at /opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/utils/profileMethod.ts:22:21
    at ensureSimulatorOpenAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/Simulator.ts:232:30)
    at Object.openProjectAsync (/opt/homebrew/lib/node_modules/expo-cli/node_modules/xdl/src/Simulator.ts:820:14)

I’m on a MacBook Air (M1, 2020), macOS 12.0.1, Xcode 13.1, and I have this

$ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
$ xcrun --show-sdk-version
12.0
$ 

I have tried re-installing Xcode, reinstalling the command line tools, running xcrun simctl erase all but none of that helped. Googling the error produces no results. When I do xcrun simctl list the ID in the error, 84732E63-ABA0-4C7F-8AC8-AA89BB69AAD3 isn’t in the output.

I’m able to do expo start, but once I hit i, it crashes with the above error.

I had to open the Xcode simulator manually by opening Xcode then going

Xcode > Open Developer Tool > Simulator

after doing that once, expo start --ios works and opens the simulator on its own.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.