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

Fix reply already submitted #65

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

kreativityapps
Copy link

This fixes IllegalStateException: Reply already submitted, the crash occurs often on Android.

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=3548984, result=0, data=null} to activity {com.app.this/com.app.this.MainActivity}: java.lang.IllegalStateException: Reply already submitted
       at android.app.ActivityThread.deliverResults(ActivityThread.java:5555)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:5596)
       at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2326)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8570)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Caused by java.lang.IllegalStateException: Reply already submitted
       at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:431)
       at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:272)
       at biz.cunning.cunning_document_scanner.CunningDocumentScannerPlugin.addActivityResultListener$lambda$3(CunningDocumentScannerPlugin.kt:102)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:774)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:422)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:857)
       at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:884)
       at android.app.Activity.dispatchActivityResult(Activity.java:8541)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:5548)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:5596)
       at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2326)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8570)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

@vicajilau
Copy link
Collaborator

Thank you very much for the pull request!

@vicajilau vicajilau merged commit 370af78 into jachzen:master Apr 29, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants