Skip to main content
Question

React Native Android Exception java.lang.NullPointerException

  • March 27, 2024
  • 1 reply
  • 569 views

Forum|alt.badge.img+7

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
1com.revenuecat.purchases.hybridcommon.CommonKt in purchasePackage at line 6
2com.revenuecat.purchases.react.RNPurchasesModule in purchasePackage at line 87
3java.lang.reflect.Method in invoke
4com.facebook.react.bridge.JavaMethodWrapper in invoke at line 149
5com.facebook.react.bridge.JavaModuleWrapper in invoke at line 148
6com.facebook.jni.NativeRunnable in run
7android.os.Handler in handleCallback at line 938
8android.os.Handler in dispatchMessage at line 99
9com.facebook.react.bridge.queue.MessageQueueThreadHandler in dispatchMessage at line 1
10android.os.Looper in loop at line 250
11com.facebook.react.bridge.queue.MessageQueueThreadImpl$4 in run at line 38
12java.lang.Thread in run at line 923

 

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 684 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