native_admob_flutter
native_admob_flutter copied to clipboard
Fatal exception: Reply already submitted
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!
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?
It seems to be happening a lot lately with several plugins.
I have never seen this issue. I made sure that
result
is not called more than once in every functionCan 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?
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)
- ....
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.
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
Maybe It happened due to the ad. I use the device as a Firebase report but still can not reproduce it. Strange