Skip to content

RevenueCatUI.PaywallError 0 will not trigger a listenable errorΒ #1253

@leonardorib

Description

@leonardorib

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions