Skip to main content
Question

Purchase Package : Parameter specified as non-null is null....

  • Dec 26, 2022 8:51 AM UTC
  • 1 reply
  • 510 views

Forum|alt.badge.img+1

When I run this command Purchases.purchasePackage(selected_package). I don't know where I am wrong.

 

My Function : 

const {purchaserInfo} = await Purchases.purchasePackage(selectedPackage);

 

 

Get this error from LogCat

12-26 11:46:43.991 25754 26222 E unknown:ReactNative: Exception in native call
12-26 11:46:43.991 25754 26222 E unknown:ReactNative: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter packageIdentifier
12-26 11:46:43.991 25754 26222 E unknown:ReactNative:   at com.revenuecat.purchases.hybridcommon.CommonKt.purchasePackage(Unknown Source:2)
12-26 11:46:43.991 25754 26222 E unknown:ReactNative:   at com.revenuecat.purchases.react.RNPurchasesModule.purchasePackage(RNPurchasesModule.java:148)

 

 

This post has been closed for comments

1 reply

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • Dec 29, 2022 6:08 PM UTC

Hi Yusuf,

 

Can you send the full debug logs? 

 

You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:

[Purchases] - DEBUG: No cached entitlements, fetching
[Purchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200
[Purchases] - DEBUG: Purchaser info updated, sending to delegate

Please ensure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. The more information you include here, the better we'll be able to help.