question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Getting "purchase is not suitable to be purchased"

See original GitHub issue

RN: 0.61.5 RNIap: 4.4.3 Platform: Android Expected: calling finishTransaction succeeds Actual: finishTransaction fails with “purchase is not suitable to be purchased” Test env: real device

I’m integrating RNIap into a new app (so no real-world experiences yet) in order to purchase a non-consumable product. The iOS part works fine, but on Android I recently started to consistently get the error “purchase is not suitable to be purchased” when calling RNIap.finishTransaction.

Looking at the code, this indicates that my purchase is not considered to be purchased (!purchase.isAcknowledgedAndroid && purchase.purchaseStateAndroid === PurchaseStateAndroid.PURCHASED is false).

I’m pretty sure that my general setup (product id, native app configuration, etc.) is correct because a) the process works on iOS and b) it also used to work on Android until recently.

Some additional background: when starting the app in test mode I try to clean up any leftover data by following resolve unacknowledged purchase and consume owned items to avoid “already owned” error. Disabling those calls did not make a difference though.

Anyone has a hint what might be wrong in my setup?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
drbartocommented, Apr 22, 2020

@haikov sorry, but my “fix” is for sure not applicable to you. I have a helper function which converts the purchase JSON data which I receive from RNIap to something our backend can digest, and in this function I accidentally forgot to copy some Android-specific data fields.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with in-app purchases - Google Play Help
Troubleshoot the issue on your own · Check your connectivity · Force stop, then reopen the app or game · Check if your...
Read more >
[Android] The product is not available for purchase.
I am currently using react native,There is no purchase issue in the ios local test (Real device).Currently, it is not pos...
Read more >
How to Fix In-App Purchases Not Working on Android
Fix In-App Purchases Failing on Android · 1. Forcestop and Restart · 2. Clear the Cache · 3. Check for Network Connectivity ·...
Read more >
android - the item you requested is not available for purchase
Indicates that Android Market cannot find the requested item in the application's product list. This can happen if the product ID is misspelled...
Read more >
BillingClient.BillingResponseCode - Android Developers
If this error occurs despite making the check for recent purchases, then it may be due to stale purchase information that was cached...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found