Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Android crash on app start at CommonComponentRegistrar.getComponents #862

Open
fanwgwg opened this issue Aug 17, 2024 · 0 comments
Assignees

Comments

@fanwgwg
Copy link

fanwgwg commented Aug 17, 2024

Describe the bug
On Firebase crashlytics, we're seeing some crashes upon app start for "Google Cros" device only (I think it's a ChromeOS device).

To Reproduce
Here's the detailed stacktrace:

  Fatal Exception: java.lang.ExceptionInInitializerError:
       at com.google.android.gms.internal.mlkit_common.zzaq.zzg(com.google.mlkit:common@@18.10.0:2)
       at com.google.android.gms.internal.mlkit_common.zzaq.zzi(com.google.mlkit:common@@18.10.0:2)
       at com.google.mlkit.common.internal.CommonComponentRegistrar.getComponents(com.google.mlkit:common@@18.10.0:1)
       at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:118)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:100)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:46)
       at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:407)
       at com.google.mlkit.common.sdkinternal.MlKitContext.zza(MlKitContext.java:10)
       at com.google.mlkit.common.internal.MlKitInitProvider.onCreate(com.google.mlkit:common@@18.10.0:3)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
       at com.google.mlkit.common.internal.MlKitInitProvider.attachInfo(com.google.mlkit:common@@18.10.0:3)
       at android.app.ActivityThread.installProvider(ActivityThread.java:7268)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:6809)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6726)
       at android.app.ActivityThread.access$1400(ActivityThread.java:237)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1924)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7741)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:966)
        
   Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.AbstractCollection.size()' on a null object reference
       at com.google.android.gms.internal.mlkit_common.zzao.<init>(com.google.mlkit:common@@18.10.0)
       at com.google.android.gms.internal.mlkit_common.zzaq.<clinit>(com.google.mlkit:common@@18.10.0:1)
       at com.google.android.gms.internal.mlkit_common.zzaq.zzg(com.google.mlkit:common@@18.10.0:2)
       at com.google.android.gms.internal.mlkit_common.zzaq.zzi(com.google.mlkit:common@@18.10.0:2)
       at com.google.mlkit.common.internal.CommonComponentRegistrar.getComponents(com.google.mlkit:common@@18.10.0:1)
       at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:118)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:100)
       at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:46)
       at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:407)
       at com.google.mlkit.common.sdkinternal.MlKitContext.zza(MlKitContext.java:10)
       at com.google.mlkit.common.internal.MlKitInitProvider.onCreate(com.google.mlkit:common@@18.10.0:3)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
       at com.google.mlkit.common.internal.MlKitInitProvider.attachInfo(com.google.mlkit:common@@18.10.0:3)
       at android.app.ActivityThread.installProvider(ActivityThread.java:7268)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:6809)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6726)
       at android.app.ActivityThread.access$1400(ActivityThread.java:237)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1924)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7741)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:966)

image

Expected behavior
There shouldn't be crash upon app open

SDK Info:
implementation 'com.google.mlkit:digital-ink-recognition:18.1.0'
implementation 'com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1'
implementation 'com.google.android.gms:play-services-mlkit-document-scanner:16.0.0-beta1'

Smartphone:
Google Cros
Android 11

@fanwgwg fanwgwg changed the title [Bug report] Crash on app start at CommonComponentRegistrar.getComponents [Bug report] Android crash on app start at CommonComponentRegistrar.getComponents Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants