Unable to install Expo app to iOS simulator after expo upgrade
Description
I had this error(react native module cannot be null) with expo-notifications where in order to work it required to upgrade the current version of expo.
After typing expo upgrade, that error was fixed. However I couldn't install the app in the iOs simulator any longer. I am getting this error:
Error installing or running app. Error: xcrun exited with non-zero code: 2
Expected Behavior
open the simulator open the project run expo start / npm start install the app in the iOS simulator, run the app in the iOS simulator, start the app in the home page
Tried couple of things like:
- erase content and settings of the simulator,
- running it on a different iOS simulator but the error is still there
full error:
/Error running `xcrun simctl install booted /Users/user+name/.expo/ios-simulator-app-cache/Exponent-2.16.0.tar.app`: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Environment
Expo CLI 3.21.3 environment info: System: OS: macOS 10.15.5 Shell: 3.2.57 - /bin/bash Binaries: Node: 12.17.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 11.5/11E608c - /usr/bin/xcodebuild npmPackages: expo: ^38.0.0 => 38.0.8 react: 16.11.0 => 16.11.0 react-dom: 16.11.0 => 16.11.0 react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2 react-native-web: ~0.11.7 => 0.11.7 npmGlobalPackages: expo-cli: 3.21.3
Simulator: platform: iOS, type: iPhone 11 pro
Hi @diamantisufi, thanks for the issue report! Let's try and get this resolved 😄 Have you tried removing the ~/.expo folder to clean up the Expo Client cache as well? Note, this will log you out and you have to login again.
If you already did that and this issue still persists, could you try running the command that fails and send us the logs from that? You should be able to do that by running something like:
// execute failing command + write logs to output.txt
$ xcrun simctl install booted /Users/user+name/.expo/ios-simulator-app-cache/Exponent-2.16.0.tar.app > output.txt
I'm also getting this after building self hosted using turtle cli 0.17.2, expo sdk 38.0.2
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Updating Xcode did the trick for me.
@byCedric that did it, cheers!
I was getting this error when trying to open a simulator via Expo's "Run on IOS Simulator"
After updating Xcode the error persisted
To Fix:
Open the simulator first through Xcode, this mounts the new simulator bundle, then you will be able to open in simulator from Expo by pressing I after expo start, or through the web console window
@ShepSims this saved me after lots of tiresome troubleshooting. Thank you!
What worked for me was to just select a specific Iphone by pressing Shift + i in the expo terminal (running server).
When I selected one, then it started the Simulator, and then i needed to press "Run on IOS" in the Expo web tool.
Then it installed it. Try it out
@ShepSims Thank you!
@CevinThomas Yea thanks that worked 👍🏽
open -a Simulator && expo start
@CevinThomas It works! thanks!
amazing! works for me now thanks so much!!!
What worked for me was to just select a specific Iphone by pressing Shift + i in the expo terminal (running server).
When I selected one, then it started the Simulator, and then i needed to press "Run on IOS" in the Expo web tool.
Then it installed it. Try it out
This worked for me as well. Make sure you close the previous ios emulator before doing this. Otherwise, nothing happens.
@CevinThomas Thanks that works for me.
@CevinThomas thank you
For me I fixed it by running yarn start -c, then running it normal with yarn start.
thanks
I was getting this error when trying to open a simulator via Expo's "Run on IOS Simulator"
After updating Xcode the error persisted
To Fix:
Open the simulator first through Xcode, this mounts the new simulator bundle, then you will be able to open in simulator from Expo by pressing I after expo start, or through the web console window
Worked for me, thank you so much! @ShepSims
For me issue was that i was using two xcode versions simultaneously by renaming applications in applications dir. I fixed this problem by switching to newest version on xcode.
Check you have simulator installed in xcode for ios. 7GB.