React Native Android Exception java.lang.NullPointerException

  • 27 March 2024
  • 1 reply

Badge +5


we experience crashes on Android that affect our crash rate on Google Play which is bad.

We are using "react-native-purchases": "7.1.0"


Parameter specified as non-null is null: method kotlin.jvm.internal.l.f, parameter packageIdentifier
com.revenuecat.purchases.hybridcommon.CommonKt in purchasePackage at line 6
com.revenuecat.purchases.react.RNPurchasesModule in purchasePackage at line 87
java.lang.reflect.Method in invoke
com.facebook.react.bridge.JavaMethodWrapper in invoke at line 149
com.facebook.react.bridge.JavaModuleWrapper in invoke at line 148
com.facebook.jni.NativeRunnable in run
android.os.Handler in handleCallback at line 938
android.os.Handler in dispatchMessage at line 99
com.facebook.react.bridge.queue.MessageQueueThreadHandler in dispatchMessage at line 1
android.os.Looper in loop at line 250
com.facebook.react.bridge.queue.MessageQueueThreadImpl$4 in run at line 38
java.lang.Thread in run at line 923


This post has been closed for comments

1 reply

Userlevel 4
Badge +8

Hi, based on this error it sounds like you are passing the wrong argument. Can you make sure that you are passing the entire product to the purchasePackage() function and not just the identifier?