Skip to main content
Question

Flutter: Error 23 in the latest version

  • 27 August 2024
  • 1 reply
  • 137 views

Forum|alt.badge.img+3

Flutter: When I used  the sdk RevenueCat version 6.23.0 it worked perfectly, I have updated to the latest 8.1.0 and it does not show me the paywall, it shows me error 23, maybe the methods are different, I share how I call it.

in the main.dart I initialize it and check if it is a subscriber.

Future<void> initRevenueCat(BuildContext context) async {
await Purchases.setDebugLogsEnabled(true);
PurchasesConfiguration configuration;
if (Platform.isAndroid) {
configuration = PurchasesConfiguration('goog_xxxxxxxx');
await Purchases.configure(configuration);
}
else if (Platform.isIOS) {
configuration = PurchasesConfiguration('appl_xxxxxxxx);
await Purchases.configure(configuration);
}
bool esPro = false;
try { CustomerInfo customerInfo = await Purchases.getCustomerInfo();
 List<String> entitlementIdentifiers = ["Monthly", "Annual", "Six Months"];
 for (String id in entitlementIdentifiers) { if (customerInfo.entitlements.all[id]?.isActive == true) { esPro = true;
 break;
 } else { esPro = false;
 } } final prefs = await SharedPreferences.getInstance();
 await prefs.setBool('isSubscribed', esPro);
 } on PlatformException catch (e) { String? errmsg = e.message;
 }
}

And to call the paywall I have always used this

 

Future<void> showPayWall(BuildContext context) async {
PaywallResult result = await RevenueCatUI.presentPaywall(displayCloseButton: true);
if (result.name == 'purchased') {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool('isSubscribed', true);
Navigator.pushNamedAndRemoveUntil(context, 'home', (Route<dynamic> route) => false);
}
}

but it returns error23, with the RevenueCat sdk version 6.23 it didn't give me an error.

 

Can you help me?

Thanks.

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 430 replies
  • August 29, 2024

Hi, could you please run debug logs so we can see the underlying error here and can you create a support ticket here and send them there? 


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