expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

Unable to install Expo app to iOS simulator after expo upgrade

Open diamantisufi opened this issue 6 years ago • 26 comments

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

diamantisufi avatar Jul 30 '20 10:07 diamantisufi

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

byCedric avatar Jul 30 '20 17:07 byCedric

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.

xlanor avatar Aug 14 '20 10:08 xlanor

Updating Xcode did the trick for me.

palaparthi avatar Aug 22 '20 17:08 palaparthi

@byCedric that did it, cheers!

diamantisufi avatar Sep 07 '20 09:09 diamantisufi

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 avatar Sep 27 '21 15:09 ShepSims

@ShepSims this saved me after lots of tiresome troubleshooting. Thank you!

callumreid avatar Nov 02 '21 16:11 callumreid

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

CevinThomas avatar Nov 15 '21 16:11 CevinThomas

@ShepSims Thank you!

AurelianoJr avatar Dec 15 '21 14:12 AurelianoJr

@CevinThomas Yea thanks that worked 👍🏽

abhisheksahdev avatar Dec 23 '21 09:12 abhisheksahdev

open -a Simulator && expo start

youneshenniwrites avatar Jan 09 '22 21:01 youneshenniwrites

@CevinThomas It works! thanks!

mununki avatar Mar 03 '22 16:03 mununki

amazing! works for me now thanks so much!!!

aaronamendez avatar May 11 '22 03:05 aaronamendez

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.

pea-nut-z avatar May 21 '22 20:05 pea-nut-z

@CevinThomas Thanks that works for me.

redmejia avatar Nov 05 '22 20:11 redmejia

@CevinThomas thank you

jinwanseo avatar Jan 08 '23 23:01 jinwanseo

For me I fixed it by running yarn start -c, then running it normal with yarn start.

jeremykes avatar Jan 22 '23 03:01 jeremykes

thanks

Alioudione12 avatar Jun 07 '23 13:06 Alioudione12

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

mateuscesarglima avatar Sep 19 '23 16:09 mateuscesarglima

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.

Michal41 avatar Dec 04 '23 06:12 Michal41

Check you have simulator installed in xcode for ios. 7GB.

lmf-git avatar Dec 23 '23 05:12 lmf-git