After pressing login button Kakao auth screen shows up, pressing back or disagree button returns user to initial screen
After pressing login again and proceeding to Kakao screen again, when pressing back or disagree button for the second time, app crashes.
Log:
D/FlutterKakaoLogin(31494): onMethodCall logIn D/FlutterKakaoLogin(31494): onActivityResult D/FlutterKakaoLogin(31494): Pressed back button or disagree button during requesting auth code. I/zygote64(31494): Do partial code cache collection, code=23KB, data=29KB I/zygote64(31494): After code cache collection, code=23KB, data=29KB I/zygote64(31494): Increasing code cache capacity to 128KB D/FlutterKakaoLogin(31494): onMethodCall logIn D/FlutterKakaoLogin(31494): onActivityResult D/FlutterKakaoLogin(31494): Pressed back button or disagree button during requesting auth code. D/AndroidRuntime(31494): Shutting down VM E/AndroidRuntime(31494): FATAL EXCEPTION: main E/AndroidRuntime(31494): Process: com.josephnk.flutter_kakao_login_example, PID: 31494 **E/AndroidRuntime(31494): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=0, data=null} to activity {com.josephnk.flutter_kakao_login_example/com.josephnk.flutter_kakao_login_example.MainActivity}: java.lang.IllegalStateException: Reply already submitted** E/AndroidRuntime(31494): at android.app.ActivityThread.deliverResults(ActivityThread.java:4268) E/AndroidRuntime(31494): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4312) E/AndroidRuntime(31494): at android.app.ActivityThread.-wrap19(Unknown Source:0) E/AndroidRuntime(31494): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644) E/AndroidRuntime(31494): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(31494): at android.os.Looper.loop(Looper.java:164) E/AndroidRuntime(31494): at android.app.ActivityThread.main(ActivityThread.java:6494) E/AndroidRuntime(31494): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(31494): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) E/AndroidRuntime(31494): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) E/AndroidRuntime(31494): Caused by: java.lang.IllegalStateException: Reply already submitted E/AndroidRuntime(31494): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139) E/AndroidRuntime(31494): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:236) E/AndroidRuntime(31494): at com.josephnk.flutter_kakao_login.FlutterKakaoLoginPlugin$KakaoSessionCallback.onSessionOpenFailed(FlutterKakaoLoginPlugin.kt:211) E/AndroidRuntime(31494): at com.kakao.auth.Session.internalClose(Session.java:693) E/AndroidRuntime(31494): at com.kakao.auth.Session.onAuthCodeFailure(Session.java:727) E/AndroidRuntime(31494): at com.kakao.auth.Session.access$900(Session.java:55) E/AndroidRuntime(31494): at com.kakao.auth.Session$4.onAuthCodeFailure(Session.java:637) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.KakaoAuthCodeManager.onAuthCodeReceived(KakaoAuthCodeManager.java:281) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.TalkAuthCodeService.handleActivityResult(TalkAuthCodeService.java:56) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.KakaoAuthCodeManager.handleActivityResult(KakaoAuthCodeManager.java:164) E/AndroidRuntime(31494): at com.kakao.auth.Session.handleActivityResult(Session.java:578) E/AndroidRuntime(31494): at com.josephnk.flutter_kakao_login.FlutterKakaoLoginPlugin.onActivityResult(FlutterKakaoLoginPlugin.kt:140) E/AndroidRuntime(31494): at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:691) E/AndroidRuntime(31494): at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:378) E/AndroidRuntime(31494): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:597) E/AndroidRuntime(31494): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:582) E/AndroidRuntime(31494): at android.app.Activity.dispatchActivityResult(Activity.java:7276) E/AndroidRuntime(31494): at android.app.ActivityThread.deliverResults(ActivityThread.java:4264) E/AndroidRuntime(31494): ... 9 more
flutter doctor:
`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.2)
[✓] Connected device (3 available)
• No issues found!`
Started having this issue after updating to flutter_kakao_login: ^1.0.0
iOS works as expected.
Seems like key here is
E/AndroidRuntime(31494): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=0, data=null} to activity {com.josephnk.flutter_kakao_login_example/com.josephnk.flutter_kakao_login_example.MainActivity}: java.lang.IllegalStateException: Reply already submitted
Steps to reproduce:
Log:
D/FlutterKakaoLogin(31494): onMethodCall logIn D/FlutterKakaoLogin(31494): onActivityResult D/FlutterKakaoLogin(31494): Pressed back button or disagree button during requesting auth code. I/zygote64(31494): Do partial code cache collection, code=23KB, data=29KB I/zygote64(31494): After code cache collection, code=23KB, data=29KB I/zygote64(31494): Increasing code cache capacity to 128KB D/FlutterKakaoLogin(31494): onMethodCall logIn D/FlutterKakaoLogin(31494): onActivityResult D/FlutterKakaoLogin(31494): Pressed back button or disagree button during requesting auth code. D/AndroidRuntime(31494): Shutting down VM E/AndroidRuntime(31494): FATAL EXCEPTION: main E/AndroidRuntime(31494): Process: com.josephnk.flutter_kakao_login_example, PID: 31494 **E/AndroidRuntime(31494): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=0, data=null} to activity {com.josephnk.flutter_kakao_login_example/com.josephnk.flutter_kakao_login_example.MainActivity}: java.lang.IllegalStateException: Reply already submitted** E/AndroidRuntime(31494): at android.app.ActivityThread.deliverResults(ActivityThread.java:4268) E/AndroidRuntime(31494): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4312) E/AndroidRuntime(31494): at android.app.ActivityThread.-wrap19(Unknown Source:0) E/AndroidRuntime(31494): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644) E/AndroidRuntime(31494): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(31494): at android.os.Looper.loop(Looper.java:164) E/AndroidRuntime(31494): at android.app.ActivityThread.main(ActivityThread.java:6494) E/AndroidRuntime(31494): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(31494): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) E/AndroidRuntime(31494): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) E/AndroidRuntime(31494): Caused by: java.lang.IllegalStateException: Reply already submitted E/AndroidRuntime(31494): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139) E/AndroidRuntime(31494): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:236) E/AndroidRuntime(31494): at com.josephnk.flutter_kakao_login.FlutterKakaoLoginPlugin$KakaoSessionCallback.onSessionOpenFailed(FlutterKakaoLoginPlugin.kt:211) E/AndroidRuntime(31494): at com.kakao.auth.Session.internalClose(Session.java:693) E/AndroidRuntime(31494): at com.kakao.auth.Session.onAuthCodeFailure(Session.java:727) E/AndroidRuntime(31494): at com.kakao.auth.Session.access$900(Session.java:55) E/AndroidRuntime(31494): at com.kakao.auth.Session$4.onAuthCodeFailure(Session.java:637) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.KakaoAuthCodeManager.onAuthCodeReceived(KakaoAuthCodeManager.java:281) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.TalkAuthCodeService.handleActivityResult(TalkAuthCodeService.java:56) E/AndroidRuntime(31494): at com.kakao.auth.authorization.authcode.KakaoAuthCodeManager.handleActivityResult(KakaoAuthCodeManager.java:164) E/AndroidRuntime(31494): at com.kakao.auth.Session.handleActivityResult(Session.java:578) E/AndroidRuntime(31494): at com.josephnk.flutter_kakao_login.FlutterKakaoLoginPlugin.onActivityResult(FlutterKakaoLoginPlugin.kt:140) E/AndroidRuntime(31494): at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:691) E/AndroidRuntime(31494): at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:378) E/AndroidRuntime(31494): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:597) E/AndroidRuntime(31494): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:582) E/AndroidRuntime(31494): at android.app.Activity.dispatchActivityResult(Activity.java:7276) E/AndroidRuntime(31494): at android.app.ActivityThread.deliverResults(ActivityThread.java:4264) E/AndroidRuntime(31494): ... 9 more
flutter doctor:
`Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 11.6) [✓] Android Studio (version 4.0) [✓] VS Code (version 1.47.2) [✓] Connected device (3 available)
• No issues found!`
Started having this issue after updating to
flutter_kakao_login: ^1.0.0
iOS works as expected.
Seems like key here is
E/AndroidRuntime(31494): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=0, data=null} to activity {com.josephnk.flutter_kakao_login_example/com.josephnk.flutter_kakao_login_example.MainActivity}: java.lang.IllegalStateException: Reply already submitted