amoLink / bluetooth_print_plus

A flutter plugin for bluetooth thermal printer support Android & iOS
MIT License
12 stars 4 forks source link

Not working on Android SDK version 34 #5

Closed raudindev closed 5 months ago

raudindev commented 5 months ago

Flutter 3.22.1 Android SDK version 34

I have already check that this does not happen in version 33 of the Android SDK, and other previous version

At the end of the log, the Bluetooth state is off, but it's always ON when I try to scan, in the end it ends up turning off the bluetooth in some way, and generating the error

=============================== ERROR LOGS ===================================== D/BluetoothPrintPlusPlugin( 8057): start scan E/MethodChannel#bluetooth_print_plus/methods( 8057): Failed to handle method call E/MethodChannel#bluetooth_print_plus/methods( 8057): java.lang.IllegalStateException: Reply already submitted E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:431) E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:272) E/MethodChannel#bluetooth_print_plus/methods( 8057): at com.example.bluetooth_print_plus.bluetooth_print_plus.BluetoothPrintPlusPlugin.onMethodCall(BluetoothPrintPlusPlugin.java:220) E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/MethodChannel#bluetooth_print_plus/methods( 8057): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/MethodChannel#bluetooth_print_plus/methods( 8057): at android.os.Handler.handleCallback(Handler.java:958) E/MethodChannel#bluetooth_print_plus/methods( 8057): at android.os.Handler.dispatchMessage(Handler.java:99) E/MethodChannel#bluetooth_print_plus/methods( 8057): at android.os.Looper.loopOnce(Looper.java:205) E/MethodChannel#bluetooth_print_plus/methods( 8057): at android.os.Looper.loop(Looper.java:294) E/MethodChannel#bluetooth_print_plus/methods( 8057): at android.app.ActivityThread.main(ActivityThread.java:8177) E/MethodChannel#bluetooth_print_plus/methods( 8057): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#bluetooth_print_plus/methods( 8057): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/MethodChannel#bluetooth_print_plus/methods( 8057): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) E/DartMessenger( 8057): Uncaught exception in binary message listener E/DartMessenger( 8057): java.lang.IllegalStateException: Reply already submitted E/DartMessenger( 8057): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:431) E/DartMessenger( 8057): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:287) E/DartMessenger( 8057): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/DartMessenger( 8057): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/DartMessenger( 8057): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/DartMessenger( 8057): at android.os.Handler.handleCallback(Handler.java:958) E/DartMessenger( 8057): at android.os.Handler.dispatchMessage(Handler.java:99) E/DartMessenger( 8057): at android.os.Looper.loopOnce(Looper.java:205) E/DartMessenger( 8057): at android.os.Looper.loop(Looper.java:294) E/DartMessenger( 8057): at android.app.ActivityThread.main(ActivityThread.java:8177) E/DartMessenger( 8057): at java.lang.reflect.Method.invoke(Native Method) E/DartMessenger( 8057): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/DartMessenger( 8057): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) [log] *** cur device status: 10

amoLink commented 5 months ago

Fixed, please update to version 2.0.0