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

RevenueCatUI.PaywallError 0 will not trigger a listenable error

Open leonardorib opened this issue 7 months ago • 5 comments

Describe the bug RevenueCatUI.PaywallError 0 won't trigger an error. There is no way to distinguish between this error and a successful paywall open. Not sure if it is intentional.

So for instance if you do:

import RevenueCatUI from 'react-native-purchases-ui';

 <RevenueCatUI.Paywall
      onDismiss={() => {
       //
      }}
      onPurchaseError={(error) => {
       //
      }}
      onRestoreError={(error) => {
      //
      }}
      options={{
        displayCloseButton: true,
        offering: {
          identifier: 'example',
          serverDescription: '',
          metadata: {},
          availablePackages: [],
          lifetime: null,
          annual: null,
          sixMonth: null,
          threeMonth: null,
          twoMonth: null,
          monthly: null,
          weekly: null,
        },
      }}
    />

The error handlers won't catch and it seems there is no way to capture that and handle. It is treated as a successful paywall open.

Maybe even simply fallbacking to the default offering would be better for this particular error at least?

  1. Environment
    1. Platform: iOS
    2. SDK version: 8.9.6
    3. OS version: 18.3
    4. Xcode/Android Studio version: XCode 16.3
    5. React Native version: 0.77.2
    6. SDK installation (CocoaPods + version or manual):
    7. How widespread is the issue. Percentage of devices affected: All

leonardorib avatar May 01 '25 19:05 leonardorib

👀 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 May 01 '25 19:05 RCGitBot

Maybe a way to set either an overall default fallback offering when initializing RevCat (or let it fall back to the default offering set in the RevCat dashboard), or a way to at least be able to listen to this error happening, so we can react to it would be nice. 🙇

bobinrinder avatar May 02 '25 18:05 bobinrinder

Hey @leonardorib ,

Thanks for reporting this! I have forwarded this to our team internally and will make sure to update you on any progress.

GuilhermeMota93 avatar May 05 '25 18:05 GuilhermeMota93

Hi @GuilhermeMota93, I just wanted to follow up on this. Is there any progress or ETA that you could share? Thank you so much! :pray:

leonardorib avatar Sep 25 '25 21:09 leonardorib

Hey @leonardorib!

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 due to an issue in our system that deprioritized it.

I have nudged this internally too - in the meantime, would it be possible to check the latest SDKs versions? The team has made several updates recently that ought to help in Paywalls callbacks. Would this be something you could try and let us know?

Alternatively, and as a sanity check, are you able to do getOfferings() before loading the Paywall and potentially adding some protection around that? We understand this is not ideal, but it would give you the information of the offering ID being available earlier and allow to react to it.

Since a Paywall can be started like so:

PaywallView(offering: offering) 

you could try loading it earlier and then passing to the Paywall? In case that helps in the meantime?

GuilhermeMota93 avatar Sep 29 '25 10:09 GuilhermeMota93