Re: QZ tray comunity forum

553 views
Skip to first unread message

Tres Finocchiaro

unread,
Jul 13, 2016, 9:40:04 AM7/13/16
to Nuno Bagulho Marques, qz-p...@googlegroups.com

Forwarding to mailing list.

On Jul 13, 2016 5:33 AM, "Nuno Bagulho Marques" <nbag...@nmbm.biz> wrote:
Hi

I used to have QZ Print, but since the security Certificate has expired, i switched to QZ tray

I am having problems since it doesn't work on Firefox and works sometimes on IE11 - i try to post a message to your community forum, but i don't find "POST  a question" button.

I'll leave here my console message. It seems that it tries to print before connect to QZ Tray, but i am sure that i use qz.websocket.connect() before sending data

here is console log and and example that i tried to print in escPOS.

I don't understand why it only prints sometimes

--

Melhores Cumprimentos

Nuno Miguel Bagulho Marques
nbag...@nmbm.biz
** informática - programação - alojamento **
http://webgescom.pt

Kyle La Barge

unread,
Jul 13, 2016, 3:57:54 PM7/13/16
to Tres Finocchiaro, Nuno Bagulho Marques, qz-print
Hi Nuno,

It looks like the attachments were lost in the forward.  I will see if Tres has them so I can take a look.

In the meantime, I would like to point out that there additional steps are needed for both Firefox and IE.
  • Firefox requires an additional certificate installation step in order for HTTPS to work.  Firefox must be installed on the system prior to QZ Tray, and also must be restarted (if it is open) after the install.  These steps are outlined here.
  • If you are on a domain network, Internet Explorer requires a setting change illustrated here.  You will need to go to Internet Options > Security > Local Intranet > and uncheck "Automatically detect intranet settings".
 
Regards,
Kyle

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nuno Bagulho Marques

unread,
Jul 13, 2016, 5:24:03 PM7/13/16
to Kyle La Barge, qz-p...@googlegroups.com
Hi, kyle

Here is the log, after send data on firefox:

[INFO] 2016-07-13 22:20:30,852 @ qz.ws.PrintSocketClient:?
    Connection opened from /0:0:0:0:0:0:0:1:59103 on socket port 8182
[DEBUG] 2016-07-13 22:20:30,897 @ qz.ws.PrintSocketClient:?
    Message: {"certificate":null,"promise":{},"timestamp":1468444830853,"uid":"doz02f"}
[INFO] 2016-07-13 22:20:32,217 @ qz.common.TrayManager:?
    Allowed An anonymous request to connect to QZ
[DEBUG] 2016-07-13 22:20:32,235 @ qz.ws.PrintSocketClient:?
    Message: {"call":"printers.find","promise":{},"params":{"query":"Talao"},"timestamp":1468444832232,"uid":"8vrbx1"}
[INFO] 2016-07-13 22:20:33,312 @ qz.ws.PrintSocketClient:?
    Connection closed: 1001 - null
[INFO] 2016-07-13 22:20:33,332 @ qz.ws.SocketConnection:?
    Closing all communication channels for An anonymous request
[INFO] 2016-07-13 22:20:35,620 @ qz.common.TrayManager:?
    Allowed An anonymous request to access connected printers
[DEBUG] 2016-07-13 22:20:35,632 @ qz.printer.PrintServiceMatcher:?
    Searching for PrintService matching Talao
[DEBUG] 2016-07-13 22:20:35,665 @ qz.printer.PrintServiceMatcher:?
    Found 5 printers
[DEBUG] 2016-07-13 22:20:35,671 @ qz.printer.PrintServiceMatcher:?
    Found match: Talao
[ERROR] 2016-07-13 22:20:35,675 @ qz.ws.PrintSocketClient:?
    Could not send message
org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, outgoing connection not open
    at org.eclipse.jetty.websocket.common.WebSocketSession.getRemote(WebSocketSession.java:251)
    at qz.ws.PrintSocketClient.send(Unknown Source)
    at qz.ws.PrintSocketClient.sendResult(Unknown Source)
    at qz.ws.PrintSocketClient.processMessage(Unknown Source)
    at qz.ws.PrintSocketClient.onMessage(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    at sun.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)
    at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68)
    at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver$2.run(JettyAnnotatedEventDriver.java:210)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)


i think is more usefull

Thank you. Meanwhile, i'll check your recomendations

Kyle La Barge

unread,
Jul 13, 2016, 6:59:56 PM7/13/16
to Nuno Bagulho Marques, qz-print
Hi Nuno,

It looks like your websocket connection is getting closed for some reason.  Can you reproduce your symptoms when using our demo page here

Can you provide us with a code snippet that we can either review or reproduce on our end?

Lastly, I do see "kaspersky-labs.com" in your console logs.  Is it possible that Kaspersky is interrupting the websocket connection?

Regards,
Kyle

Nuno Bagulho Marques

unread,
Jul 14, 2016, 4:37:52 AM7/14/16
to Kyle La Barge, qz-p...@googlegroups.com, Tres Finocchiaro
Hi, Kyle

I did check ypour recommendations, regarding Firefox and IE. And, guess what? It solved the problem :-) In fact, i installed QZ Tray, while Firefox was running, on the first time. Then, i removed QZ Tray and, with Firefox closed, installed QZ Tray again. Now it all works fine.

Internet Explorer works good with "Automatically detect intranet settings" unchecked.

Thank you, very much, for your support

Kyle La Barge

unread,
Jul 14, 2016, 8:33:23 AM7/14/16
to Nuno Bagulho Marques, qz-print, Tres Finocchiaro
Nuno,

Thanks for the status update.  If you run into anymore issues let us know!

Regards,
Kyle

Jerry tomson

unread,
Mar 28, 2025, 8:50:41 AMMar 28
to qz-print

It looks like you're referring to an old issue regarding QZ Tray not working consistently in Firefox and IE11 after switching from QZ Print due to an expired security certificate.

Possible Solutions:
  1. Ensure QZ Tray is Running

    • QZ Tray must be actively running before any print request is sent.

    • Check the system tray for the QZ Tray icon (🔵 or 🟢), or try opening it manually.

  2. Update QZ Tray to the Latest Version

    • Older versions may have compatibility issues with modern browsers.

    • Download the latest version from: https://qz.io/download/

  3. Use HTTPS Instead of HTTP

    • If your site uses HTTP, some browsers may block WebSocket connections.

    • Try using HTTPS and ensure your security certificate is valid.

  4. Manually Accept Security Certificates

  5. Check WebSocket Connection

    • Run this in the browser console:

      js
      CopyEdit
      qz.websocket.connect().then(() => console.log("Connected!")).catch(err => console.error("Connection failed:", err));
    • If it fails, check firewall settings and browser WebSocket support.

  6. Delay Print Command Until Connection is Established

    • Ensure qz.websocket.connect() completes before sending the print job.

    • Example:

      js
      CopyEdit
      qz.websocket.connect().then(() => { return qz.printers.find("Your_Printer_Name"); }).then(printer => { let config = qz.configs.create(printer); let data = ["^XA^FO50,50^A0N50,50^FDHello World^FS^XZ"]; return qz.print(config, data); }).catch(err => console.error("Error:", err));
  7. Try Chrome or Edge

    • Firefox and IE11 have stricter security policies that may interfere with WebSockets.

    • Test in Google Chrome or Microsoft Edge.

If the issue persists, check QZ Tray logs or post a question in the QZ Tray Community Forum (https://qz.io/support/). 🚀

Tres Finocchiaro

unread,
Mar 28, 2025, 10:49:25 AMMar 28
to Jerry tomson, qz-print
Necromancing.  Hmm... Jerry are you a bot?



--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages