[Closed] Crash using Pending and Complete

Hi,
I used standard process described here: Unity - Manual: Processing Purchases (
Saving purchases to the cloud). When user makes payment i do PurchaseProcessingResult.Pending and then when my server responds “it’s ok” i make PurchaseProcessingResult.Complete but after i get crash and unfortunately I dont see any crash report in my Crashlytic :frowning: . if I make PurchaseProcessingResult.Complete always it’s fine. App work correctly.
I develop for android.

Guys have u any idea? How i can handle it?
It’s looks easy peasy and i dont have any idea.

Hi @hexware ,

If you return PurchaseProcessingResult.Pending, you do not need to also return PurchaseProcessingResult.Complete after your server responds. You should call ConfirmPendingPurchase() to finish that purchase.

If that does not work, would you be able to provide some example code of what you are doing along with the error you are getting?

1 Like

Hi @ap-unity ,
Our source for Payments (https://dl.dropboxusercontent.com/u/3462292/wallet_cut.cs ) . We make call ConfirmPendingPurchase().

Would you be able to provide some more details?

Would you be able to send an adb log from when the app starts to the crash? That would be helpful in identifying what exactly is happening.

If you would prefer, you can open a support ticket:

Hi @ap-unity ,
I write logcat: https://dl.dropboxusercontent.com/u/3462292/log_crash.txt
and I marked strange spot with “---- !!!”. But i dont see any fatal error. my app just close when i buy item and make
ConfirmPendingPurchase().

Hi @hexware ,

I’m not seeing any of the Unity IAP debug statements in the log you sent. I don’t see any information about IAP initializing or processing purchases, etc.

I don’t really see anything wrong in the code you linked to. We didn’t test the server confirmation, or adding ConfirmPurchasePending in a callback the way you did, but we were not able to reproduce the issue where calling ConfirmPendingPurchase crashes an Android app.

If you don’t have any other logs to send to us, would you be able to fill out a support ticket and send us a copy of your project.