RevenueCatUI.PaywallError 0 will not trigger a listenable error
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
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?
- Environment
- Platform: iOS
- SDK version: 8.9.6
- OS version: 18.3
- Xcode/Android Studio version: XCode 16.3
- React Native version: 0.77.2
- SDK installation (CocoaPods + version or manual):
- How widespread is the issue. Percentage of devices affected: All
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
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. 🙇
Hey @leonardorib ,
Thanks for reporting this! I have forwarded this to our team internally and will make sure to update you on any progress.
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:
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?