Android In-App Purchases Failing: Unknown Error and Receipt Not Suitable
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
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.
@andresesfm Hi, Can you help me with the above errors? There are multiple solutions, but I'm starting to doubt which one is correct.
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}
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"}
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 ?
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.