react-native-share: Unhandled JS exception: null is not an object. evaluating _reactNative.NativeModules.RNShare.FACEBOOK

Steps to reproduce

  1. npm install react-native-share --save
  2. react-native link react-native-share
  3. Copy-paste example code in a SocialShare.js file and export
  4. Import it from another file : import {SocialShare} from '../../components/SocialShare';
  5. Call SocialShare: <View> <SocialShare /> </View>

Expected behaviour

Share icons should appear

Actual behaviour

I am getting a null error: Screenshot 2019-05-07 at 4 04 30 PM

Environment

React Native Environment Info: System: OS: macOS 10.14.4 CPU: (4) x64 Intel® Core™ i5-3210M CPU @ 2.50GHz Memory: 79.52 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 11.14.0 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2 Android SDK: API Levels: 26, 28 Build Tools: 28.0.3 System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.3 AI-182.5107.16.33.5264788 Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: 0.58.4 => 0.58.4 npmGlobalPackages: react-native-cli: 2.0.1

react-native-share

Version: react-native-share@1.1.3

Link to repo (highly encouraged)

https://github.com/

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I had a similar error like @vikalpjain - After sometime i realised the issue was because i had another react-native app running on the same port - when i closed the other app my app ran as expected

Cheers for the hot tip!