react-native-purchases icon indicating copy to clipboard operation
react-native-purchases copied to clipboard

getCurrentOfferingForPlacement not working for the first app use.

Open PierreCapo opened this issue 9 months ago • 2 comments

Describe the bug Faced a "funny" bug. When calling getCurrentOfferingForPlacement it didn't work and returned null on Android although I had everything set up (it worked well on iOS). It turns out, when I debugged, I called one time getOfferings to communicate to my RevenueCat Android app platform. And suddenly it unlocked all my calls to getCurrentOfferingForPlacement. getCurrentOfferingForPlacement started to proprely return values although I didn't change anything. I could then get rid of getOfferings call without any issue

I am not sure if this happens only on Android, I suspect this may also happen with iOS apps.

TLDR: before calling getCurrentOfferingForPlacement it seems you need to be sure that getOfferings has been called one time during the entire lifecycle of your RevenueCat app.

  1. Environment
    1. Platform: Android
    2. SDK version: 8.6.1
    3. OS version: Android 14
    4. Xcode/Android Studio version: Android Studio Ladybug Feature Drop | 2024.2.2
    5. React Native version: 0.76.7
    6. SDK installation (CocoaPods + version or manual): COCOAPODS: 1.16.2
    7. How widespread is the issue. Percentage of devices affected.

PierreCapo avatar Feb 24 '25 17:02 PierreCapo

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Feb 24 '25 17:02 RCGitBot

Hi, thank you for reporting this. The team is looking into this and I will update here with what we find.

HaleyRevcat avatar Mar 07 '25 23:03 HaleyRevcat

Hi @PierreCapo, I'm very sorry about the delay on this reply. We've been auditing our ticketing system and found that your ticket was never resolved. Are you still running into this issue? If so we can resume looking into this.

HaleyRevcat avatar Oct 02 '25 23:10 HaleyRevcat

Hello @HaleyRevcat I haven't checked again, but I am setting up a new project on Android in a few weeks, so I will let you know if I can see the bug occurring again.

PierreCapo avatar Oct 03 '25 08:10 PierreCapo