Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdatedCustomerInfoListener not triggered #1552

Open
Toubap opened this issue Jan 10, 2024 · 6 comments
Open

UpdatedCustomerInfoListener not triggered #1552

Toubap opened this issue Jan 10, 2024 · 6 comments

Comments

@Toubap
Copy link

Toubap commented Jan 10, 2024

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.

  1. Environment
    1. Platform: android
    2. SDK version: 6.9.5
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@michaelAtRC
Copy link

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!

@Toubap
Copy link
Author

Toubap commented Jan 15, 2024

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

@michaelAtRC
Copy link

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:

The problems that will trigger this on Android:

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!

@Toubap
Copy link
Author

Toubap commented Jan 29, 2024

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

@michaelAtRC
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants