Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'create-react-native-app' failing on my iOS device #113

Closed
GerardVee opened this issue Mar 23, 2017 · 18 comments
Closed

'create-react-native-app' failing on my iOS device #113

GerardVee opened this issue Mar 23, 2017 · 18 comments

Comments

@GerardVee
Copy link

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

  • npm ls react-native-scripts: react-native-scripts@0.0.25
  • npm ls react-native: react-native@0.42.3
  • npm ls expo: expo@15.1.2
  • node -v: v6.0.0
  • npm -v: 3.8.6
  • yarn --version: n/a
  • watchman version: n/a
  1. Operating system: Windows 10
  2. Phone/emulator/simulator & version: iPhone 6 Plus 10.2 (14C92)
@terribleben
Copy link

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.

@anp
Copy link
Contributor

anp commented Mar 24, 2017

@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.

@anp anp closed this as completed Mar 24, 2017
@GerardVee
Copy link
Author

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.

@anp anp reopened this Mar 24, 2017
@anp
Copy link
Contributor

anp commented Mar 24, 2017

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

@GerardVee
Copy link
Author

GerardVee commented Mar 25, 2017

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.

@anp
Copy link
Contributor

anp commented Mar 25, 2017

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

@GerardVee
Copy link
Author

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

@juanmnl
Copy link

juanmnl commented Mar 26, 2017

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  
expo@15.1.2  
react-native@0.42.3  
react-native-scripts@0.0.25  
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

@davidlee1435
Copy link

davidlee1435 commented Mar 26, 2017

+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.

@anp
Copy link
Contributor

anp commented Mar 27, 2017

@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?

@GerardVee
Copy link
Author

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

@GerardVee
Copy link
Author

GerardVee commented Mar 28, 2017

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!)

@anp
Copy link
Contributor

anp commented Mar 28, 2017

Wonderful! Thanks for letting us know!

@anp anp closed this as completed Mar 28, 2017
facebook-github-bot pushed a commit to facebook/react-native that referenced this issue Apr 7, 2017
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, expo/create-react-native-app#101, expo/create-react-native-app#113 (comment) for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes #13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
ide pushed a commit to facebook/react-native that referenced this issue Apr 7, 2017
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, expo/create-react-native-app#101, expo/create-react-native-app#113 (comment) for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes #13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
ide pushed a commit to facebook/react-native that referenced this issue Apr 7, 2017
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, expo/create-react-native-app#101, expo/create-react-native-app#113 (comment) for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes #13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
thotegowda pushed a commit to thotegowda/react-native that referenced this issue May 7, 2017
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, expo/create-react-native-app#101, expo/create-react-native-app#113 (comment) for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes facebook#13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
@codybrouwers
Copy link

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.

@anabaei
Copy link

anabaei commented Oct 4, 2017

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

@vidhyeshp
Copy link

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.

@vidhyeshp
Copy link

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.

@brentvatne
Copy link
Member

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

grabbou pushed a commit to react-native-community/cli that referenced this issue Sep 26, 2018
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, expo/create-react-native-app#101, expo/create-react-native-app#113 (comment) for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/yarn.js#L25)
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](https://github.com/facebook/react-native/blob/6fa87134fc68fd447e33a01a538ae0af6710e5d2/local-cli/util/PackageManager.js#L20)

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes facebook/react-native#13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants