amoLink / bluetooth_print_plus

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

After executing cpcl to print an image, the application crashes #16

Closed maxfrees closed 2 months ago

maxfrees commented 2 months ago

E/AndroidRuntime(13424):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(13424):    at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime(13424):    at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime(13424):    at android.app.ActivityThread.main(ActivityThread.java:8261)
E/AndroidRuntime(13424):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13424):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
E/AndroidRuntime(13424):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
W/com.semi.mobile(13424): type=1400 audit(0.0:1769270): avc: denied { search } for name="miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
W/com.semi.mobile(13424): type=1400 audit(0.0:1769271): avc: denied { sea

W/com.semi.mobile(13424): type=1400 audit(0.0:1769274): avc: denied { search } for name="miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
W/OOMEventManagerFK(13424): Failed to mkdir /data/miuilog/stability/memleak/heapdump/
W/com.semi.mobile(13424): type=1400 audit(0.0:1769275): avc: denied { search } for name="miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
W/com.semi.mobile(13424): type=1400 audit(0.0:1769276): avc: denied { getattr } for path="/data/miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
W/com.semi.mobile(13424): type=1400 audit(0.0:1769277): avc: denied { search } for name="miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
I/Process (13424): Process is going to kill itself!
I/Process (13424): java.lang.Exception
I/Process (13424):  at android.os.Process.killProcess(Process.java:1344)
I/Process (13424):  at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:181)

W/com.semi.mobile(13424): type=1400 audit(0.0:1769277): avc: denied { search } for name="miuilog" dev="dm-40" ino=384 scontext=u:r:untrusted_app:s0:c188,c257,c512,c768 tcontext=u:object_r:data_log_file:s0 tclass=dir permissive=0 app=com.android.vending
I/Process (13424): Process is going to kill itself!
I/Process (13424): java.lang.Exception
I/Process (13424):  at android.os.Process.killProcess(Process.java:1344)
I/Process (13424):  at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:181)
I/Process (13424):  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1073)
I/Process (13424):  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
I/Process (13424):  at java.lang.Thread.dispatchUncaughtException(Thread.java:2306)
I/Process (13424): Sending signal. PID: 13424 SIG: 9
Lost connection to device.
amoLink commented 2 months ago

Switch to other commands and check. Your printer may not support the cpcl command

amoLink commented 2 months ago

Fixed, update to bluetooth_print_plus: ^2.2.0