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

Printer not connecting in new flutter version #3

Open
HemangSidapara opened this issue Oct 15, 2024 · 1 comment
Open

Printer not connecting in new flutter version #3

HemangSidapara opened this issue Oct 15, 2024 · 1 comment

Comments

@HemangSidapara
Copy link

@andresperezmelo

W/System.err(15444): java.io.IOException: read failed, socket might closed or timeout, read ret: -1
W/System.err(15444): 	at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:952)
W/System.err(15444): 	at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:905)
W/System.err(15444): 	at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:527)
W/System.err(15444): 	at com.example.niimbot_label_printer.NiimbotLabelPrinterPlugin$onMethodCall$2.invokeSuspend(NiimbotLabelPrinterPlugin.kt:131)
W/System.err(15444): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err(15444): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
W/System.err(15444): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
W/System.err(15444): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
W/System.err(15444): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
W/System.err(15444): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
W/System.err(15444): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
W/System.err(15444): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Flutter version: v3.24.3
gradle-wrapper: 8.5-bin

@andresperezmelo
Copy link
Owner

This java.io.IOException: read failed, socket might closed or timeout error occurs when the Bluetooth connection is unexpectedly closed or the read timeout is exceeded, possibly due to a desynchronization or lack of response from the remote device. Checking permissions (especially since Android 12), ensuring compatibility between devices and updating dependencies may help.

Have you tried connecting to another device to rule out if it is a specific problem?

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

2 participants