There is no singleton instance. Make sure you configure Purchases before trying to get the default instance.

  • 30 November 2021
  • 2 replies

Badge +2


I have user crashes related to configuring Purchases.  However, when i have experienced this crash, it is when i am trying to close the app.  I have a single exit point and use:

startActivity(intent);finish();before moving to a new intent.  My exit looks like the following

Any thoughts?


Best answer by cody 10 December 2021, 19:16

View original

2 replies

Userlevel 5
Badge +8

Hey @Dunwiddie!

It looks like you’re trying to access Purchases at some point before it has been configured, or after it’s been destroyed. I’d recommend checking isConfigured before trying to access it:

Badge +2

Hi Cody,

Thanks for the info.  I tried to follow the GitHub link and translate from Kotlin to Java.  I thought i fixed the issue, but have started getting the same crash again.  Here’s the code that i thought fixed it …

I have attached a screenshot of the code that i thought would fix it

if (Purchases.getSharedInstance() != null )


Thanks for your help