Repository navigation
Description
Description
I noticed some people recently asking about this "No bundle url present" error and I just faced it myself.
Reproduction
I had just run ˜react-native init projectName˜, setup my App.js file (a simple Hello World), called it in both iOS and Android indexes and run ˜react-native run-ios˜. Then the No bundle url present error appeared.
Solution
I tried to delete my node_modules and npm install, close the packager and run the project again, but it could only be solved when I follow the steps given here (http://stackoverflow.com/questions/42610070/what-means-of-no-bundle-url-present-in-react-native).
- Run "react-native run-ios"
- When the error appears, run "npm install"
- Then run "react-native run-ios" again.
Additional Information
This is the first project I started using RN 0.42. Since it never happened before and I am not the only one facing this issue, I guess it should be taken a closer look to it.
Here's my package.json:
{
"name": "myProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "~15.4.1",
"react-native": "0.42.0"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "~15.4.1"
},
"jest": {
"preset": "react-native"
}
}
If I can be more helpful to make any further test, it would be a pleasure.
Activity
edwardofclt commentedon Mar 7, 2017
Having the same issue now. Not sure what changed.
decadef20 commentedon Mar 8, 2017
Same problem.
edwardofclt commentedon Mar 8, 2017
skv-headless commentedon Mar 8, 2017
What if you run
npm startin console?qyvip commentedon Mar 8, 2017
Same problem.
I found
JsCodeLocation = [[RCTBundleURLProvider jsBundleURLForBundleRoot:@ sharedSettings] "index.ios" fallbackResource:nil];
Take effective address not, this happens in connection to the network situation (and not all networks such), when this happens, disconnected from the network, I think, in a virtual machine can run in localhost:8081
This is the way I am
edwardofclt commentedon Mar 8, 2017
edwardofclt commentedon Mar 8, 2017
qyvip commentedon Mar 8, 2017
@AbeHerbert
Yes, this is the IOS code, I simply look at the code, here will automatically take the local IP, but obviously, did not take, Android I have not tried, but this is obviously different from the IOS code
My situation when I changed a network environment, it is normal, very clever, when I met the home
I try to print out the automatic access to the full address, are taken to return to the null, at the same time, APP will be waiting for the start of the case, this is the local address
When I will
Modified into
This time can be a normal start, but after entering the application of remote image loading, it seems wrong
This is just a point of view, and there is no concrete solution
rmevans9 commentedon Mar 8, 2017
I have gotten that message when the packager is not running when the app is launched on iOS. Typically I have to completely kill the app and launch again after I have started the packager. Can you guys be sure that you have the packager running prior to launching the app?
soutot commentedon Mar 8, 2017
@rmevans9 in my case the packager was running as always. The solution I posted is done while the packager and the app are running. That's the only way I found by now to handle this. I belive there's something going wrong when the modules are installed on react-native init. I have to do some tests before assurance it
qyvip commentedon Mar 8, 2017
Yes, the packager is already running. I can access it through the browser
despreston commentedon Mar 8, 2017
I am also seeing this issue on RN 0.42.0
liqueflies commentedon Mar 8, 2017
+1
Mess1ah commentedon Mar 9, 2017
Same problem and I run "npm install" and "react-native run-ios" ,the problem seems to be not solved yet.
yustada commentedon Mar 9, 2017
I am seeing same problem @0.42.0 and
"npm install" does not solve it.
164 remaining items
originalix commentedon Mar 8, 2018
This work for me.
marcelotadeujr commentedon Mar 11, 2018
This work for me.
alangumer commentedon Mar 13, 2018
run
yarn start or npm start
to start the development server
if necessary run again:
react-native run-ios
https://stackoverflow.com/a/48016926/4636856
lucidtheory commentedon Mar 20, 2018
For me for some reason the
jsCodeLocationchanged inAppDelegate.mmake sure it is
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];GemN commentedon Mar 22, 2018
From another thread after trying everything, that solution worked:
"this is solved my issue:
info.plist → information Property List → + App Transport Security Settings → + Allow Arbitrary Loads = YES"
rishabh-saxena commentedon Mar 24, 2018
I got it resolved by including the below code in Info.plist file which I had removed from the production build.
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict>mikenk2010 commentedon Mar 27, 2018
Easy boy, just remove ios/build (
rm -rf ios/build) then runreact-native run-iosagain! Take me 30m to figure out...LOL...yogeshR5 commentedon Apr 3, 2018
@jiteshwadia same problem occurred to me.
what I have to do now??
bjacobs09 commentedon Apr 5, 2018
For me, I was having a problem with Node not being recognized in any new tab opened. So I have to use
nvm usein every new tab. Because the bundler was opening in a new tab when I rannpm run ios, it wasn't seeing Node. And I can't type in that bundler terminal for some reason.So my solution was in one tab run
nvm use 8.9.3or whatever version you're on, then in that tab runnpm start. Then open a new tab and donvm use 8.9.3and in that tab runnpm run iosor however you run your simulator.LuckyCrab commentedon Apr 16, 2018
This work for me.
Air-Rands commentedon Apr 29, 2018
I had the same issue and after trying everything here qyvip's answer lead me to the right one.
In the ios>"Your Main Project Folder">AppDelegate.m .
update
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
to be
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
miksansegundo commentedon May 5, 2018
This worked for me. Check that your

main.jsbundleis targeted to your main Project.I also had to clean the caches.
tayfunyasar commentedon May 22, 2018
Adding NSAllowsArbitraryLoads: true solved my problem.