native_admob_flutter icon indicating copy to clipboard operation
native_admob_flutter copied to clipboard

Fatal exception: Reply already submitted

Open jangruenwaldt opened this issue 3 years ago • 6 comments

Hey guys, Samsung Galaxy J5 user on Android 9 show me the following crash in crashlytics when using this plugin. If you Google the issue, your find this issue, which says:

If you are a plugin author and are seeing (or getting reports of) this message, you should audit your code to make sure you are never calling a Result response method more than once. If you find that your logic is correct, and have multiple in-flight method channel requests at the same time, that would be where this issue would be relevant.

Fatal Exception: java.lang.IllegalStateException: Reply already submitted
       at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:155)
       at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:238)
       at com.bruno.native_admob_flutter.NativeAdmobFlutterPlugin$onMethodCall$1.onInitializationComplete(NativeAdmobFlutterPlugin.java:49)
       at com.google.android.gms.internal.ads.zzzs.zza(zzzs.java:172)
       at com.google.android.gms.internal.ads.zzzu.run(zzzu.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.google.android.gms.internal.ads.zzdxi.zzb(zzdxi.java:7)
       at com.google.android.gms.internal.ads.zzdxi.dispatchMessage(zzdxi.java:5)
       at android.os.Looper.loop(Looper.java:216)
       at android.app.ActivityThread.main(ActivityThread.java:7266)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Thanks for your help!

jangruenwaldt avatar Jul 26 '21 07:07 jangruenwaldt

I have never seen this issue. I made sure that result is not called more than once in every function

Can you reproduce it locally?

bdlukaa avatar Jul 26 '21 13:07 bdlukaa

It seems to be happening a lot lately with several plugins.

bdlukaa avatar Jul 27 '21 01:07 bdlukaa

I have never seen this issue. I made sure that result is not called more than once in every function

Can you reproduce it locally?

Very weird. I haven't tried to reproduce it yet, but never saw it before either. I don't really think it's flutter, so the only possibility is result getting called twice?

jangruenwaldt avatar Jul 27 '21 16:07 jangruenwaldt

I have this issue on:

  • Redmi Note 4 (Android 7.0)
  • Xperia Z3 (Android 6.0.1)
  • HUAWEI P9 lite mini (Android 7.0)
  • Galaxy A5(2016) (Android 7.0)
  • Galaxy S5 (Android 6.0.1)
  • .... image Fatal Exception: java.lang.IllegalStateException: Reply already submitted at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java) at com.bruno.native_admob_flutter.NativeAdmobFlutterPlugin$onMethodCall$1.onInitializationComplete(NativeAdmobFlutterPlugin.java) I only use interstitial ads in my app.

uzumaki258 avatar Aug 08 '21 03:08 uzumaki258

I can't reproduce it locally.

It seems, from the logs, that it's caused when initializing:

https://github.com/bdlukaa/native_admob_flutter/blob/master/android/src/main/kotlin/com/bruno/native_admob_flutter/NativeAdmobFlutterPlugin.kt#L49

bdlukaa avatar Aug 19 '21 14:08 bdlukaa

Maybe It happened due to the ad. I use the device as a Firebase report but still can not reproduce it. Strange

uzumaki258 avatar Sep 22 '21 06:09 uzumaki258