Hi, sorry if the title is confusing, hard to explain in one line. I am using the React Native SDK and testing on an iOS device in sandbox.
The problem I’m having is that Purchases.getCustomerInfo()
seems to be returning an expired entitlement in the active
list on the first app run after it’s expired. On all subsequent runs, it disappears as expected because it’s expired. But it means the app thinks the user still has an active entitlement for that first run when they should not.
To try and explain the steps to reproduce:
- User purchases a subscription, which activates the entitlement.
- User uses the app during the subscription and all works as expected.
- User closes the app.
- Subscription expires (dashboard reports it is expired and entitlement is expired).
- User opens the app, which fetches
customerInfo
. - The entitlement still comes back in
customerInfo.entitlements.active
at this time. - User reloads the app or closes and reopens, which refetches
customerInfo
. - The entitlement is no longer in
customerInfo.entitlements.active
.
This is 100% reproducible. It appears in active
on the first fetch after it has expired.
I’m considering not treating the active
list as accurate and additionally looking at expirationDate
to ensure we’re not past the expiration date, but that seems a little counterintuitive since the list should be reliably accurate.
Please let me know if I’m misunderstanding or if this is a known bug, thank you!