React-native: "Cannot find entry file index.ios.js in any of the roots"

Created on 13 Oct 2016  路  6Comments  路  Source: facebook/react-native

Having trouble loading js bundle through packager while debugging on device. I can see the request come through from the device but packager sticks at "find dependencies". I can successfully retrieve the bundle in chrome using the same IP.


My jsCodeLocation:

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"192.168.1.215:8081/index.ios" fallbackResource:nil];

I've added this to my Info.plist to no avail:

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

First request from chrome successful, second request from device unsuccessful

screen shot 2016-10-12 at 11 41 46 pm

Error on device

img_6717

Additional Information

  • React Native version: 0.32
  • Platform(s) (iOS, Android, or both?): iOS 10
  • Operating System (macOS, Linux, or Windows?): macOS Sierra
Locked

Most helpful comment

Getting this in 0.45.0, Mac OSX Sierra

All 6 comments

No longer needed IP prefix. Fixed by changing jsCodeLocation back to:

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

Getting this in 0.45.0, Mac OSX Sierra

Getting this in 0.45.0, Mac OSX Sierra;

fixed this by https://github.com/facebook/react-native/issues/4035

Can someone reopen this? I didn't start seeing this until upgrading to 0.45.0 today.

Still happening to me, too. Cleaned out everything. No go.

The path to the server is not found. Just re-start the server manually by cd { your project } npm start

Was this page helpful?
0 / 5 - 0 ratings