infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more!
MIT License
17.44k stars 1.38k forks source link

running react-native run-ios does not launch app #1285

Closed pdad04 closed 6 years ago

pdad04 commented 6 years ago

I'm trying to run the PizzaLocation app but When running react-native run-ios it outputs Build Succeeded but nothing launches. I've looked around online but haven't had any luck finding anything.

I get the following output in terminal

** BUILD SUCCEEDED **

The following commands produced analyzer issues:
    Analyze Base/RCTModuleMethod.mm
    Analyze Modules/RCTUIManager.m
(2 commands with analyzer issues)

Installing build/Build/Products/Debug-iphonesimulator/PizzaApp.app
Launching org.reactjs.native.example.PizzaApp
org.reactjs.native.example.PizzaApp: 42784

And then in my other terminal window I see this, but nothing else happens from here.

Metro Bundler ready.

Loading dependency graph, done.
 BUNDLE  [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1974/1974), done.

Steps to reproduce

  1. ignite new PizzaApp
    • Andross selected
    • No i18n
    • No Animation
  2. run react-native run-ios.

ignite doctor results:

System
  platform           darwin                                                                                                                 
  arch               x64                                                                                                                    
  cpu                4 cores                                                            Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz  
  directory          /Users/xxx/Documents/xxx/React/react-native/PizzaApp                                                       
vvv -----[ DEBUG ]----- vvv
{ Error: not found: yarn
    at getNotFoundError (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:13:12)
    at Function.whichSync [as sync] (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:131:9)
    at which (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/src/core-extensions/system-extension.js:113:22)
    at Command.module.exports [as run] (/usr/local/lib/node_modules/ignite-cli/src/commands/doctor.js:45:20)
    at process._tickCallback (internal/process/next_tick.js:68:7) code: 'ENOENT' }
^^^ -----[ DEBUG ]----- ^^^

react-native info

Environment:
  OS: macOS Sierra 10.12.6
  Node: 10.2.1
  Yarn: Not Found
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: 0.55.1 => 0.55.1
pdad04 commented 6 years ago

I was able to get this working. It still does not work if I just use react-native run-ios but if I run with react-native run-ios --simulator="iPhone 6s" or specifying another iPhone type it works.

williamdarkocode commented 6 years ago

I did that, but still, nothing opens.

pdad04 commented 6 years ago

Are you on a Mac? I found also that after I run the command in terminal, If it doesn’t open it was just that the simulator didn’t open automatically, so I had to manually launch the simulator

lalithnarayan commented 6 years ago

@pdad04 can you please let me know how to manually launch simulator

pdad04 commented 6 years ago

@pdad04 can you please let me know how to manually launch simulator

@lalithnarayan on Mac if you open spotlight search (command-Space Bar) and type 'simulator' then enter, it should open. That is what I had to do initially when my sim was not launching on its own.

lalithnarayan commented 6 years ago

@pdad04 thank you

EriksonMurrugarra commented 6 years ago

I opened the project in XCODE and it worked.

asvenus9999 commented 6 years ago

@EriksonMurrugarra Er Me too. I run by terminal, It didn't open in simulator but it worked when i build by xcode. Could you help me?

kevinvangelder commented 6 years ago

After you run it from Xcode try running it from the terminal again. Usually the terminal command starts working for me again.

jakesylvestre commented 5 years ago

Having the same issue in xcode 10

alainib commented 5 years ago

Having the same issue in xcode 10

me too. try this maybe, it worked for me before but now the problem appear again

Xode -> file -> project setting for « pre user build system » choose « legacy »

kaushal9678 commented 5 years ago

As @gdowens mentioned, I followed those steps and it worked for me rm -rf ios/build then running react-native run-ios --simulator

FirdousNath commented 5 years ago

same issue, nothing helped

jamonholmgren commented 5 years ago

I just ran through the steps outlined above and, other than running into this issue, it worked fine.

Rashmi215 commented 5 years ago

I opened the project in XCODE and it worked.

Can you please elaborate the steps.

michlee1337 commented 5 years ago

I've tried

But every time my simulator opens, the app opens to the loading page, then crashes. It never gets pass the loading page.

But if I build the project from XCode everything works fine.

Any advice?

jamonholmgren commented 5 years ago

@michlee1337 Related to #1401, maybe? Try the latest Ignite CLI and Ignite Bowser, it might help.

prathusingh commented 5 years ago

I was able to resolve it by building it from Xcode itself. Once build is succeeded, you may need to run (if you get an error) sudo launchctl limit maxproc [limit for one user] [total limit] Inside Simulator Help, Apple's example values are 2000 for one user and 2500 total.

dkniffin commented 5 years ago

Just going to put this here, because it comes up in search results and I've been trying to figure this out for several hours: If you are using react-native-splash-screen, make sure you do SplashScreen.hide() 🤦‍♂

stelselim commented 5 years ago

I've tried

  • setting all workspace/ project build and pre-build systems to "legacy"
  • deleting the build folder
  • running the run-ios with different specified devices

But every time my simulator opens, the app opens to the loading page, then crashes. It never gets pass the loading page.

But if I build the project from XCode everything works fine.

Any advice?

Did you figure out? I am having the same issue. it works with Xcode, but not in terminal (react-native run-ios)

sam-ong commented 5 years ago

@stelselim Hi did you get your problem fixed? Running into the same issue

tonystaark commented 5 years ago

same issue

ghost commented 5 years ago

same issue

ghost commented 5 years ago

@stelselim react native is more flexible to design app

jamonholmgren commented 4 years ago

This issue seems to be more of a catch-all for many different types of issues. I'm going to lock it for now. If you have a particular issue and especially if you can provide a repro, feel free to file it in the appropriate place:

https://github.com/infinitered/ignite/issues for CLI issues https://github.com/infinitered/ignite-bowser/issues for issues with Ignite Bowser boilerplate https://github.com/infinitered/ignite-andross/issues for issues with Ignite Andross boilerplate