React Native app throws "No bundle URL present" but works on reload

Viewed 262

When I run my React Native app with react-native run-ios, about half the time it gives me the "No bundle URL present" error

enter image description here

and in the console it's hanging on "Loading dependency graph, done"

enter image description here

If I reload it always works fine, so it's not really a problem, I just want to understand why. Any ideas?

3 Answers

One of the most common reason can be internet proxy. If you have set any SOCKS proxy please unchecked that.

There may be several reasons for this. The cache remains in the build portion and can cause errors, most of which occur in the HTTP address acceptance section. It is recommended to look at the NSAppTransportSecurity section or NSExceptionAllowsInsecureHTTPLoads section in the info.list file.

If you don't find a problem here, you might encounter a problem at the build part. In this case, you can delete the build file and run

rm -rf ios/build

"No bundle URL present" means your iOS project doesn't have main.jsbundle file. main.jsbundle file is used to manage the resources (like image and custom font) in release mode. After reloading, working fine is some curioused but may be there will be some issue in App Store release or release testing like image doesn't show correctly... It is just my opinion. Thank

Related