Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dimitris4 opened this issue Mar 16, 2023 · 11 comments
Open

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

dimitris4 opened this issue Mar 16, 2023 · 11 comments
Labels
🤖 android Related to android ⌛️ legacy Getting old 🆖 no template Does not fulfill minimal template

Comments

@dimitris4
Copy link

dimitris4 commented Mar 16, 2023

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 dimitris4 changed the title Error: That item is unavailable. Error: That item is unavailable. [android] Mar 16, 2023
@dimitris4 dimitris4 changed the title Error: That item is unavailable. [android] Error: That item is unavailable for purchase. [android] Mar 16, 2023
@andresesfm
Copy link
Contributor

Why not update to the latest?

@andresesfm andresesfm added 🤖 android Related to android 🆖 no template Does not fulfill minimal template ⌛️ legacy Getting old labels Mar 16, 2023
@Prathameshlabde
Copy link

#2455 Can anyone please suggest on this issue Please ?

@Kishore-D18
Copy link

Have you got any solutions @Prathameshlabde

@anatooly
Copy link

anatooly commented Aug 2, 2023

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
Copy link

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

Maybe its related to this ticket ?
#1593

@Matiassimone
Copy link

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

@Dipak-Complitech
Copy link

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
Copy link

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
Copy link

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

@bjarke-uptime
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Related to android ⌛️ legacy Getting old 🆖 no template Does not fulfill minimal template
Projects
None yet
Development

No branches or pull requests

8 participants