We’re encountering a rare issue with one of our apps concerning renewable subscriptions, The listener is triggered multiple times, as if we were restoring purchases (As expected) but the state is most of the time “purchased”, but never “restored”.
If we call store.restore() It will behave the expected way, products will have the “restored” state. The problem comes when you attempt to buy the same subscription and it has not expired, suspend and restore the app. The steps to reproduce this bug is the following:
-
Start your app with no user logged in to the app store.
-
Attempt to purchase a subscription
-
Login popup will show, enter login credentials for test user.
-
Accept the purchase, everything will be OK, listener fired a single time.
-
Attempt to buy the same subscription again.
-
It will say you already own this subscription, listener fired a single time, state is “purchased” again
-
Close the alert, and suspend the App
-
Reopen the app, the store listener will fire with previous subscription receipts for account (hundreds in my case)
-
Expired receipts will have a “purchased” or “cancelled” state (95% purchased), no “restored”
We use the same test accounts over and over again, so we are receiving more than 100 receipts with the state property on “purchased” when this happens. All of the receipts are different and have different dates on them. I have yet to submit a bug report, so i would like to know if this is the expected behavior.