Skip to main content
Question

Android Crash in Flutter: "No Singleton Instance" with RevenueCat Remote Paywall

  • October 21, 2024
  • 2 replies
  • 94 views

Forum|alt.badge.img+5

I'm facing a crash on Android while using RevenueCat's Remote Paywall in my Flutter app. The error I’m getting is:

com.revenuecat.purchases.Purchases$Companion.getSharedInstance kl.h0 - No singleton instance. Make sure you configure Purchases before getting the default instance.

This doesn't happen on iOS, only on Android. I’ve followed the docs to initialize Purchases, but the issue persists and it’s causing a lot of crashes.

Anyone else experienced this or know how to fix it?

Thanks!

 
This post has been closed for comments

2 replies

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 277 replies
  • October 23, 2024

Hi @collins, thanks for reporting this. Is it possible your paywall is being shown in another flow that doesn’t follow the call to Purchases.configure? Where in your code are you calling configure? Typically, you should configure the RevenueCat SDK as early as possible, often in the main.dart file. If you can review this and, if desired, share a code snippet, that would be great.


jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 277 replies
  • October 23, 2024

@collins Also, can you please upgrade to the latest version (8.1.6) of purchases-flutter? An edge case issue was fixed that might be causing the error you’re seeing.


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