Skip to content

Purchases UI Crash #736

@cihadturhan

Description

@cihadturhan

Describe the bug
Prior discussion => https://community.revenuecat.com/sdks-51/kmp-there-is-no-singleton-instance-make-sure-you-configure-purchases-before-trying-to-get-the-default-instance-6952?postid=24026#post24026

I see crashes with new purchases UI. This doesn't happen on every device, but it increased crash rate significantly

  1. Environment
    1. Platform: Android
    2. SDK version: 8.4.0
    3. OS + version: 12-13-14
    4. Xcode/Android Studio version:
    5. Unity version: 6000.0.058f1
    6. How widespread is the issue. Percentage of devices affected. Don't know. Maybe 1%-5%
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
       Caused by kotlin.UninitializedPropertyAccessException: There is no singleton instance. Make sure you configure Purchases before trying to get the default instance. More info here: https://errors.rev.cat/configuring-sdk
       at com.revenuecat.purchases.Purchases$Companion.getSharedInstance(Purchases.kt:1055)
       at com.revenuecat.purchases.ui.revenuecatui.helpers.HelperFunctionsKt.shouldDisplayPaywall(HelperFunctions.kt:48)
       at com.revenuecat.purchases.ui.revenuecatui.activity.PaywallActivityLauncher.launchIfNeeded(PaywallActivityLauncher.kt:171)
       at com.revenuecat.purchasesunity.ui.PaywallTrampolineActivity.launchPaywallIfNeeded(PaywallTrampolineActivity.java:63)
       at com.revenuecat.purchasesunity.ui.PaywallTrampolineActivity.onCreate(PaywallTrampolineActivity.java:50)
       at android.app.Activity.performCreate(Activity.java:8104)
       at android.app.Activity.performCreate(Activity.java:8084)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3680)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3867)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:105)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:136)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2279)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7986)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:553)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Additional context

Metadata

Metadata

Assignees

No one assigned

    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