Skip to main content
Question

React Native Android Exception java.lang.NullPointerException

  • 27 March 2024
  • 1 reply
  • 264 views

Forum|alt.badge.img+5
  • New Member
  • 1 reply

Hi

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"

Sentry:

NullPointerException
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

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 432 replies
  • March 29, 2024

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?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings