Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlutterSimCountryCode.simCountryCode : "Reply already submitted" on Android #1

Closed
silversquall opened this issue May 3, 2019 · 3 comments

Comments

@silversquall
Copy link

silversquall commented May 3, 2019

Hello,

I'm using your FlutterSimCountryCode.simCountryCode API and despite the country code is well returned i'm getting the following (as if the call to android system was done twice).
Only tested with Android, will test later today with IOS

Env:
[√] Flutter (Channel dev, v1.5.3, on Microsoft Windows [Version 6.1.7601], locale fr-FR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)

StackTrace :
E/MethodChannel#flutter_sim_country_code(24109): Failed to handle method call
E/MethodChannel#flutter_sim_country_code(24109): java.lang.IllegalStateException: Reply already submitted
E/MethodChannel#flutter_sim_country_code(24109): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:124)
E/MethodChannel#flutter_sim_country_code(24109): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:209)
E/MethodChannel#flutter_sim_country_code(24109): at com.example.flutter_sim_country_code.FlutterSimCountryCodePlugin.getSimCountryCode(FlutterSimCountryCodePlugin.java:46)
E/MethodChannel#flutter_sim_country_code(24109): at com.example.flutter_sim_country_code.FlutterSimCountryCodePlugin.onMethodCall(FlutterSimCountryCodePlugin.java:32)
E/MethodChannel#flutter_sim_country_code(24109): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
E/MethodChannel#flutter_sim_country_code(24109): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/MethodChannel#flutter_sim_country_code(24109): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
E/MethodChannel#flutter_sim_country_code(24109): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_sim_country_code(24109): at android.os.MessageQueue.next(MessageQueue.java:325)
E/MethodChannel#flutter_sim_country_code(24109): at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#flutter_sim_country_code(24109): at android.app.ActivityThread.main(ActivityThread.java:6938)
E/MethodChannel#flutter_sim_country_code(24109): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_sim_country_code(24109): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
E/MethodChannel#flutter_sim_country_code(24109): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
E/DartMessenger(24109): Uncaught exception in binary message listener
E/DartMessenger(24109): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(24109): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:124)
E/DartMessenger(24109): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:219)
E/DartMessenger(24109): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/DartMessenger(24109): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
E/DartMessenger(24109): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger(24109): at android.os.MessageQueue.next(MessageQueue.java:325)
E/DartMessenger(24109): at android.os.Looper.loop(Looper.java:142)
E/DartMessenger(24109): at android.app.ActivityThread.main(ActivityThread.java:6938)
E/DartMessenger(24109): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(24109): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
E/DartMessenger(24109): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

////
PS : the README is misleading
"Use getSimCountryCode() to get the country code"
--> should be FlutterSimCountryCode.simCountryCode instead.

thx !

@silversquall silversquall changed the title FlutterSimCountryCode.simCountryCode FlutterSimCountryCode.simCountryCode : "Reply already submitted" on Android May 3, 2019
@silversquall
Copy link
Author

Checking the 0.0.2 change logs: "Fixed Reply already submitted errors on Android."
But i'm still getting the same error with this version.

@derTuca
Copy link
Owner

derTuca commented Mar 29, 2021

Tried to fix this again in 0.1.0. Please reopen if the issue stil occurs.

@derTuca derTuca closed this as completed Mar 29, 2021
@bscottsmith
Copy link

Yup. Still happens on 0.1.0 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants