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

App crashes during launch, built using react-native run-ios --device "name" #14500

Closed
galmis opened this issue Jun 13, 2017 · 6 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@galmis
Copy link

galmis commented Jun 13, 2017

Description

Initially I found that an app built using 'fastlane ios beta' was silently failing during launch. Then I tried running react-native run-ios --device "name" and saw the same issue. In Crashlytics dashboard I can see that the following exception is being thrown "Fatal Exception: RCTFatalException: No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle."

This works ok in a simulator, also it works fine on a device when using '--configuration Release' flag.

Suggestions how to fix this in #12754, #14118 or stackoverflow didn't help.

Additional Information

  • React Native version: Initially tried on 0.44.3, but then tried fresh projects on 0.39, 0.40, 0.44, 0.45.1
  • Platform: iOS
  • Development Operating System: macOS Sierra 10.12.5
  • Dev tools: XCode 8.3.3
@daltondanis
Copy link

Just a comment: You could just open XCode and push it to your device... :)

  • If you opened the project in XCode you would see that the project needs a "Bundle Identifier"
    maybe specifying no '--configuration Release' does not set it.

@galmis galmis closed this as completed Jun 26, 2017
@dzjin
Copy link

dzjin commented Nov 14, 2017

@galmis how did you end fixing this in fastlane?

My app is crashing on start in testflight, but works fine in the simulator. It started happening after upgrading from react-native 0.44 -> 0.49.5. I just ran react-native run-ios --configuration Release and I can recreate what's happening on the phone on the simulator now.

@wootwoot1234
Copy link

@dzjin did you end up solving this? Did you make any progress? I'm seeing the same issue. It's funny because it's not happening on other apps.

@dzjin
Copy link

dzjin commented Nov 30, 2017

@wootwoot1234 I am. There were quite a few issues.

  • My dependencies were out of date. Later RN versions (0.49 I think) required React 16, which had a breaking change. Mostly fixed by updating dependencies.
  • I had nvm installed (never used it, actually), and had .nvm folder, while nvm was pointed at node from io.js days. My understanding is that in release, JS is bundled and served, while in debug, the packager serves JS. When bundling for release, RN was picking up the incorrect node version, because it checks for ~/.nvm.
  • My npm install -g react-native's react version was 0.18 or so, which was the last time I tried to make an RN app. I noticed that when compiling, RN uses the global RN's binaries, as opposed to the local one in node_modules. I reinstalled react-native globally.
  • .. and more, less drastic things that were corrected on the way

My advice is to first check your dependencies and upgrade them thoroughly. There are tools provided by React to check this for you. And then load up the project in Xcode, and try to manually build them from there until you succeed in building.

Feel free to private message me for help.

@rodrijuarez
Copy link

Having the same problem here, I don't know if the problem it's related because I create a WebView of the application or what

@mvanroon
Copy link

@dzjin I ran into the exact same thing. Were you able to debug your --release versions? Was it a Javascript error in the end? Or did you just trial&error the whole thing until it worked?

(by the way I don't think GitHub has private messaging)

@facebook facebook locked as resolved and limited conversation to collaborators Jun 26, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants