flutter-package / flutter_scan

scanner qrcode in widget tree & decoder qrcode from image
MIT License
79 stars 66 forks source link

"java.lang.IllegalStateException: Reply already submitted" when calling "Scan.parse(imagePath)" #65

Open strombringer opened 11 months ago

strombringer commented 11 months ago

These links don't work any more:

Environment

Technology Version
Flutter version 3.10.6
Plugin version 1.6.0
Android version 14
iOS version -
Xcode version -

Device information: Pixel 6 Pro

Description

Expected behavior: Calling final result = await Scan.parse(imagePath); works.

Current behavior:

When calling this method, the code crashes with an exception, which kills the app.

Steps to reproduce

Call the following code (with multiple images):

final result = await Scan.parse(imagePath);

Stacktrace/Logcat

I/ScankitDecode( 6535): ScanCode null
I/ScankitDecode( 6535): scankit mode:FULLSDK1
I/ScankitDecode( 6535): ScanCode null
D/AndroidRuntime( 6535): Shutting down VM
E/AndroidRuntime( 6535): FATAL EXCEPTION: main
E/AndroidRuntime( 6535): Process: com.bmw.connected.mobile20.row.dev, PID: 6535
E/AndroidRuntime( 6535): java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime( 6535):    at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:435)
E/AndroidRuntime( 6535):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:263)
E/AndroidRuntime( 6535):    at com.chavesgu.scan.ScanPlugin$QrCodeAsyncTask.onPostExecute(ScanPlugin.java:129)
E/AndroidRuntime( 6535):    at com.chavesgu.scan.ScanPlugin$QrCodeAsyncTask.onPostExecute(ScanPlugin.java:109)
E/AndroidRuntime( 6535):    at android.os.AsyncTask.finish(AsyncTask.java:771)
E/AndroidRuntime( 6535):    at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0)
E/AndroidRuntime( 6535):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
E/AndroidRuntime( 6535):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 6535):    at android.os.Looper.loopOnce(Looper.java:205)
E/AndroidRuntime( 6535):    at android.os.Looper.loop(Looper.java:294)