NativeModule.RNDeviceInfo is null RN 0.61.2
See original GitHub issueBug
We just moved our app to RN 0.61.2, and we have the following issue on Android:
Environment info
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Memory: 111.60 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.2 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 24, 25, 26, 27, 28
Build Tools: 25.0.2, 27.0.3, 28.0.3
System Images: android-24 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.61.2
Library version: 4.0.1
Steps To Reproduce
Use RN 0.61.2 and only do an import
import DeviceInfo from 'react-native-device-info';
there is no way to link manually with this version of react native, can be the issue
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
NativeModule.RNDeviceInfo is null RN 0.61.2 #851 - GitHub
Bug We just moved our app to RN 0.61.2, and we have the following issue on Android: Environment info System: OS: macOS Mojave...
Read more >jest : react-native-device-info: NativeModule.RNDeviceInfo is ...
RNDeviceInfo is null. To fix this issue try these steps: The app runs fine in emulator without error. The problem seems with jest...
Read more >NativeModule.RNDeviceInfo is NULL - Expo Development Tools
# Bug Trying to use react-native-device-info for the first time and I'm getting… this error when the application tries to start up: node_modules ......
Read more >Active questions tagged react-native+ios - Stack Overflow
Next react-native-ffmpeg: Native module cannot be null (ios) and null is not an object ... Running on react-native : 0.61.2, react-native-firebase: 5.2.0.
Read more >react-native-device-info - npm
Linking in native modules is a frequent source of trouble for new react-native developers, resulting in errors like "RNDeviceInfo is null" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem but it was due to using react native navigation.
Needed to change my createAdditionalReactPackages function to:
@Override public List<ReactPackage> createAdditionalReactPackages() { return new PackageList(this).getPackages(); }
@ShooterArk looks like you’re trying to do pods with rn59? Is that right? That’s basically unsupportable at this point. You need RN60+ in order to do Xcode 11 well, and you need Xcode 11 to do iOS13 which is a requirement (or about to be), right? At the same time, this library used to work fine but I used react-native link back in the RN59 days, I did not add it as a pod.