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

Unable to install Expo app to iOS simulator after expo upgrade #2413

Closed
diamantisufi opened this issue Jul 30, 2020 · 26 comments
Closed

Unable to install Expo app to iOS simulator after expo upgrade #2413

diamantisufi opened this issue Jul 30, 2020 · 26 comments

Comments

@diamantisufi
Copy link

diamantisufi commented Jul 30, 2020

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

@byCedric
Copy link
Member

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

@xlanor
Copy link

xlanor commented Aug 14, 2020

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.

@palaparthi
Copy link

palaparthi commented Aug 22, 2020

Updating Xcode did the trick for me.

@diamantisufi
Copy link
Author

@byCedric that did it, cheers!

@ShepSims
Copy link

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

@callumreid
Copy link

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

@CevinThomas
Copy link

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

@AurelianoJr
Copy link

@ShepSims Thank you!

@Abhishek12345679
Copy link

@CevinThomas Yea thanks that worked 👍🏽

@youneshenniwrites
Copy link

youneshenniwrites commented Jan 9, 2022

open -a Simulator && expo start

@mununki
Copy link

mununki commented Mar 3, 2022

@CevinThomas It works! thanks!

@aaronamendez
Copy link

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

@pea-nut-z
Copy link

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.

@redmejia
Copy link

redmejia commented Nov 5, 2022

@CevinThomas Thanks that works for me.

@jinwanseo
Copy link

@CevinThomas thank you

@jeremykes
Copy link

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

@Alioudione12
Copy link

thanks

@mateuscesarglima
Copy link

mateuscesarglima commented Sep 19, 2023

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

@Michal41
Copy link

Michal41 commented Dec 4, 2023

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.

@lmf-git
Copy link

lmf-git commented Dec 23, 2023

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

@vandercloak
Copy link

Thank you @lmf-git that seems to be the trick for me. I went to the xcode simpulator and there were no versions for me to select when I was trying to create a sim.

I needed to install one and went with simulator 17.2 (latest at the time of writing... I think).

For any that need the same solution:

You can find the place to install the simulator by clicking the "Help" button in xcode, then typing "iOS Simulator", it then directed me to the spot in the help menu. Once I clicked on the top help result (the one with the sim version in it) it took me to a place in the xcode main view where I could click download.

@lmf-git
Copy link

lmf-git commented Dec 29, 2023 via email

@vandercloak
Copy link

Yeah, for me I updated xcode and was behind maaaaany versions. I had never opened the simulator on this machine.

I also just recently updated to the latest mac os.

I am currently setting up a app with turborepo and it has me back in expo.

@mattmcegg
Copy link

simply deleting the .expo folder (and deleting the node_modules and ios folder for good measure) worked for me. seemed to be caused by upgrading expo cli.

@lmf-git
Copy link

lmf-git commented Jan 1, 2024 via email

@hjer
Copy link

hjer commented Jan 8, 2024

After I updated Expo to 49.0.21, my iOS and Xcode I got the following error:

Error: 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

What I had to do, was to install the iOS platform again in Xcode.

So just open Xcode, go to Settings > Platforms and then install the iOS platform!

Then start the app with npx expo start then press Shift + i to choose the iPhone model you want.
(Double check that you are using "Expo Go" before initialising the app on the simulator)

(I also removed the ~/.expo folder)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests