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

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

Open dimitris4 opened this issue 1 year ago • 11 comments

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_ITEM_UNAVAILABLE,responseCode:4

Expected Behavior

I expect the purchase to complete successfully.

Environment:

  • react-native-iap: 10.1.3
  • react-native: 0.71.1
  • Platform: android real device.

dimitris4 avatar Mar 16 '23 13:03 dimitris4

Why not update to the latest?

andresesfm avatar Mar 16 '23 17:03 andresesfm

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

Prathameshlabde avatar Jun 06 '23 10:06 Prathameshlabde

Have you got any solutions @Prathameshlabde

Kishore-D18 avatar Jun 28 '23 07:06 Kishore-D18

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

anatooly avatar Aug 02 '23 15:08 anatooly

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 avatar Aug 07 '23 19:08 Matiassimone

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

Matiassimone avatar Aug 07 '23 20:08 Matiassimone

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

any solution for these error ?

Dipak-Complitech avatar Nov 01 '23 08:11 Dipak-Complitech

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.

bjarke-uptime avatar Dec 08 '23 12:12 bjarke-uptime

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

Dipak-Complitech avatar Dec 08 '23 12:12 Dipak-Complitech

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?

bjarke-uptime avatar Dec 08 '23 12:12 bjarke-uptime

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); })

Dipak-Complitech avatar Dec 08 '23 12:12 Dipak-Complitech