Skip to main content

I too encountered the issue with getOfferings not working on Android. It was baffling because the revenuecat configuration (offering > product > entitlement)  was correct, and standalone api calls worked ok. All iOS tests worked fine, yet in Android I got errors. 

"There is an issue with your configuration. Check the underlying error for more details."

and upon digging deeper into that message:

“None of the products registered in the revenuecat dashboard can be found in the google play store”
 

For me, the issue was that I was using the WRONG API KEY when initiating revenuecat in a given function. I was trying to be “too agnostic”. 
 

// I was feeding the iOS api key when initiating revcat, thinking it was a global API key. 
await Purchases.configure({ apiKey: revenueCatApiKey });

// Then of course the rest of code worked fine on iOS....
const offerings = await Purchases.getOfferings();


// But what I needed to do was initiate revenue cat with the platform specific API keys, found under Platforms > dIOS OR GOOGLE] > Public API Key

const revenueCatApiKey = Platform.OS === 'ios' ? PUBLIC_REVENUECAT_KEY_IOS : PUBLIC_REVENUECAT_KEY_ANDROID;


// With the correct API key imported for the platform, the agnostic code worked as planned... ie:

// Init
await Purchases.configure({ apiKey: revenueCatApiKey }); // set per platform

// Execute code...
const offerings = await Purchases.getOfferings();


So in summary if you are having issues with getOfferings on Android, make sure you’re initiating revenuecat’s Purchases.configure() with the correct Public API Key for the platform. 

Hey ​@RETECH

Thank you so much for sharing this!

Proper SDK configuration is crucial to ensure the SDK works as expected. Glad you got it working!

Another thing to add is to double-check that the package name configured in RevenueCat’s dashboard matches the one in your codebase; mismatches there can also cause getOfferings to fail.

We really appreciate you taking the time to document your fix! 🙌

Don’t hesitate to contact us if you need help; we’re happy to help! 


Reply