You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen the following exception from a few clients now:
Fatal Exception: java.lang.IllegalStateException: Reply already submitted
at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply + 35(DartMessenger.java:35)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error + 14(MethodChannel.java:14)
at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$3.onComplete + 29(CloudFirestorePlugin.java:29)
at com.google.android.gms.tasks.zzj.run + 23(zzj.java:23)
at android.os.Handler.handleCallback + 883(Handler.java:883)
at android.os.Handler.dispatchMessage + 100(Handler.java:100)
at android.os.Looper.loop + 214(Looper.java:214)
at android.app.ActivityThread.main + 7356(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 492(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main + 930(ZygoteInit.java:930)
I was not quite sure what this was until I recently worked on resolving a similar crash.
Having said that, I am pretty sure the crash comes from here:
That is a big strange because "Reply already submitted" sounds like a result was already sent, but it looks like it is quite possible that the following line could be called before that and the onComplete listener would still be called:
I will just try to sketch a fix for this because crashes are very bad UX, however, I cannot test my implementation because I cannot reproduce this issue when debugging (I only see it in Crashlytics).
Activity