question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of ANRs from `CommonComponentRegistrar.getComponents`

See original GitHub issue

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Bumbelbee 2021.1.1 RC 1
  • Firebase Components and versions:
"com.google.firebase:firebase-analytics-ktx:20.0.2"
"com.google.gms:google-services:4.3.10" (as plugin)
"com.google.firebase:firebase-crashlytics-ktx:18.2.6"
"com.google.firebase:firebase-crashlytics-gradle:2.8.1"
"com.google.firebase:firebase-inappmessaging-display-ktx:20.1.1"
"com.google.firebase:firebase-config-ktx:21.0.1"

"com.google.android.gms:play-services-location:19.0.0"
"com.google.android.gms:play-services-maps:18.0.2"
"com.google.android.gms:play-services-mlkit-barcode-scanning:16.2.0"

[REQUIRED] Step 3: Describe the problem

Getting lots of ANRs like this reported through Firebase Crashlytics:

Example stack trace (they are a bit different sometimes):

main (runnable): tid=1 systid=15779
       at com.google.mlkit.common.internal.CommonComponentRegistrar.getComponents(com.google.mlkit:common@@17.2.0:3)
       at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:109)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:91)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:45)
       at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:360)
       at com.google.mlkit.common.sdkinternal.MlKitContext.zza(MlKitContext.java:9)
       at com.google.mlkit.common.internal.MlKitInitProvider.onCreate(com.google.mlkit:common@@17.2.0:3)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2516)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2486)
       at com.google.mlkit.common.internal.MlKitInitProvider.attachInfo(com.google.mlkit:common@@17.2.0:3)
       at android.app.ActivityThread.installProvider(ActivityThread.java:8198)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:7704)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7458)
       at android.app.ActivityThread.access$1700(ActivityThread.java:310)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2283)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8641)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)

Screenshot from last 90 days:

Screenshot 2022-01-29 at 17 55 12

I opened the ANR at the top with the most events:

Screenshot 2022-01-29 at 17 55 51 Screenshot 2022-01-29 at 17 56 08 Screenshot 2022-01-29 at 17 58 47

Steps to reproduce:

No steps to reproduce as I am unable to do so myself.

Relevant Code:

No lines in stack trace are referencing my code.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Thomas-Voscommented, Feb 1, 2022

Alright, created an issue at https://github.com/googlesamples/mlkit/issues/434. Thanks for the help, @argzdev.

0reactions
argzdevcommented, Jan 31, 2022

Thanks for the extra details, @Thomas-Vos. Upon checking, even though mlkit is using Firebase components, the issue is not due to Firebase products but rather in mlkit itself. You could try creating an issue in https://github.com/googlesamples/mlkit/issues, they will be able to investigate this issue further. With that said, I’ll be closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found