What is the meaning of "Missing bundle url" in the response-native?

When I run a reactive project, I get the error no bundle URL present , but I don’t know what errors I am making, I was very confused.

enter image description here

+161
ios reactjs react-native
Mar 05 '17 at 15:16
source share
50 answers
  • one
  • 2

Solve the error No bundle URL present :

  • By running the following command in the project root directory to remove the iOS build directory, and to kill other React Native sessions (assuming that they are running on port 8081 by default) before reassembling:

rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios

  • Update your React Native workflow to avoid this error by combining the above command combination into an alias and adding it to the Bash.bashrc configuration file with this command:

echo "alias rni=\"kill \$(lsof -t -i:8081); rm -rf ios/build/; react-native run-ios\"" >> ~/.bashrc; source ~/.bashrc

Now you can run the React Native iOS build (without worrying about some common red error screens when a death occurs) with a simple alias reduction:

rni

+110
May 20 '17 at 12:02 a.m.
source share

I just ran into this problem (first started working with React Native). The problem disappeared when - while the ios ( react-native run-ios ) simulation was running - I ran npm install and then react-native run-ios again. In the terminal window, it showed that it was merging, and then the simulator showed a welcome screen.

See this link for instructions after react-native init PropertyFinder try using npm start (This works for me)

+67
Mar 05 '17 at 18:58
source share

Close the simulator and terminal. Open a new one and go to your project, and then update your native native one like this:

 react-native upgrade 

Problem in: Infinite recursion in RCTFatal when a package fails .

+27
Mar 30 '17 at 6:36
source share

As indicated in the error message:

Consent to an Xcode / iOS license requires administrator rights, run "sudo xcodebuild -license", and then reissue this command.

... I ran the following command:

 sudo xcodebuild -license 

He is working now.

+25
Apr 05 '17 at 5:33 on
source share

This problem occurs when you do not allow insecure connections through localhost, or perhaps try to accept insecure connections through http.

To fix this, add this to info.plist :

 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsArbitraryLoadsInWebContent</key> <true/> <key>NSAllowsLocalNetworking</key> <true/> </dict> </key> 
+22
Jan 27 '18 at 2:21
source share

Had the same problem when I linked my application. Make sure your main.jsbundle targets your main project

+21
Jan 04 '18 at 2:37
source share

Cause:

This is due to the fact that the application cannot find the server (which serves the user interface using javascript code).

Decision:

  • Make sure that everything related to responding to the native one is closed (not necessary, just to have a clean start for my decision, after my explanation, you can understand that this is necessary or not)
  • run npm run start or yarn start first
  • wait for this command to complete the task (usually you will see Loading dependency graph, done. )
  • run react-native run-ios/android

Explanation:

  • React Native comes with 2 parts:

    • Native part
    • Javascript Part
  • Build Commands:

    • react-native run-ios/android is to create your own part, then deploy on devices and run the application on devices (simulator / emulator / real device). It usually took 3 ~ 4 minutes to complete.

    • npm run start or yarn start is to create a javascript part and start the dev server to serve the built-in user interface for the application. It usually takes 30 seconds to complete.

=> Usually the javascript part ends first, then the native part comes later. (depending on the time they used).

=> This is only true for assembly for the first time (new assembly).

=> for reassembly:

  • The native part took 10 ~ 15 seconds to verify the changes, and because no change for native part => was made before the javascript part was built and maintained. (I'm not sure if the javascript part was rebuilt or not, but it took a lot of time than the original part)

  • That's why we had this problem, the application launched and demanded that which does not exist yet.

Bonus:

  • react-native run-ios/android will automatically start the dev server for you.
  • That's why when you started react-native run-ios/android right after react-native init <app_name> , everything went well. (because the auto start function and time were taken for a new build, as mentioned above).
  • Other “deleted” solutions worked because they forcefully restored.

The time used in this answer related to my car => may be different from others.

+15
Dec 29 '17 at 3:05
source share

I had the same error, and I was able to run the application only through Xcode. react-native run-ios does not work. To fix the problem, you need to delete the build folder in YOUR_PROJECT/ios/build/ . After that, you can start the application again through react-native run-ios . Hope this helps.

+11
Apr 20 '17 at 22:03
source share

Try running this code ---

sudo xcodebuild -license

This can solve the problem. This works for me.

+9
Jan 25 '19 at 9:02
source share

In most cases, this problem occurs when DNS lookup / IP lookup cannot find localhost.

Decision :

Try adding the localhost IP address to your host file etc.

You can add the following lines to your host etc file (/ etc / hosts)

127.0.0.1 localhost

255.255.255.255 broadcast host

:: 1 l ocalhost

To confirm that this is a problem, you can click on the package URL in Safari (if you try this in Chrome, it will resolve, but Safari will not be able to solve). Http: // local: 8081 / index.ios.bundle platform = ios & dev = true and downplay = false

+8
Oct 09 '17 at 10:05
source share

What solved this for me:

  • Open a terminal window
  • cd in YOUR_PROJECT/ios
  • Delete the build folder with the rm -r build
  • Run react-native run-ios again

Alternatively, you can open Finder, go to YOUR_PROJECT/ios and delete the build folder.

Then run react-native run-ios again.

Source: Andrew Bancroft

+7
Jul 21 '17 at 21:23
source share

Make sure your ATS settings are correct in the .plist file.

You can find the file in /ios/{{project_nameasket►/Info.plist

localhost should be defined as the target of the exception request as follows:

 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict> 

* (do not forget to remove this in the release version ..)

+7
Nov 21 '17 at 1:03
source share

For me, the problem was that he could not create a JS package. It does not indicate a build error with Xcode, so you may not know this. To find the error, run the following command.

react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output./ios/release/main.jsbundle --assets-dest./ios/release/main.jsbundle

For me, the error was with the lack of the PureRenderMixin component. This solution can be found here: https://github.com/facebook/react-native/issues/13078 . Basically you need to manually set response@16.0.0-alpha.3. This can be done by running this command.

npm --save react@16.0.0-alpha.3

This problem is now happening for everyone, because new versions of reactive alpha (in particular, alpha-5) are released and they destroy the built-in reactive assemblies.

+5
Mar 26 '17 at 13:10
source share

Solution -> npm start then open a new terminal and go to your project path and then click react-native run-ios it works for me

+5
Aug 08 '17 at 8:17 on
source share

This is a problem with response-native v0.42.1. Try closing all instances of the terminal and Xcode and run:

 launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist watchman version react-native run-ios 
+4
Mar 29 '17 at 19:31 on
source share

I found the easiest / fastest way around this is to exit the application in the simulator (2 x Cmd + Shift + H ) and restart.

+4
Sep 20 '17 at 23:15
source share

close the simulator first, then run them on the terminal

 npm install react-native run-ios 
+4
Mar 20 '18 at 17:21
source share

check your network proxy, better turn it off.

or u should find another way to support the packer server

+3
Mar 06 '17 at 4:50
source share

In my case, the problem was fixed by restarting the adb server: adb kill-server && adb start-server

+3
May 05 '17 at 19:39
source share

I had this problem and for me ... the problem was that the package did not start, it seems, because my default shell was zsh. to create a new terminal window and run .../node_modules/react-native/packager/launchPackager.command , but this did not work. Manually running this (and saving it) fixed this for me.

+3
May 17 '17 at 1:22
source share

check your "localhost" key in the NSExceptionDomains dict in the info.plist file

if it does not exist, it causes an error.

+3
Jul 17 '17 at 9:41
source share

I had the same problem. But my problem was that my Mac and iPhone were not on the same Wi-Fi network.

Therefore, make sure that they are all on the same network and restored again. If this is not the case, try the solutions mentioned by other participants here.

+3
Jan 14 '18 at 3:42
source share

This happened to me after rebooting my mac. There, the launchPackager terminal window opens when you launch the application on the simulator. I closed this window and completed the process (I also closed the simulator), and then ran run-ios again to react, and everything works fine.

+2
May 04 '17 at 10:50 a.m.
source share

Assuming you are using nvm and several versions of node, here is a solution:

  • Say you ran npm install -g react-native-cli in node v6.9.5 .
  • Now make node v6.9.5 the default by running nvm alias default 6.9.5
  • Now run react-native run-ios

The problem is that you have several versions of node installed via nvm , and to install react-native-cli you enabled or installed the latest version of node, which is not marked as default node, to indicate in nvm now. When you run react-native run-ios , this opens up another new terminal window in which, by default, nvm does not specify the version of node where you installed react-native-cli . Just follow the settings above, I hope this helps.

+2
Jul 23 '17 at 17:03
source share

I ran into the same problem and solved it by making changes to the AppDelegate.m file. I changed

 jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 

at

 jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 

And it worked for me :)

+2
Aug 20 '19 at 11:24
source share

try adding this:

 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsArbitraryLoadsInWebContent</key> <true/> <key>NSAllowsLocalNetworking</key> <true/> </dict> 

+1
Jul 28 '18 at 21:08
source share

Just run react-native start in Terminal:

 cd your react native app directory/ react-native start 

He will launch the packer, now do not close this terminal window, in your other terminal window, start your project. This is the only desire I have found to make it work properly.

+1
Jan 25 '19 at 7:15
source share

make sure you have .jsbundle in your project

Add

 react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios 

in your responsive native code try opening the project again

+1
Aug 09 '19 at 5:51
source share

Make sure launchPackage.command running in the terminal and try again. He will build a bunch. This is like a webpack-dev server.

0
Jul 15 '17 at 18:36
source share
  • check hosts that 127.0.0.1 localhost does not delete
  • Verify that the network agent is not configured.
  • and then npm install and react-native upgrade - reset your project
0
Nov 03 '17 at 6:28
source share
  • one
  • 2



All Articles