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

Getting Products causes "There was a problem with the store" after upgrading to v6 #1689

Open
4 of 5 tasks
samuelm00 opened this issue Apr 26, 2024 · 8 comments
Open
4 of 5 tasks

Comments

@samuelm00
Copy link

samuelm00 commented Apr 26, 2024

Describe the bug
I'm currently trying to upgrade from v5 to v6 and then to v7. The problem is that as soon as I upgrade from v5 to v6 I get the following error:

🤖‼️ PurchasesError(code=StoreProblemError, underlyingErrorMessage=Error when fetching products - DebugMessage: Server error, please try again.. ErrorCode: 6., message='There was a problem with the store.')

the code causing the error: Purchases.sharedInstance.getProducts(productIds, ProductType.SUBS, callback);

I have been trying for quite some time but can't seem to figure out what the problem is.

  1. Environment
    1. Platform: Android target SDK 33
    2. SDK version: 6.4
    3. OS version: Mac OS
    4. How widespread is the issue. Percentage of devices affected. In production with v5 everything is running fine
@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 @samuelm00 !

The error that you are seeing is a generic store problem error, the problems that will trigger this on iOS:

If this occurs while testing in sandbox, we recommend that you try either repeating the operation later or creating a new sandbox user on iOS.

Since this was happening during the migration, there were some bigger changes in that update from v5 to v6. Have you checked out our migration guide yet? If not, that can be found here. I recommend going through that guide as there are some code changes and changes to the product that could be causing this.

Let me know if that helps!

@samuelm00
Copy link
Author

Hey @michaelAtRC

I think there is something else going on as well.

I have 2 apps on my machine locally:

the first one is using v5 and the other one v6. For the account that already bought a subscription using v5 I always get the error as described in the issue when I try to fetch the products from the store using the app with v6. But on v5 everything is working perfectly fine.
For all accounts that haven't bought a subscription yet, everything seems to be working fine in both v5 and v6.

Do you have any idea what could be the problem?

  • APi Quota exceeded can't be the case because then it shouldn't work on v5 as well
  • Invalid Android package name is also not the case
  • Google server down also not possible since everything works with v5
  • Google Billing Client SERVICE_TIMEOUT seems unlikely, why should it time out every time?

@michaelAtRC
Copy link

Hey @samuelm00 ,

There were some changes during this migration to purchase parameters. Are you possibly trying to make the purchase with these params on an older version?

https://github.com/RevenueCat/purchases-android/blob/main/migrations/v6-MIGRATION.md#purchasing-api-changes

@samuelm00
Copy link
Author

samuelm00 commented May 13, 2024

Hi @mikescamell thanks for you answer,

but I don't even get to the point where I'm able to purchase anything.

It already fails here:

Purchases.sharedInstance.getSubscriptionSkus(skus, callback)

I know it's deprecated but also changing it to

Purchases.sharedInstance.getProducts(skus, ProductType.SUBS, callback)

doesn't help

@michaelAtRC
Copy link

Hey @samuelm00 ,

Just to confirm which version of the SDK are seeing this on?

@samuelm00
Copy link
Author

@michaelAtRC I'm using 6.4.0, I also tried other versions but all have the same problem

@michaelAtRC
Copy link

Hey @samuelm00

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!

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