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

getOfferings not work #1036

Open
9 of 11 tasks
filipenanclarez opened this issue Apr 6, 2024 · 12 comments
Open
9 of 11 tasks

getOfferings not work #1036

filipenanclarez opened this issue Apr 6, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@filipenanclarez
Copy link

filipenanclarez commented Apr 6, 2024

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

  • Output of flutter doctor
  • Version of purchases-flutter
  • Testing device version e.g.: iOS 15.5, Android API 30, etc.
  • How often the issue occurs- every one of your customers is impacted? Only in dev?
  • Debug logs that reproduce the issue
  • Steps to reproduce, with a description of expected vs. actual behavior
    Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Describe the bug

After upgrade my project to flutter 3.19, when i try getOfferings, nothings happen.

Additional context

image

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.2, on Microsoft Windows [versÆo 10.0.19045.4170], locale pt-BR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.1)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.87.2)
[√] Connected device (4 available)
[√] Network resources

Version of purchase_flutter

purchases_flutter: 6.22.0

Testing device version

Android ASUS Z017DA API 26

How often the issue occurs

In production and in dev env. Many users reporting the bug.

@filipenanclarez filipenanclarez added the bug Something isn't working label Apr 6, 2024
@RCGitBot
Copy link
Contributor

RCGitBot commented Apr 6, 2024

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

@jbdtky
Copy link

jbdtky commented Apr 7, 2024

[MAJOR BUG | PRODUCTION] Watch out!!! It works in sandbox but throw an exception in prod!! I got a major bug in production due to this exception as it was not showing up in development environment (even in testflight or internal testing). Make sure you try catch this method!!

@jbdtky
Copy link

jbdtky commented Apr 7, 2024

PlatformException(23, There is an issue with your configuration. Check the underlying error for more details., {code: 23, message: There is an issue with your configuration. Check the underlying error for more details., readableErrorCode: ConfigurationError, readable_error_code: ConfigurationError, underlyingErrorMessage: There are no products registered in the RevenueCat dashboard for your offerings. If you don't want to use the offerings system, you can safely ignore this message. To configure offerings and their products, follow the instructions in https://rev.cat/how-to-configure-offerings. More information: https://rev.cat/why-are-offerings-empty}, null).

Request: The SDK should return an empty list if there's no offering but not an exception.

@michaelAtRC
Copy link

Hey @filipenanclarez ,

If your products, offerings, or packages are empty it's most likely related to a configuration or setup issue in Apple/Google. We've put together a handy guide here that outlines the common reasons for this here: https://community.revenuecat.com/sdks-51/why-are-offerings-or-products-empty-124

As the logs mentioned, our SDK was unable to fetch those product identifiers from Google Play to retrieve valid products. Are you sure you've published your app on a closed track? And can you double check your products are marked as Backwards Compatible in the Google Play Console dashboard? https://www.revenuecat.com/docs/android-products#google-subscription-model-v2---current-revenuecat-support

Here's how it works under the hood:
Products are configured in each store
Product identifiers are added to your offering configuration in the RevenueCat dashboard
The RevenueCat SDK fetches the configuration from the RevenueCat API
The SDK requests the products in the configuration from the stores directly
The stores return the valid products from that request

If the stores are unable to return valid products, it means that somewhere in that cycle there is a configuration issue. If there is a typo in your product identifier, the request will fail. If the bundle ID doesn't match the configuration in App Store Connect (or package name for Google Play, etc.), the request will fail.

@filipenanclarez
Copy link
Author

Hey @filipenanclarez ,

If your products, offerings, or packages are empty it's most likely related to a configuration or setup issue in Apple/Google. We've put together a handy guide here that outlines the common reasons for this here: https://community.revenuecat.com/sdks-51/why-are-offerings-or-products-empty-124

As the logs mentioned, our SDK was unable to fetch those product identifiers from Google Play to retrieve valid products. Are you sure you've published your app on a closed track? And can you double check your products are marked as Backwards Compatible in the Google Play Console dashboard? https://www.revenuecat.com/docs/android-products#google-subscription-model-v2---current-revenuecat-support

Here's how it works under the hood: Products are configured in each store Product identifiers are added to your offering configuration in the RevenueCat dashboard The RevenueCat SDK fetches the configuration from the RevenueCat API The SDK requests the products in the configuration from the stores directly The stores return the valid products from that request

If the stores are unable to return valid products, it means that somewhere in that cycle there is a configuration issue. If there is a typo in your product identifier, the request will fail. If the bundle ID doesn't match the configuration in App Store Connect (or package name for Google Play, etc.), the request will fail.

If the problems is setup, why all works fine in v5.8 ?
I think is not the case.

@michaelAtRC
Copy link

Hey @filipenanclarez

Can you send full debug logs of this?

@filipenanclarez
Copy link
Author

Hey @filipenanclarez

Can you send full debug logs of this?

What you mean whit “full debug log”?

the debug log is activated and the print show what’s appears on the logs when getOffers method is fired.

@michaelAtRC
Copy link

Hey @filipenanclarez

Full debug logs would be from start to finish including the initialization and when the SDK is first configured.

@michaelAtRC
Copy link

Hey @filipenanclarez

Any updates on this?

@filipenanclarez
Copy link
Author

Hey @filipenanclarez

Any updates on this?

Sorry for that. Because my project already in production, i rollback version, to publish fix to my users.

No time to make this lab yet.

@fullflash
Copy link

same here. also had to rollback to the working version

@michaelAtRC
Copy link

Hey There,

I recommend updating to the latest versions of the SDK as they have been stable and have not been seeing any issues with fetching offerings.

Let me know if that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants