iOS: This in-app purchase has already been bought.
See original GitHub issueVersion of react-native-iap
"react-native-iap": "^2.0.3",
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
Makes a purchase
const purchase = await RNIap.buyProductWithoutFinishTransaction(productId) const { transactionReceipt, purchaseToken } = purchase sendToServer(transactionReceipt, { onSuccess: () => { RNIap.finishTransaction() RNIap.consumeAllItems() }})
Actual behavior
Dialog: “This in-app purchase has already been bought”. This is only happening for one SKU, others are working fine. I think the app got in a bad state and I don’t see a way to fix it. I tired to call finishTransaction
and consumeAllItems
on initialization but that didn’t fix it. Other SKUs I can purchase multiple times without issue. Nothing is returned for getPurchaseHistory
.
Tested environment (Emulator? Real Device?)
Device (sandbox)
Steps to reproduce the behavior
I’m not sure.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
"this in-app purchase has already … | Apple Developer Forums
Tap 'Buy' to download it again for free." - If the user taps 'Buy' then a new transaction will be sent to updatedTransactions...
Read more >iOS "This in-app purchase has already been bought" pop-up
It was saying that it had already been purchased, it would restore for free, but not let me buy another subscription extension. Part...
Read more >"This In-App Purchase has already been bought. It will be ...
An error happens that you pay for the pack but don't get it and It remain unlock, but when you try to buy...
Read more >Since beta 2, “This in-app purchase has already been bought”
So I play rise of kingdom's, and I can't buy the daily supply upgrade etc. it resets every day for purchase, however I...
Read more >[iOS] Continually receiving a "This in-App Purchase has ...
There isn't really anything Bongfish can do except have you try and sign out of your Apple ID and back in, or try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is fixed with the version 2.2.0 by applying clearTransaction function. Thank you @JJMoon
I was calling this native code.
When I called it in
didFinishLaunchingWithOptions
currentQueue.transactions was empty, but calling it in applicationDidBecomeActive worked.This worked:
I’m not sure how but maybe we can expose this functionality in the library?