Solved

Purchases.getOfferings() returns blank object

  • 5 August 2021
  • 9 replies
  • 240 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

@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.

View original

9 replies

Userlevel 3
Badge +8

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 3
Badge +8

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

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 3
Badge +8

@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 :( 

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...

Reply