KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
642 stars 101 forks source link

TypeError: null is not an object (evaluating 'RNRate.rate') [ANDROID] #69

Closed AdamGerthel closed 4 years ago

AdamGerthel commented 4 years ago

I've just upgraded from 1.2.1 to 1.2.4 and I'm getting this error on Android (not iOS!)

Error description

TypeError: null is not an object (evaluating 'RNRate.rate')

See screenshot below:

Screenshot 2020-09-01 at 10 38 32

Code sample

import Rate from 'react-native-rate'

// ...

    Rate.rate({
      AppleAppID: config.appStoreId,
      GooglePackageName: config.androidPackageName,
      preferInApp: true
    }, success => {
        // Removed my code here since it's not relevant to the error
    })

Misc info

React Native: 0.63.2 React Native Rate: 1.2.4

Tested on real device

AdamGerthel commented 4 years ago

Also, the readme states:

Android, Windows, etc don't use any native code. So don't worry! (There still is linking to Android if you do react-native link. We only left this here so that we can call native code if there is native code to call someday.)

But that doesn't seem to be the case any longer, no?

AdamGerthel commented 4 years ago

Ended up being an issue with linking

dilipsuthar97 commented 2 years ago

Anyone solved the above issue, I'm facing the same issue right now.