facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.19k stars 24.33k forks source link

Error: "react-native run-ios" not working even for sample apps, AwesomeProject #9391

Closed bluej-21 closed 7 years ago

bluej-21 commented 8 years ago

I'm using a Macbook air to test run some application for ios. the react-native run-ios does not seem to work appropriately as I always get the "unable to connect to server... do npm start" error message as soon as I open up the app on the emulator. I've tried this again for facebook's example app, AwesomeProject and I still got the same error. The react-native version I am using is 0.30.0 and the react-native-cli is 1.0.0

st0ffern commented 8 years ago

@bluej-21 do you have watchman installed? https://facebook.github.io/react-native/docs/getting-started.html

bluej-21 commented 8 years ago

yes, I do. Also it seems like the packager is running, it'll display the "start" messages on the packager but it doesn't seem to display the "end" messages.

tjfi222 commented 8 years ago

I also am having trouble running the AwesomeProject example. I've looked through every Github/Stack solutions and none of them work. Using fresh installs of literally everything.

:CFBundleIdentifier does not exist

Please advise! .

itinance commented 8 years ago

For me everything is working fine. Have you tried to reset the packager? node node_modules/react-native/local-cli/cli.js start --reset-cache

Or the hard way with reinstalling everything and restarting watchman also: rm -rf node_modules/ && npm cache clear && watchman watch-del-all && npm i

Is network working well? Can you open the index.js-File in your browser? Something like this: http://localhost:8081/index.ios.js?platform=ios&dev=true&minify=false

Anyhow, let's compare versions:

within the Project after "react-native init AwesomProject":

$ react-native --version
react-native-cli: 1.0.0
react-native: 0.31.0
$ node -v
v6.3.1
$ uname -a
Darwin macbook.fritz.box 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

(OSX El Capitain Version 10.11.6 (15G31))

XCode Version 7.3.1 (7D1014)

nicholasstephan commented 8 years ago

I've run into this issue since upgrading to Xcode 8.

ericvicenti commented 8 years ago

I'm on Xcode 8 and I haven't seen this problem yet. Is it still causing troubles for people?

ostigley commented 8 years ago

I have a similar problem. I don't get an error; instead it just hangs. Nothing happens. Only since upgrading Xcode and OSX

UPDATE: I discovered watchman was the problem. Fix here: https://github.com/facebook/watchman/issues/381#issuecomment-257669560

blackburnian commented 8 years ago

Earlier today watchman was not reloading my JS when I made changes. Tried fresh install of watchman, react-native-cli, rebooting, etc. Now I’m experiencing a similar issue to @ostigley . In my current react native project when I run react-native run-ios, nothing happens. No errors. Just hangs.

Tried creating a new project with react-native init AwesomeProject, and this hangs as well.

@itinance I tried running node node_modules/react-native/local-cli/cli.js start --reset-cache, and this hangs as well.

Tried running rm -rf node_modules/ && npm cache clear && watchman watch-del-all && npm i, and this hangs on the watchman command.

So something seems to be wrong with my watchman. I might be related to the Xcode and or OS update (recently updated to macOS 10.12.1 and Xcode 8), but not sure.

watchman -v
4.7.0
react-native -v
react-native-cli: 1.2.0
react-native: 0.34.1
node -v
v5.7.1

Any ideas?

ostigley commented 8 years ago

@blackburnian I found the problem was with watchman. Fixed it here: https://github.com/facebook/watchman/issues/381#issuecomment-257669560

vikrampanwar commented 7 years ago

I tried many github examples but non of them is working with latest react native installation, but my own made projects are working fine

hepiska commented 7 years ago

@vikrampanwar get same issue, have u update your node to node 8?

hramos commented 7 years ago

Let's merge this into a more recent issue, for clarity.

hramos commented 7 years ago

Duplicate of #14447

hramos commented 7 years ago

Duplicate of #14423