dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.74k stars 633 forks source link

Error: That item is unavailable for purchase. [android] #2317

Open dimitris4 opened 1 year ago

dimitris4 commented 1 year ago

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

Description

I am trying to upgrade from react-native-iap v.7 to 10.1.3. IAP.getSubscriptions({ skus: subscriptionIds }) returns the subscriptions.

But when I call: IAP.requestSubscription({ sku: skuObj.sku, ...(skuObj.offerToken && { subscriptionOffers: [{ sku: skuObj.sku, offerToken: skuObj.offerToken }], }), })

I am getting the following Google Play error: _react native iap message:That item is unavailable.,debugMessage:,code:E_ITEMUNAVAILABLE,responseCode:4

Expected Behavior

I expect the purchase to complete successfully.

Environment:

andresesfm commented 1 year ago

Why not update to the latest?

Prathameshlabde commented 1 year ago

https://github.com/dooboolab-community/react-native-iap/issues/2455 Can anyone please suggest on this issue Please ?

Kishore-D18 commented 1 year ago

Have you got any solutions @Prathameshlabde

anatooly commented 11 months ago

Hi all, on IOS I see modal with text: Purchase of this item is not currently available This item is being modified. Please try again later.

iOS 15.2.1 device xS responseCode: 0

Matiassimone commented 11 months ago

Any update ? In my case is sporadically error, sometime appears and other one not.

Maybe its related to this ticket ? https://github.com/dooboolab-community/react-native-iap/issues/1593

Matiassimone commented 11 months ago

I can replicate the error with consumable items, in iOS & Android.

Dipak-Complitech commented 8 months ago

Yes i received error like Purchase error: {"code": "E_ITEM_UNAVAILABLE", "debugMessage": "", "message": "That item is unavailable.", "responseCode": 4}

any solution for these error ?

bjarke-uptime commented 7 months ago

Anyone ever managed to fix this one? I'm currently testing on an Android device and I have ensured that my Google account is added in the "License testing"-part of the Developer platform. I'm just getting

{"code": "E_ITEM_UNAVAILABLE", "debugMessage": "", "message": "That item is unavailable.", "responseCode": 4}

It's working just fine on iOS.

Dipak-Complitech commented 7 months ago

Yes it is working fine in ios and now it's working in android also

bjarke-uptime commented 7 months ago

Yes it is working fine in ios and now it's working in android also

Did you need to do any additional setup of your Google Developer account to get it working? Or perhaps there's some setup of the library I'm missing?

Dipak-Complitech commented 7 months ago

Yes it is working fine in ios and now it's working in android also

Did you need to do any additional setup of your Google Developer account to get it working? Or perhaps there's some setup of the library I'm missing?

New Lib having some method changes like

const products = await getSubscriptions({skus:itemSkus}); const offerToken = product.subscriptionOfferDetails[0].offerToken

await requestSubscription({ sku: this.state.selectSubscription, ...(offerToken && { subscriptionOffers: [ { sku: this.state.selectSubscription, offerToken: offerToken, }, ], }), }) .catch(err => { console.log('error buying product', err); })