Skip to content

ANR from setLogLevel in Application.onCreate #2497

@jscti

Description

@jscti

#1629 reported an issue with the configure method trigerring ANR.
Seems this got fixed with c6b365f

But I still see ANR related this time to logLevel that I call before configure :

io.sentry.android.core.ApplicationNotResponding: Background ANR
at com.revenuecat.purchases.PurchasesOrchestrator.(SourceFile:1)
at com.revenuecat.purchases.Purchases$Companion.setLogLevel(Purchases.kt:922)
at com.jscti.nextgp_f1motogp.Application.onCreate(Application.kt:101)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8334)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(unavailable:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2869)
at android.os.Handler.dispatchMessage(Handler.java:117)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:302)
at android.app.ActivityThread.main(ActivityThread.java:9675)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:601)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1062)

revenuecat version : 8.19.2 (updated to latest since then, but just released .. i'll monitor)

Is there a way to prevent this on my side ? call these methods in a coroutine to isolate from main thread ? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions