react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

Android In-App Purchases Failing: Unknown Error and Receipt Not Suitable

Open cagdaseksi opened this issue 1 year ago • 4 comments

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description

I am consistently encountering two errors when using the react-native-iap library in my React Native project. These errors is affecting Android platforms.

Expected Behavior

The purchase process should complete successfully without errors, allowing users to make in-app purchases.

Screenshots

Screenshot 2024-08-22 at 17 28 10 Screenshot 2024-08-22 at 17 31 24

Environment:

  • react-native-iap:12.15.2
  • react-native:0.74.3
  • Platforms (Android, device):

To Reproduce Steps to reproduce the behavior:

Go to the in-app purchase section. Attempt to make a purchase.

The following errors are displayed:

Purchase Error - An unknown or unexpected error has occurred. Please try again later. Receipt Error - Purchase is not suitable to be purchased.

cagdaseksi avatar Aug 22 '24 14:08 cagdaseksi

@andresesfm Hi, Can you help me with the above errors? There are multiple solutions, but I'm starting to doubt which one is correct.

cagdaseksi avatar Aug 22 '24 15:08 cagdaseksi

Facing same Error when trying to purchase multiple Consumable in-app products with Android

There seems to be some native module code issue. Getting below error log.

{"code": "E_UNKNOWN", "debugMessage": "Server error, please try again.", "message": "An unknown or unexpected error has occurred. Please try again later.", "responseCode": 6}

image image

deepal-jnext avatar Aug 29 '24 09:08 deepal-jnext

Facing the same problem here.

{"nativeStackAndroid":[],"userInfo":null,"message":"An unknown or unexpected error has occurred. Please try again later.","code":"E_UNKNOWN"}

We're getting tons of these warnings on Crashlytics, but I haven't found the reason just yet. I wonder if it might be related to network issues, as we often get the following warnings as well:

{"nativeStackAndroid":[],"userInfo":null,"message":"Purchase failed with code: 12","code":"E_UNKNOWN"}

jlopezdominguez avatar Jan 03 '25 16:01 jlopezdominguez

i am also getting this error , any solution ? Can we use await RNIap.validateReceiptAndroid({ packageNameAndroid: purchase.packageNameAndroid, productId: purchase.productId, purchaseToken: purchase.purchaseToken, }); on client side ?

ahaseeb001 avatar Jan 09 '25 06:01 ahaseeb001

I’m closing all issues reported in versions below 14, as the library now supports the new architecture with NitroModules and has been completely revamped.

hyochan avatar Sep 30 '25 18:09 hyochan