Create-react-native-app: 'create-react-native-app' failing on my iOS device

Created on 24 Mar 2017  路  18Comments  路  Source: expo/create-react-native-app

Description

I followed the "get started" instructions, but I'm unable to open the app on iOS.

Observed Behavior

I ran "npm start," navigated to exp://192.168.0.8:19000 (QR method times out) on my iOS device in the Expo app. There was no terminal output. However, there was this error in the Expo app:

"This experience uses an unsupported version of Expo (SDK 15.0.0). You may need to update Expo." (code undefined).

Environment

  1. Operating system: Windows 10
  2. Phone/emulator/simulator & version: iPhone 6 Plus 10.2 (14C92)

Most helpful comment

+1; I have the same issue as @juanmnl

Edit: I've found a solution that works for me when I try running the iOS simulator. After running npm run ios, I went to the simulator's home page (Shift-CMD-H) and deleted the Expo app. Running npm run ios afterwards reinstalls the Expo app on the simulator.

All 18 comments

Hi, your project uses the newest Expo SDK, but you may have an older version of Expo Client app on your device which predates that SDK. The latest version in the app store is 1.14.1 at the moment. Can you try updating?

Either way, the error message you encountered is definitely ambiguous and could be clarified. We'll fix this in the next update.

@GerardVee thanks for the report! As @terribleben noted above, this error message should be improved soon. Please reopen this issue if updating the Expo app on your phone doesn't resolve the error you're seeing.

Hello. After updating the app, I've ran into different issues now. The terminal now states when starting packager:

Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...

and in the Expo app, it errors out, an states the following:

"Error while loading: The request timed out.." (code -1001)

Yet, the device can easily access http://192.168.0.8:19000, and the object is printed out perfectly well.
I thank you for your assistance and hope this can be sorted out soon.

Can you paste the full terminal output that includes the error starting the packager?

Sorry for the late reply, the output is:

> react-native-scripts start

Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...

'yarn' is not recognized as an internal or external command,
operable program or batch file.

Packager started!

To view your app with live reloading, point the Expo app to this QR code.
You'll find the QR scanner on the Projects tab of the app.

[QR Code]

Or enter this address in the Expo app's search bar:

  exp://192.168.130.1:19000 (this only works if I go to the IP of my computer: 192.168.0.8:19000)

Your phone will need to be on the same local network as this computer.

For links to install the Expo app, please visit https://expo.io.

Logs from serving your app will appear here. Press Ctrl+C at any time to stop.

Interesting. Do you see the same error if you start the packager with npm start?

Yes, as I was starting the above with npm start.

I have the same issue, but on the iOS simulator.
I started a brand new project and there's no error in the console.

Node v7.7.4  
Npm 4.1.2  
[email protected]  
[email protected]  
[email protected]  
watchman 4.7.0  
iPhone 6 simulator - IOS 10.2 (14c89)

on macOS Sierra 10.12.3.

screen shot 2017-03-26 at 2 43 50 pm

+1; I have the same issue as @juanmnl

Edit: I've found a solution that works for me when I try running the iOS simulator. After running npm run ios, I went to the simulator's home page (Shift-CMD-H) and deleted the Expo app. Running npm run ios afterwards reinstalls the Expo app on the simulator.

@GerardVee does your project have a yarn.lock file in the root directory? If the lockfile exists and you have yarn installed, can you try using yarn start to run the packager? If you don't have yarn installed, can you try deleting the yarn.lock file?

@dikaiosune I don't have yarn installed, and a yarn.lock file does not exist.

Thanks for the help everyone! I'm happy to say, I've found a solution: By running

set REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.8

I've managed to clear up a conflict where in my app would connect to the correct IP (192.168.0.8) but look for some (packager?) info at (192.168.130.1:19001) which it would fail to connect to. Maybe it should be added to the README that after failing to connect, try manually setting the IP? Anyways, thank you lots!
(Also, QR works now too!)

Wonderful! Thanks for letting us know!

I ran into the same issue as @GerardVee on my iPhone, even after updating the Expo app. What ended up working was deleting the app entirely and re-downloading from the app store just as suggested above on the simulator.

I had same issue, just remove the Expo app by holding alt and tab then everything works fine!

Hi,

I am running the native app on IOS device (connected on WIFI), connected with my system on LAN. But I am not able to run this app.

Error : exp://192.168.100.108:19000
Error while loading: The request timed out (code - 10001)

Please do help, its getting little frustrating.

Also guide with the steps for running it properly and share some other techniques.

@vidhyeshp - try downloading exp and running the project through that -- npm i -g exp and then exp start

Was this page helpful?
0 / 5 - 0 ratings