Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[expo run:ios] Failed to build iOS project on iOS 15 (with EXPO_USE_CORE_SIM) #3871

Closed
EvanBacon opened this issue Sep 23, 2021 · 7 comments
Closed
Labels
bug Something isn't working stale

Comments

@EvanBacon
Copy link
Contributor

Summary

With iOS 15 out, my computer updated, and now expo run:ios cannot find the default device. We check the Simulator.app for the user's default device, but if the last device you opened was iOS 14, then it doesn't exist on the next run, it cannot be resolved.

Solution

Ensure EXPO_USE_CORE_SIM=0 as this system doesn't account for updates.
Run expo run:ios -d and choose a device, or open Simulator.app to update the default device.

Environment

rolo3 𝝠 expo diagnostics

  Expo CLI 4.12.0 environment info:
    System:
      OS: macOS 11.3.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.5/bin/yarn
      npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm
      Watchman: 2021.09.06.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
      Android SDK:
        API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
        Build Tools: 26.0.3, 28.0.3, 29.0.2, 29.0.3
        System Images: android-22 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
        Android NDK: 19.2.5345600
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.7042882
      Xcode: 13.0/13A233 - /usr/bin/xcodebuild
    npmPackages:
      react: 17.0.2 => 17.0.2 
      react-native: 0.65.1 => 0.65.1 
    npmGlobalPackages:
      expo-cli: 4.12.0
    Expo Workflow: bare

Please specify your device/emulator/simulator platform, model and version

simulator

Error output

› Using --device 00E4A2DB-3B1E-4EBA-BF98-23A984585CC3
xcrun exited with non-zero code: 2
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Unable to boot device because we cannot determine the runtime bundle.
No such file or directory
Error: xcrun exited with non-zero code: 2
    at ChildProcess.completionListener (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Socket.<anonymous> (internal/child_process.js:439:11)
    at Socket.emit (events.js:315:20)
    at Pipe.<anonymous> (net.js:673:12)
    ...
    at spawnAsync (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at xcrunAsync (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:427:18)
    at runBootAsync (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:217:11)
    at bootAsync (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:184:11)
    at waitForActionAsync (/Users/evanbacon/.nvm/versions/node/v14.15.5/lib/node_modules/expo-cli/node_modules/xdl/src/apple/utils/waitForActionAsync.ts:17:16)

or

Failed to build iOS project. "xcodebuild" exited with error code 70.
To view more error logs, try building the app with Xcode directly, by opening /Users/evanbacon/Documents/GitHub/lab/rolo3/ios/rolo3.xcworkspace.

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /Users/evanbacon/Documents/GitHub/lab/rolo3/ios/rolo3.xcworkspace -configuration Debug -scheme rolo3 -destination id=00E4A2DB-3B1E-4EBA-BF98-23A984585CC3

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES



xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ id:00E4A2DB-3B1E-4EBA-BF98-23A984585CC3 }

	The requested device could not be found because no available devices matched the request.

	Available destinations for the "rolo3" scheme:
		{ platform:iOS, id:00008101-001964A22629003A, name:Evan’s phone }
		{ platform:iOS Simulator, id:6581D3B3-CF1C-4D3E-B04A-D77DAF38B109, OS:15.0, name:iPad (9th generation) }
		{ platform:iOS Simulator, id:194894B4-129F-4986-A7C5-720AB6157526, OS:15.0, name:iPad mini (6th generation) }
		{ platform:iOS Simulator, id:FEC3899E-5DC9-4A2C-8F17-E126E3FCD0F8, OS:15.0, name:iPhone 13 }
		{ platform:iOS Simulator, id:E3F2EAAD-5A58-4003-A029-5C642E00C9F4, OS:15.0, name:iPhone 13 Pro }
		{ platform:iOS Simulator, id:62E87705-28B9-40B7-BAA9-6E792E15C208, OS:15.0, name:iPhone 13 Pro Max }
		{ platform:iOS Simulator, id:90518806-B32C-4F68-A4B9-679556F84CE8, OS:15.0, name:iPhone 13 mini }

	Ineligible destinations for the "rolo3" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Build logs written to /Users/evanbacon/Documents/GitHub/lab/rolo3/.expo/xcodebuild.md

Reproducible demo or steps to reproduce from a blank project

rolo3 𝝠 expo run:ios --no-install
› Planning build

› 0 error(s), and 0 warning(s)

Failed to build iOS project. "xcodebuild" exited with error code 70.
To view more error logs, try building the app with Xcode directly, by opening /Users/evanbacon/Documents/GitHub/lab/rolo3/ios/rolo3.xcworkspace.

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /Users/evanbacon/Documents/GitHub/lab/rolo3/ios/rolo3.xcworkspace -configuration Debug -scheme rolo3 -destination id=00E4A2DB-3B1E-4EBA-BF98-23A984585CC3

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES



xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ id:00E4A2DB-3B1E-4EBA-BF98-23A984585CC3 }

	The requested device could not be found because no available devices matched the request.

	Available destinations for the "rolo3" scheme:
		{ platform:iOS, id:00008101-001964A22629003A, name:Evan’s phone }
		{ platform:iOS Simulator, id:6581D3B3-CF1C-4D3E-B04A-D77DAF38B109, OS:15.0, name:iPad (9th generation) }
		{ platform:iOS Simulator, id:194894B4-129F-4986-A7C5-720AB6157526, OS:15.0, name:iPad mini (6th generation) }
		{ platform:iOS Simulator, id:FEC3899E-5DC9-4A2C-8F17-E126E3FCD0F8, OS:15.0, name:iPhone 13 }
		{ platform:iOS Simulator, id:E3F2EAAD-5A58-4003-A029-5C642E00C9F4, OS:15.0, name:iPhone 13 Pro }
		{ platform:iOS Simulator, id:62E87705-28B9-40B7-BAA9-6E792E15C208, OS:15.0, name:iPhone 13 Pro Max }
		{ platform:iOS Simulator, id:90518806-B32C-4F68-A4B9-679556F84CE8, OS:15.0, name:iPhone 13 mini }

	Ineligible destinations for the "rolo3" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Build logs written to /Users/evanbacon/Documents/GitHub/lab/rolo3/.expo/xcodebuild.md
@EvanBacon EvanBacon added the bug Something isn't working label Sep 23, 2021
@EvanBacon EvanBacon changed the title [expo run:ios] Failed to build iOS project on iOS 15 [expo run:ios] Failed to build iOS project on iOS 15 (with EXPO_USE_CORE_SIM) Oct 19, 2021
@EvanBacon
Copy link
Contributor Author

There is not much we can do for this, Apple is wacky for removing all simulators. Leaving the issue open for now so it's easier for users to find.

@xyzst
Copy link

xyzst commented Dec 19, 2021

thanks @EvanBacon

Haven't used expo in awhile and upgraded from Catalina -> Big Sur -> Monterey recently and was getting these errors with a fresh expo project (expo init ...)

xcrun exited with non-zero code: 2
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Unable to boot device because we cannot determine the runtime bundle.
No such file or directory
Error: xcrun exited with non-zero code: 2
    at ChildProcess.completionListener (/Users/<username>/.nvm/versions/node/v16.13.0/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 (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at xcrunAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:427:18)
    at runBootAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:217:11)
    at bootAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:189:9)
    at action (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:142:19)
    at waitForActionAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/apple/utils/waitForActionAsync.ts:17:22)
    at waitForDeviceToBootAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:141:10)
    at /Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/utils/profileMethod.ts:22:21
    at ensureSimulatorOpenAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/Simulator.ts:233:30)
    at Object.openProjectAsync (/Users/<username>/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/xdl/src/Simulator.ts:840:14)

after just following this simple advice,

... open Simulator.app to update the default device.

it was resolved

$ expo diagnostics
  Expo CLI 5.0.1 environment info:
    System:
      OS: macOS 12.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.0/bin/yarn
      npm: 8.3.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
      Watchman: 2021.12.13.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.0 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
      Android SDK:
        API Levels: 29
        Build Tools: 28.0.3, 29.0.3
        System Images: android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: Arctic Fox 2020.3.1 Patch 4 Arctic Fox 2020.3.1 Patch 4
      Xcode: 13.2/13C90 - /usr/bin/xcodebuild
    npmGlobalPackages:
      expo-cli: 5.0.1
    Expo Workflow: managed

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Apr 12, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

@Myzel394
Copy link

@xyzst how do you manually open the simulator?

@xyzst
Copy link

xyzst commented Apr 26, 2022

@xyzst how do you manually open the simulator?

Open spotlight search (command + space bar) ➡️ search for "Simulator"

Might be able to open it from Xcode as well.

@ThatMajd
Copy link

ThatMajd commented Nov 9, 2023

Those who are still facing the issue, go to Xcode -> Settings -> Platforms, and then update or reinstall IOS, then things should work fine.
It seems that when updating Mac OS, IOS versions got deleted or something so the Simulator can't find the IOS to run the simulator.
I am not expert though, this is what worked for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants