Solved

Purchases.getOfferings() returns blank object

  • 5 August 2021
  • 16 replies
  • 1044 views

Badge
  • New Member
  • 3 replies
{all: {}}

The issue is occurring in iOS as well as Android.

The product identifiers are same in the appstore as well as revenuecat. All agreements have been signed. There is a working version of RNIAP which we are replacing with revenuecat.

I am not using any sandbox, directly testing on my device.

How do I go about resolving this issue?

icon

Best answer by ryan 7 August 2021, 01:34

View original

16 replies

Userlevel 5
Badge +9

Hey @Ash!

 

I’d start by checking out our article on empty products here: 

 

It’s usually some configuration issue in Apple/Google that causes the products to be empty, that guide outlines the reasons we know about. 

Badge

Hi @ryan

I went through the list and verified all the items.

Still no luck.

Userlevel 5
Badge +9

If you run through the debug logs and see the Invalid product identifiers… array of products then that would indicate it’s some configuration issue probably outside of RevenueCat.

If you don’t see that log, and you see your products in an array of Valid product identifiers... then maybe your current Offering in the RevenueCat dashboard doesn’t have any associated products? Since it’s happening on iOS and Android it could be something along these lines, where there aren’t any products in the Offering?

Badge +3

We’re actually seeing something similar as well, but only with the Play Store.  Enabling debugging gives the following:
 

2021-08-05 14:36:54.811 23666-24032/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: XXXX
2021-08-05 14:36:54.813 23666-24032/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Querying purchases
2021-08-05 14:36:54.833 23666-24032/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Cleaning previously sent tokens
2021-08-05 14:36:54.836 23666-24032/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Tokens already posted: []
2021-08-05 14:36:54.837 23666-24042/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Products request finished for XXXX
2021-08-05 14:36:54.838 23666-24042/com.getjobber.jobber D/[Purchases] - DEBUG: 💰 Retrieved skuDetailsList:
2021-08-05 14:36:54.840 23666-24032/com.getjobber.jobber D/[Purchases] - DEBUG: ℹ️ Saving tokens []

(I removed the actual identifier for the sake of privacy.  Our case, we’re only requesting for a single identifier).

Does this mean that the call to fetch products succeeded, but didn’t bring back any results?  In our case, I’m expecting to see just a single subscription returned.  Does a subscription need to be marked as Active in the Google Play Console before it will be returned?

(We haven’t flipped our subscription to be Active yet, as we aren’t quite ready to launch it.)

Badge

@ryan  I have verified things again.

The debug logs show 

[Purchases] - WARN: 🍎‼️ Invalid Product Identifiers

But the product identifiers match with app store.

What could be the issue?

 

Userlevel 5
Badge +9

@Ash That Invalid Product Identifiers log indicates that the product identifiers were retrieved successfully from RevenueCat, but they could not be fetched from Apple. Apple unfortunately does not give the exact reason, just that they cannot be fetched. All of the reasons we hear about we’ve tried to outline in that article. Typically it could be an unsigned agreement, or testing on a simulator instead of a physical device. Also, things to double check are your bundle ID in Xcode are correct and you’ve enabled the in-app purchase capability in Xcode.

It shouldn’t be anything wrong with your code.

Im having the same issue, still no luck. If someone could help us all out Id be really grateful!!

Badge

@Ash That Invalid Product Identifiers log indicates that the product identifiers were retrieved successfully from RevenueCat, but they could not be fetched from Apple. Apple unfortunately does not give the exact reason, just that they cannot be fetched. All of the reasons we hear about we’ve tried to outline in that article. Typically it could be an unsigned agreement, or testing on a simulator instead of a physical device. Also, things to double check are your bundle ID in Xcode are correct and you’ve enabled the in-app purchase capability in Xcode.

It shouldn’t be anything wrong with your code.

Problem still occurs in production :( 

Badge +1

Same here, while it works fine for IOS, in Android I’m getting empty offerings.  I checked and user in part of Closed Track Tester, product activated, and all RCat product setup checks out.  Running out of ideas...

Badge +1

@Ash That Invalid Product Identifiers log indicates that the product identifiers were retrieved successfully from RevenueCat, but they could not be fetched from Apple. Apple unfortunately does not give the exact reason, just that they cannot be fetched. All of the reasons we hear about we’ve tried to outline in that article. Typically it could be an unsigned agreement, or testing on a simulator instead of a physical device. Also, things to double check are your bundle ID in Xcode are correct and you’ve enabled the in-app purchase capability in Xcode.

It shouldn’t be anything wrong with your code.

 

Hum, I had the same issue. I’m fine with your solution but if we can not fetch on simulator, it’s better that you provide a sample result in which we can use to design paywall. Otherwise, we need to public the app just to check data shape we might receive from Revenue cat.

Badge +1

Getting the same issue. I am waiting on an agreement for iOS, but i’ve done everything suggested for Android and still getting nothing. Not sure what to try next. 

Hello All,  

I’m facing the same issue where everything works fine under ios but the getOfferings() retruns a blank object under Android .

That should be a configuration issue but I’m not able to find it. 

I would like to check the Pruchase Logs  but I have not idea where to find them. Can anyone guide me ?

 

Thank you for you  support

Badge +1

I have found a solution for this, guys.

The problem was that in my products configuration for Android I was copying the offerings ID from Google Play console, rather than copying the Subscription IDs. RevenueCat does not regard offerings as products. For RevenueCat, a product is either a Subscription or an In App Product, but not an offering.

So, if you were also copying subscriptions’ offerings IDs from Google Play Console and setting these IDs as products identifiers on RevenueCat, you have been commiting the same mistake as mine.

The correct binding should be like this:

And that’s it. It’s now working for me. I hope it works for you too with this fix.

 

I have found a solution for this, guys.

The problem was that in my products configuration for Android I was copying the offerings ID from Google Play console, rather than copying the Subscription IDs. RevenueCat does not regard offerings as products. For RevenueCat, a product is either a Subscription or an In App Product, but not an offering.

So, if you were also copying subscriptions’ offerings IDs from Google Play Console and setting these IDs as products identifiers on RevenueCat, you have been commiting the same mistake as mine.

The correct binding should be like this:

And that’s it. It’s now working for me. I hope it works for you too with this fix.

 

Hi @UlyssesAlves, I have the same issue here, glad that you already solved this issue! I just wonder what exactly the “offering ID” and “subscription ID” is in google play console in your finding, cause i’m so confused. Here is the screenshot to help me ask the question more precisely. 
 



Besides, if the offering ID and subscription ID in google play console is exactly the thing what im guessing right now, so in my case, I need three different subscriptions and each subscription has its own base plan right? 

I would like to do more explanation to help me make myself more clear.

Wrong case (my case now):
Subscription 1 (product ID: 1234) → three base plans

  • monthly (ID: qqqq)
  • quarterly (ID: wwww)
  • yearly (ID: eeee)


Correct case (i wonder if it’s right):
Subscription 1 (product ID: xxxx) → (only one) base plan

  • monthly (ID: qqqq)

Subscription 2 (product ID: yyyy) → (only one) base plan

  • quarterly (ID: wwww)

Subscription 3 (product ID: zzzz) → (only one) base plan

  • yearly (ID: eeee)

Many thanks!

Badge +1

I have found a solution for this, guys.

The problem was that in my products configuration for Android I was copying the offerings ID from Google Play console, rather than copying the Subscription IDs. RevenueCat does not regard offerings as products. For RevenueCat, a product is either a Subscription or an In App Product, but not an offering.

So, if you were also copying subscriptions’ offerings IDs from Google Play Console and setting these IDs as products identifiers on RevenueCat, you have been commiting the same mistake as mine.

The correct binding should be like this:

And that’s it. It’s now working for me. I hope it works for you too with this fix.

 

Hi @UlyssesAlves, I have the same issue here, glad that you already solved this issue! I just wonder what exactly the “offering ID” and “subscription ID” is in google play console in your finding, cause i’m so confused. Here is the screenshot to help me ask the question more precisely. 
 



Besides, if the offering ID and subscription ID in google play console is exactly the thing what im guessing right now, so in my case, I need three different subscriptions and each subscription has its own base plan right? 

I would like to do more explanation to help me make myself more clear.

Wrong case (my case now):
Subscription 1 (product ID: 1234) → three base plans

  • monthly (ID: qqqq)
  • quarterly (ID: wwww)
  • yearly (ID: eeee)


Correct case (i wonder if it’s right):
Subscription 1 (product ID: xxxx) → (only one) base plan

  • monthly (ID: qqqq)

Subscription 2 (product ID: yyyy) → (only one) base plan

  • quarterly (ID: wwww)

Subscription 3 (product ID: zzzz) → (only one) base plan

  • yearly (ID: eeee)

Many thanks!

That’s it, @Craftto .

The correct case is like you described: only one base plan per subscription, and you should use the subscription id (which is the product id) as the identifier for the corresponding product on RevenueCat.

If it may help, in my case I ended up with 8 subscriptions, each one with a single base plan, because I have four subscription levels/entitlements (bronze, silver, gold and platinum), and for each of these levels I have both a monthly and a year plan. So it’s one subscription with one base plan for my “bronze montly” plan, another subscription with one base plan for my “bronze yearly” plan, and so on.

I have found a solution for this, guys.

The problem was that in my products configuration for Android I was copying the offerings ID from Google Play console, rather than copying the Subscription IDs. RevenueCat does not regard offerings as products. For RevenueCat, a product is either a Subscription or an In App Product, but not an offering.

So, if you were also copying subscriptions’ offerings IDs from Google Play Console and setting these IDs as products identifiers on RevenueCat, you have been commiting the same mistake as mine.

The correct binding should be like this:

And that’s it. It’s now working for me. I hope it works for you too with this fix.

 

Hi @UlyssesAlves, I have the same issue here, glad that you already solved this issue! I just wonder what exactly the “offering ID” and “subscription ID” is in google play console in your finding, cause i’m so confused. Here is the screenshot to help me ask the question more precisely. 
 



Besides, if the offering ID and subscription ID in google play console is exactly the thing what im guessing right now, so in my case, I need three different subscriptions and each subscription has its own base plan right? 

I would like to do more explanation to help me make myself more clear.

Wrong case (my case now):
Subscription 1 (product ID: 1234) → three base plans

  • monthly (ID: qqqq)
  • quarterly (ID: wwww)
  • yearly (ID: eeee)


Correct case (i wonder if it’s right):
Subscription 1 (product ID: xxxx) → (only one) base plan

  • monthly (ID: qqqq)

Subscription 2 (product ID: yyyy) → (only one) base plan

  • quarterly (ID: wwww)

Subscription 3 (product ID: zzzz) → (only one) base plan

  • yearly (ID: eeee)

Many thanks!

That’s it, @Craftto .

The correct case is like you described: only one base plan per subscription, and you should use the subscription id (which is the product id) as the identifier for the corresponding product on RevenueCat.

If it may help, in my case I ended up with 8 subscriptions, each one with a single base plan, because I have four subscription levels/entitlements (bronze, silver, gold and platinum), and for each of these levels I have both a monthly and a year plan. So it’s one subscription with one base plan for my “bronze montly” plan, another subscription with one base plan for my “bronze yearly” plan, and so on.

Hey @UlyssesAlves Thanks you so much about giving such a detailed explanation! I’ve already solved my issue, using exactly the way (the correct case) you shared with the community!

Reply