qzind / tray

Browser plugin for sending documents and raw commands to a printer or attached device.
https://qz.io
Other
824 stars 266 forks source link

javax.print.PrintException: PrintService is no longer available. #1188

Closed tresf closed 8 months ago

tresf commented 9 months ago

Some PCs throw the following error when printing. This may be caused by PrintService caching, which was added in #486 as part of some printer crawling/caching/performance improvements.

Steps to reproduce (unconfirmed)

...

The message error is :

2023-10-04T11:34:42,722 [ERROR] Failed to print
javax.print.PrintException: PrintService is no longer available.
                at sun.print.Win32PrintJob.print(Unknown Source) ~[?:?]
                at qz.printer.action.PrintRaw.waitForPrint(PrintRaw.java:437) ~[qz-tray.jar:?]
                at qz.printer.action.PrintRaw.printToPrinter(PrintRaw.java:394) ~[qz-tray.jar:?]
                at qz.printer.action.PrintRaw.print(PrintRaw.java:339) ~[qz-tray.jar:?]
                at qz.utils.PrintingUtilities.processPrintRequest(PrintingUtilities.java:200) ~[qz-tray.jar:?]
                at qz.ws.PrintSocketClient.processMessage(PrintSocketClient.java:299) ~[qz-tray.jar:?]
                at qz.ws.PrintSocketClient.onMessage(PrintSocketClient.java:165) ~[qz-tray.jar:?]
                at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
                at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
                at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
                at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) ~[qz-tray.jar:?]
                at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68) ~[qz-tray.jar:?]
                at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.lambda$onTextFrame$1(JettyAnnotatedEventDriver.java:270) ~[qz-tray.jar:?]
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[qz-tray.jar:?]
                at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[qz-tray.jar:?]
                at java.lang.Thread.run(Unknown Source) ~[?:?]
Vzor- commented 9 months ago

I tested this on Windows 10 with a BOCA Lemur via USB. I did the following procedure:

The logs are here https://gist.github.com/Vzor-/6e8da80a1d1ae9a57f552c68d1d22632 I was unable to reproduce the issue.

tresf commented 8 months ago

I was unable to reproduce the issue.

Me neither. I'm not sure what causes this, but we'll need steps to reproduce to fix it. Closing for now, if it occurs again, please request that it's reopened, preferably with steps to reproduce.

tresf commented 2 months ago

Duplicate of #1259