Android - old stuck receipts/transactions still stuck with 2.2.7

Hi,

We can confirm that with recent patches, the issues with Android IAPs in which transaction/receipts are not being cleared properly have been resolved on IAPs that players have not yet had the issue on.

However, if the player already had a IAP that was “stuck” (resulting in DuplicateTransactions/“You already own this item” failures), theses don’t seem to get cleared and still remain in this state.

Is there anything we should do to force clear/repair these? Or will it eventually clear on their own?

If the previous purchases are still in Pending state, you would expect a ProcessPurchase to be triggered automatically during IAP initialization. If you then return Complete or call ConfirmPendingPurchase, this should clear the transaction. Please provide the device logs with Debug.Log in your ProcessPurchase to confirm if this method is invoked properly. How To - Capturing Device Logs on Android

We went in and investigated further into our logs. It seems that ProcessPurchase isn’t being called during the IAP initialization. Instead we get a log of “Already recorded transaction”. And so, it seems these so called pending purchase doesn’t even get to be handled by our processPurchase in order to be cleared. And so we have transactions that is in state in which it never gets processed.

I’ve attached the logs of two test cases:

  1. Bugged.log is us trying to buy the bugged/stuck IAP. You’ll see that processPurchase isn’t called during Init instead youll see the “Already recorded transaction” log. You will then see us trying to buy the IAP and it failing.

  2. Normal.log is us buying a IAP that has not been affected by the issue. You’ll again see that processPurchase is not called during the Init phase. You’ll then see us successfully making the transaction and processPurchase is called (in the Processing purchase log line)

Our game has been live for more than a year now and we did not have any problems with the processPurchase/ConfirmPendingPurchase flow, until around December 2020 where we had updated to 2.2.x

6821375–792377–StuckIAP.zip (3.9 KB)

Got it, thanks for checking. Yes with 2.2.2 we introduced an issue with ConfirmPendingPurchase which has since been resolved. You might try clearing the Google Play cache on the device.

Hmm, we’ve tried that numerous times, our QA does the clear cache systematically when they test new beta builds, since the store entries gets cached.

Sorry, not sure what else to recommend. I doubt you have the Product object handy where you could attempt to call ConfirmPendingPurchase. You may have some orphaned purchases created with the earlier version of IAP. Is this a Consumable or Non-Consumable? Not ideal, but perhaps you could create a new similar product and redirect to that purchase if you are able to detect the failure on the original product.

It’s a consumable. We’ve attempted to try to call ConfirmPendingPurchase where we had access to the Product (like just before a new purchase) and check if it had a receipt in the object, but this didnt seem to work.

We’re pretty much at the point in which we have to create duplicates of our IAPs yeah… so before we do that, we wanted to report this to see if there was anything that can be done by the plugin to repair this. Or to see if there’s still an issue that needs to be dealt with.

1 Like