io.opencensus.trace + proguard causing a crash
See original GitHub issue- Android Studio version: 3.6.1
- Firebase Component: Firestore (Database, Firestore, Storage, Functions, etc)
- Component version: 21.4.3
[REQUIRED] Step 3: Describe the problem
java.lang.RuntimeException: Internal error in Cloud Firestore (21.4.3)
happens
Steps to reproduce:
shrinkResources true
minifyEnabled true
proguardFiles 'proguard-rules.pro'
and attempt to read a collection.
Error goes away if I put -keep class io.opencensus.trace.** {*;}
in proguard-rules.pro.
Relevant Code:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.havedone.android.debug, PID: 18702
java.lang.RuntimeException: Internal error in Cloud Firestore (21.4.3).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(com.google.firebase:firebase-firestore@@21.4.3:534)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ExceptionInInitializerError
at io.opencensus.trace.unsafe.ContextUtils.getValue(ContextUtils.java:74)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:386)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:691)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:814)
at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
at io.grpc.android.AndroidChannelBuilder$AndroidChannel.newCall(AndroidChannelBuilder.java:288)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$createClientCall$0(com.google.firebase:firebase-firestore@@21.4.3:138)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.then(Unknown Source:4)
at com.google.android.gms.tasks.zzf.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.4.3:229)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: io.opencensus.trace.Span$Options.values []
at java.lang.Enum.enumValues(Enum.java:270)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at io.opencensus.trace.Span.<clinit>(Span.java:63)
at io.opencensus.trace.unsafe.ContextUtils.getValue(ContextUtils.java:74)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:386)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:691)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:814)
at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
at io.grpc.android.AndroidChannelBuilder$AndroidChannel.newCall(AndroidChannelBuilder.java:288)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$createClientCall$0(com.google.firebase:firebase-firestore@@21.4.3:138)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.then(Unknown Source:4)
at com.google.android.gms.tasks.zzf.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.4.3:229)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.NoSuchMethodException: io.opencensus.trace.Span$Options.values []
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getDeclaredMethod(Class.java:2050)
at java.lang.Enum.enumValues(Enum.java:267)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at io.opencensus.trace.Span.<clinit>(Span.java:63)
at io.opencensus.trace.unsafe.ContextUtils.getValue(ContextUtils.java:74)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:386)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:691)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:814)
at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
at io.grpc.android.AndroidChannelBuilder$AndroidChannel.newCall(AndroidChannelBuilder.java:288)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$createClientCall$0(com.google.firebase:firebase-firestore@@21.4.3:138)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.then(Unknown Source:4)
at com.google.android.gms.tasks.zzf.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.4.3:229)
at java.lang.Thread.run(Thread.java:919)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Xamarin Android app crashes when it was compiled with r8 ...
Compilation successes with some warnings, but my app crashes after I compile my app with R8 in release mode. Same as proguard.
Read more >Deobfuscate or symbolicate crash stack traces - Google Help
You can review deobfuscated stack traces for individual crashes and ANRs on your app's Crashes & ANRs page. Open Play Console. Select an...
Read more >ProGuard Manual: Troubleshooting - Guardsquare
If not, please report the problem, preferably with the simplest example that causes ProGuard to crash. Unexpected observations after processing¶. If ProGuard ......
Read more >Internal error in Cloud Firestore (24.0.1). 오류 해결방법 ...
ZygoteInit.main(ZygoteInit.java:964) Caused by: b.b.a.b.i.g: java.lang. ... io.opencensus.trace + proguard causing a crash · Issue #1562 ...
Read more >Troubleshooting ProGuard issues on Android - Medium
There are many reasons why you might want to enable ProGuard when ... you go to the ANRs & crashes page, the reported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@androks @tomislavhofman It seems that the underlying issue is that
java.lang.EnumSet
is being removed by proguard. Does making sure that enum fields are not being removed (stackoverflow post) resolve the issue for you?Given that there seems to be no updates, I believe this old issue has been addressed and fixed. Please open a new ticket if you ever encounter the same issue again. Thanks!