getOfferings not work
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
‼️ 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
- [x] Output of
flutter doctor - [x] Version of
purchases-flutter - [x] Testing device version e.g.: iOS 15.5, Android API 30, etc.
- [x] 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
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.
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
[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!!
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.
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.
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.
Hey @filipenanclarez
Can you send full debug logs of this?
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.
Hey @filipenanclarez
Full debug logs would be from start to finish including the initialization and when the SDK is first configured.
Hey @filipenanclarez
Any updates on this?
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.
same here. also had to rollback to the working version
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!
@michaelAtRC Here's the full log, Could you please help?
DEBUG: ℹ️ API request started: GET '/v1/subscribers/NgJcJZoRYDWypAPnjA4IY53XuFC3' VERBOSE: Storing etag 'ec0d19febb593011' for request to 'https://api.revenuecat.com/v1/subscribers/NgJcJZoRYDWypAPnjA4IY53XuFC3' (success) DEBUG: ℹ️ API request completed: GET '/v1/subscribers/NgJcJZoRYDWypAPnjA4IY53XuFC3' (304) Request-ID: '462ad7ac-b3f1-40d4-a10b-af0824357079'; Amzn-Trace-ID: 'Root=1-666700a4-5fdfbce10fd9d43805abf9db' VERBOSE: Updating CustomerInfo '$RCAnonymousID:60b15fe283aa4ac4854c8389e2fa2629' request date: 2024-06-10 13:33:24 +0000 DEBUG: 😻 CustomerInfo updated from network. DEBUG: 😻 CustomerInfo updated from network. DEBUG: ℹ️ GetCustomerInfoOperation: Finished DEBUG: ℹ️ Serial request done: GET /v1/subscribers/NgJcJZoRYDWypAPnjA4IY53XuFC3, 0 requests left in the queue DEBUG: 😻 Store products request received response DEBUG: 😻 Store products request finished ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.) There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). More information: https://rev.cat/why-are-offerings-empty ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.) There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). More information: https://rev.cat/why-are-offerings-empty ERROR: 😿‼️ There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). More information: https://rev.cat/why-are-offerings-empty
@flutterdev77 This looks like the standard fetch failing because of the permissions attached in your service credentials JSON not being correct. I recommend going through our credentials guide here and making sure that you upload your service credentials JSON from the same account that you followed this on.
Keep in mind, these credentials can take 36 hours to go into effect from Google Play, so make sure to check back after that time period!
Its working for the andorid but for iOS its throwing the same exceptions.
Paid Apps licenses agreed. Subscriptions approved by the app and successfully import into the revenue cat as well.
I don't know what is missing.
This is back for purchases_flutter version 9.x.x, same error getting offerings. Everything is fine on the RC side.
The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).
Tested and working on 3 devices with iOS 16, 18 and beta 26, but not for 2 other devices with iOS 18 and beta 26.