UpdatedCustomerInfoListener not triggered
We have a certain amount of users facing an error during a subscription payment flow.
When the method Purchases.purchase is called we can receive a PurchasesError.PurchasesErrorCode.StoreProblemErrorfrom the onError callback method.
Which is normal and expected if there's an actual error on the store's side.
What is actually weird is that for some of these users we also receive that StoreProblemError error but in the meantime our integration that links RevenueCat to amplitude sends an event to notify about the premium state.
The user has actually subscribed and should have received a success callback.
The UpdatedCustomerInfoListener set is never triggered during that ongoing session to notify the new state then the user is stuck.
- Environment
- Platform: android
- SDK version: 6.9.5
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hey @Toubap !
Could you send debug logs that reproduce this? You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:
[Purchases] - DEBUG: No cached entitlements, fetching [Purchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200 [Purchases] - DEBUG: Purchaser info updated, sending to delegate
Please ensure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. The more information you include here, the better we'll be able to help.
Let me know if you have any questions!
Hello This is not something happening on our side. We do not reproduce it. We see this behavior often with our events tracking tool (amplitude). Actually we encounter the same behavior as described here: https://community.revenuecat.com/sdks-51/android-issue-there-was-a-problem-with-the-store-2187?tid=2187&fid=51
Hey @Toubap !
Unfortunately, Store problem errors are forwarded from Apple/Google/Amazon and indicate that there was a problem connecting to the App Store, Play Store, or Amazon Appstore. Since these are coming directly from them they aren't immediately happening on our end so we don't have full information on what happened in that instance.
The problems that will trigger this on iOS:
- Apple server is down (more common in sandbox than production)
- SKErrorUnknown
- SKErrorCloudServiceNetworkConnectionFailed
- SKErrorCloudServiceRevoked
- An SCA purchase flow was initiated.
The problems that will trigger this on Android:
- Google server is down
- Google Play Developer API Quota exceeded
- Invalid Android package name in the RevenueCat dashboard
- Google Billing Client SERVICE_TIMEOUT error
To solve this, if everything was working while testing, you shouldn't have to do anything to handle this error in production. RevenueCat will automatically retry any purchase failures so no data is lost.
I hope that helps!
Unfortunately the retry mechanism isnt working as you can see in this thread and on our side. Maybe another call to Purchase.configure or Purchase.syncPurchase could help getting up to date user info? It is very annoying not to have real guidelines about that as it happens a lot and as we miss a lot of potential revenues. Users are also facing unexpected behavior that we now have to handle
Hey @Toubap !
We only recommend configuring once as configuring more than once will likely cause more issues. You can call syncPurchases in this case as that should be safe!