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.

Native module not linked: undefined is not an object

See original GitHub issue

Summary

isSimulator true
Version ^0.21.2
Affected OS android
OS Version android 6.0
Device nexus 5x

Same on my device

isSimulator false
Version ^0.21.2
Affected OS android
OS Version android 8.0
Device samsung galaxy s8

My dependencies

  "dependencies": {
    "lodash": "^4.17.5",
    "react": "16.2.0",
    "react-native": "0.53.3",
    "react-native-app-link": "^0.4.1",
    "react-native-device-info": "^0.21.2",
    "react-native-navigation": "^1.1.409",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-persist": "^5.9.1",
    "redux-thunk": "^2.2.0"
  },

screenshot_20180324-195929_babyname

Current behavior

I tried everything that was advised in other similar issue: it was linked through react-native link, did it manual, cleaned and recompiled the project - nothing helps.

p.s. my project with native code and don`t using expo.

p.p.s after react-native link react-native-device-info i see this

rnpm-install info Linking react-native-device-info ios dependency 
rnpm-install info Platform 'ios' module react-native-device-info has been successfully linked 
rnpm-install info Linking react-native-device-info android dependency 
rnpm-install info Platform 'android' module react-native-device-info has been successfully linked 

Expected behavior

I want to be happy with the successful getting of information about the device 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
kaslcommented, Mar 25, 2018

After a long, thorny process, debugging i am figured out. I used https://github.com/wix/react-native-navigation/ and overwritten MainApplication.java and there accidentally duplicated protected List <ReactPackage> getPackages () method and after run react-native link react-native-device-info was written in the wrong function (it was not actually called). In any case, thanks @machour for the quick feedback

0reactions
machourcommented, Mar 25, 2018

Happy you found the bug, cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Native module not linked: undefined is not an object · Issue #371
p.s. my project with native code and don`t using expo. p.p.s after react-native link react-native-device-info i see this. rnpm-install info ...
Read more >
"'undefined' is not an object" from Native Module in React Native
the idea is to make sure that the custom native library is included when building the native libraries used by react-native. Share.
Read more >
iOS : "'undefined' is not an object" from Native Module in React ...
iOS : "' undefined' is not an object " from Native Module in React Native [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >
undefined' is not an object" from Native Module in React ...
Coding example for the question "'undefined' is not an object" from Native Module in React Native-React Native.
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