Skip to main content
Solved

Purchases.getProducts() not returning on Android


Forum|alt.badge.img+1

On latest Expo and react-native-purchases, as far as I can tell everything’s still active and I had a purchase back in February so this used to work. Works fine on iOS

const productIds = Object.values(Constants.expoConfig.extra.products[Platform.OS]);

console.log('productIds', productIds); // Array of products output correctly

// No console.log() or console.error() gets fired
try {
  const products = await Purchases.getProducts(productIds);
  console.log('products', products); // Never outputs
  setProducts(products);
} catch (error) {
  console.error('Failed to get products', error);
  Sentry.captureException(error);
}

 

Best answer by ian-ccb416

For anyone else, still no update on what’s going on with getProducts(), but getOfferings() does work. Seems like getProducts() is just buggy

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 187 replies
  • May 2, 2024

Hey @ian-ccb416 ,

 

Thanks for reporting it!


It looks like there's an active GitHub issue where we're working through this issue - it's best to keep information in one spot, so let's continue working through the issue there.


Forum|alt.badge.img+1
  • Author
  • Helper
  • 1 reply
  • Answer
  • May 4, 2024

For anyone else, still no update on what’s going on with getProducts(), but getOfferings() does work. Seems like getProducts() is just buggy


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings