question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash iOS - No bundle url present

See original GitHub issue

Steps to reproduce the behavior

-Updated our non-expo react native project from 0.57.3 to 0.57.5 -installed react-native-firebase and react-native-splash-screen libraries (among others, but these seems to be related)

Expected behavior

-Running the application from Xcode will pickup the bundler / start it and properly start the application

Actual behavior

-running the application via command line react-native run-ios works fine, but when running from Xcode it fails to find the bundler and crashes on startup. Make sure you're running a packager server or have included a .jsbundle file in your application bundle. 2018-11-28 11:30:46.161150-0500 Loadboard[81354:4917348] *** Terminating app due to uncaught exception 'RCTFatalException: No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle.', reason: 'No bundle URL present.

After debuging for a long period, I noticed if I change export NODE_BINARY=node ../node_modules/react-native-schemes-manager/lib/react-native-xcode.sh to use ../node_modules/react-native/scripts/react-native-xcode.sh instead everything works normally as expected. On our package.json we have the following: "xcodeSchemes": { "Debug": [ "Dev" ], "Release": [ "Beta" ], "projectDirectory": "ios", "settings": {} }, and on our build phase Bundle React Native code and images: export DEVELOPMENT_BUILD_CONFIGURATIONS="+(Dev|Debug)" export NODE_BINARY=node ../node_modules/react-native-schemes-manager/lib/react-native-xcode.sh Any idea why that might be happening? Let me know if any missing info

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
martintreurnichtcommented, May 17, 2019

@thekevinbrown This is still a very real issue, we’ve managed to find the solution for this after waisting many hours so i’ll post our findings here in case anyone runs into this again.

This seems to actually be a limitation with cocoapods. When it copies your configurations over, it doesn’t know if they were duplicated from release or debug so it ends up not setting any of the debug flags on these configuration on your cocoa pods project, an easy way to check this is to go to build settings on your Pods project in xcode, search for preprocessor macros, you’ll see that DEBUG=1 is not set for your other debug configurations.

To fix this, you’ll need to add a line similar to this under target in your Podfile:

project 'MyProject', 'Dev.Debug' => :debug, 'Stg.Debug' => :debug, 'Dev.Release' => :release, 'Stg.Release' => :release

See http://guides.cocoapods.org/syntax/podfile.html#project for more information about custom configurations

Run pod install again, everything should be great now 😃

You can verify it by checking for the flags as described earlier, hope this helps someone!

0reactions
davidepalazzocommented, Apr 27, 2021

For anyone stumbling across this issue @martintreurnicht’s solution works and should be added to the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RN 0.60.5 iOS release build "No bundle URL present ... - GitHub
Resolved the issue. Seemed like my project was missing a shell script to automatically build the bundle and assets under "Build Phases >...
Read more >
What is the meaning of 'No bundle URL present' in react-native?
It usually means that your metro bundler is not running, some people run that in their own terminals or on the standard computer...
Read more >
No bundle URL present [fixed] - Onexlab - Medium
Make sure you're running a packager server or have include a .jsbundle file in your application bundle. It will show you the prompt...
Read more >
App crashes on device and there ar… | Apple Developer Forums
App crashes on device and there are no logs (React Native & Xcode) ... then I got an error message "No bundle URL...
Read more >
React Native: How to fixed No bundle URL present - YouTube
1. Deleted: main.jsbundle2. Run comment: react-native bundle --entry-file index.js --platform ios --dev false -- bundle -output ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found