Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
694 views
in Technique[技术] by (71.8m points)

android - Uncaught exception in Firebase runloop (3.0.0) related to persistence and queries

I'm struggling with this exception for a while already. A relevant thread on the firebase group is kind of dead https://groups.google.com/forum/#!topic/firebase-talk/iy0762S3KsU, also two related on SO are unanswered: Uncaught exception in Firebase runloop (3.0.0) and Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]

The workaround saying to switch off database persistence works, but it's not unacceptable for apps which require offline capability.

I've prepared a minimal activity example which reproduces the exception in my environment. It all comes down to reading the database with queries. It's enough to launch and terminate ("terminate" from Android Studio, not just quit) the activity 3 times (weird) and on the 3rd launch it will crash with the following spectacular series of exceptions (the more queries queued the more exceptions i think):

07-05 18:47:10.132 20291-20291/com.mypackage D/ChimeraFileApk: Classloading successful. Optimized code found.
07-05 18:47:10.154 20291-20381/com.mypackage E/RunLoop: Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]
                                                           java.lang.AssertionError: hardAssert failed: 
                                                               at com.google.android.gms.internal.zzaiv.zzb(Unknown Source)
                                                               at com.google.android.gms.internal.zzaiv.zzaN(Unknown Source)
                                                               at com.google.android.gms.internal.zzagh.zzb(Unknown Source)
                                                               at com.google.android.gms.internal.zzagh.<init>(Unknown Source)
                                                               at com.google.android.gms.internal.zzaga.<init>(Unknown Source)
                                                               at com.google.android.gms.internal.zzaga.<init>(Unknown Source)
                                                               at com.google.android.gms.internal.zzadp.zza(Unknown Source)
                                                               at com.google.android.gms.internal.zzaeu.zzic(Unknown Source)
                                                               at com.google.android.gms.internal.zzafc.zzRy(Unknown Source)
                                                               at com.google.android.gms.internal.zzafc.zza(Unknown Source)
                                                               at com.google.android.gms.internal.zzafc$1.run(Unknown Source)
                                                               at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                               at java.lang.Thread.run(Thread.java:818)
07-05 18:47:10.154 20291-20291/com.mypackage D/AndroidRuntime: Shutting down VM
07-05 18:47:10.155 20291-20291/com.mypackage E/AndroidRuntime: FATAL EXCEPTION: main
                                                                  Process: com.mypackage, PID: 20291
                                                                  java.lang.RuntimeException: Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]
                                                                      at com.google.android.gms.internal.zzadp$1$1.run(Unknown Source)
                                                                      at android.os.Handler.handleCallback(Handler.java:739)
                                                                      at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                      at android.os.Looper.loop(Looper.java:148)
                                                                      at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                   Caused by: java.lang.AssertionError: hardAssert failed: 
                                                                      at com.google.android.gms.internal.zzaiv.zzb(Unknown Source)
                                                                      at com.google.android.gms.internal.zzaiv.zzaN(Unknown Source)
                                                                      at com.google.android.gms.internal.zzagh.zzb(Unknown Source)
                                                                      at com.google.android.gms.internal.zzagh.<init>(Unknown Source)
                                                                      at com.google.android.gms.internal.zzaga.<init>(Unknown Source)
                                                                      at com.google.android.gms.internal.zzaga.<init>(Unknown Source)
                                                                      at com.google.android.gms.internal.zzadp.zza(Unknown Source)
                                                                      at com.google.android.gms.internal.zzaeu.zzic(Unknown Source)
                                                                      at com.google.android.gms.internal.zzafc.zzRy(Unknown Source)
                                                                      at com.google.android.gms.internal.zzafc.zza(Unknown Source)
                                                                      at com.google.android.gms.internal.zzafc$1.run(Unknown Source)
                                                                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
                                                                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                      at java.lang.Thread.run(Thread.java:818)
07-05 18:47:10.165 20291-20381/com.mypackage E/RunLoop: Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]
                                                           java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.internal.zzafj.zzg(com.google.android.gms.internal.zzaew)' on a null object reference
                                                               at com.google.android.gms.internal.zzafc.zzf(Unknown Source)
                                                               at com.google.firebase.database.Query$3.run(Unknown Source)
                                                               at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                               at java.lang.Thread.run(Thread.java:818)
07-05 18:47:10.166 20291-20381/com.mypackage E/RunLoop: Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]
                                                           java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.internal.zzafj.zzg(com.google.android.gms.internal.zzaew)' on a null object reference
                                                               at com.google.android.gms.internal.zzafc.zzf(Unknown Source)
                                                               at com.google.firebase.database.Query$3.run(Unknown Source)
                                                               at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                               at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                               at java.lang.Thread.run(Thread.java:818)
07-05 18:47:10.173 20291-20381/com.mypackage E/RunLoop: Uncaught exception in Firebase runloop (3.0.0). Please report to [email protected]
                                                           java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.internal.zzafg.zzg(com.google.android.gms.internal.zzafa, com.google.android.gms.internal.zzahu)' on a null object reference
                                                               at com.google.android.gms.internal.zzafc.zzb(Unknown Source)
                                                               at com.google.android.gms.internal.zzafc.zza(Unknown Source)
                                                               at com.google.android.gms.internal.zzafc.zzaO(Unknown Source)
                                                               at com.google.firebase.database.connection.idl.IPersistentConnectionImpl$3.zzaO(Unknown Source)
                                                               at com.google.firebase.database.connection.idl.zzi$zza.onTransact(Unknown Source)
                                

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...