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.

Device info native module is not installed correctly when install JSBundle at native app

See original GitHub issue

First, I make the RN project to the JSBundle and the image resource to the assets file. Then, I put the JSBundle(Change its name from main to bp) and the assets file to the native ios project(for assets file I choose create folder reference) And, when I click a Button and load the JSBundle, the Simulator show this error “Device info native module is not installed correctly”. I check the SOF answers and the issues #176, so reinstall my node_modules, but not work.And I’m sure there is just this project run at 8081. The point is my RN is ok when just run itself. The platform is ios and the IDE is of course xcode in mac. And here is my info of package.json: `{

"name": "BP",    
"version": "0.0.1",    
"private": true,  
"scripts": {  
    "start": "node node_modules/react-native/local-cli/cli.js start",  
    "test": "jest"  
},  
"dependencies": {  
    "react": "16.0.0-alpha.12",  
    "react-native": "0.45.1",  
    "react-native-deprecated-custom-components": "^0.1.0",    
    "react-navigation": "^1.0.0-beta.11"  
},  
"devDependencies": {  
    "babel-jest": "20.0.3",  
    "babel-preset-react-native": "2.0.0",  
    "jest": "20.0.4",  
    "react-test-renderer": "16.0.0-alpha.12"   
},  
"jest": {  
    "preset": "react-native"  
}  

} `

And here is how I load JSBundle.

NSURL *jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"bp" withExtension:@"jsbundle"]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"App" initialProperties:nil launchOptions:nil]; UIViewController *vc = [UIViewController new]; vc.view = rootView; [self.navigationController pushViewController:vc animated:YES];

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
huzhicheng1993commented, Jun 28, 2017

you should input adb reverse tcp:8081 tcp:8081

0reactions
stale[bot]commented, Oct 29, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native DeviceInfo native module is not installed correctly
I'm trying to run a React-Native application on my Android device which is a Huawei Honor 7, the device is connected to the...
Read more >
Common development errors - Expo Documentation
Try running npx expo start --no-dev --minify to reproduce the production JS bundle locally. If possible, connect your device and access the device...
Read more >
React Native SDK with CodePush API Reference
A native API (Objective-C and Java) that allows the React Native app host to bootstrap itself with the right JS bundle location.
Read more >
You.i React Native Issues - You.i TV Developer Portal
Issue: You.i CLI Command Not Found. Installation on Linux succeeds but youi-tv command fails as follows:.
Read more >
Integrating React Native with existing Android and iOS native ...
Call native function, send param, send callback from js code to native code (kotlin & swift) through a native module and vice versa....
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