qzind / tray

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

Error on Debian 12 and Kubuntu 22.04 : web socket connection failed. Reproduced in chromium, chrome, opera, firefox, brave. In snap, apt and flatpack versions. #1194

Closed zaqueoae closed 11 months ago

zaqueoae commented 11 months ago

I have installed qz in this way: wget -qO - qz.sh | bash

Next I installed the browser. In the case of this example it is chromium using apt.

An example can be seen in this video: https://www.youtube.com/watch?v=KaAafMxCQmU

The error that appears in the terminal:

[34233:34233:1018/232137.017560:ERROR:policy_logger.cc(154)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(163) Cloud management controller initialization aborted as CBCM is not enabled.
[34233:34262:1018/232144.559206:ERROR:cert_verify_proc_builtin.cc(701)] CertVerifyProcBuiltin for localhost failed:
----- Certificate i=0 (CN=localhost,emailAddress=support@qz.io,OU=QZ Industries\, LLC,O=QZ Industries\, LLC,L=Canastota,ST=NY,C=US) -----
ERROR: No matching issuer found

[34281:34305:1018/232144.559805:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -202
[34233:34262:1018/232145.522533:ERROR:cert_verify_proc_builtin.cc(701)] CertVerifyProcBuiltin for localhost.qz.io failed:
----- Certificate i=0 (CN=localhost,emailAddress=support@qz.io,OU=QZ Industries\, LLC,O=QZ Industries\, LLC,L=Canastota,ST=NY,C=US) -----
ERROR: No matching issuer found

[34281:34305:1018/232145.522858:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -202
[34280:34280:1018/232147.103935:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[34280:34280:1018/232148.303870:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[34280:34280:1018/232150.353400:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
zaqueoae commented 11 months ago

I just checked that the flatpack version of debian is working correctly.

lite1979 commented 11 months ago

@zaqueoae We generally advise installation of the browser before installation of QZ-Tray; the places that QZ-Tray needs to go to install its certificates may not exist otherwise.

You may want to make sure you have certgen installed as well.

zaqueoae commented 11 months ago

It's funny, because after it worked with chromium flatpack, I uninstalled qz, installed a qz with my certificate and it stopped connecting to the websocket. I have uninstalled it, I have reinstalled the official qz that you have on your website, and it doesn't work either, even though it worked before.

zaqueoae commented 11 months ago

@zaqueoae We generally advise installation of the browser before installation of QZ-Tray; the places that QZ-Tray needs to go to install its certificates may not exist otherwise.

You may want to make sure you have certgen installed as well.

I'm going to try the following. I uninstall qz and chromium. I install chromium and then qz. Let's see what happens.

I wouldn't know how to check if I have the certificate installed.

lite1979 commented 11 months ago

I would

  1. make sure certgen is installed
  2. install the browser
  3. install QZ-Tray

installed a qz with my certificate

I'm not sure I understand what you're saying here. QZ-Tray should install just fine with no changes to the installer. You can always add the certificate fingerprint to allowed.dat afterward. Did you compile this installer yourself?

I'm also curious to know if you're using KDE or another GUI

lite1979 commented 11 months ago

The QZ-Tray logs should show the certificate value, or if you're using a GUI, Click the QZ-Tray icon > Advanced > Site Manager > Allowed/Blocked tabs

zaqueoae commented 11 months ago

me gustaría

  1. asegúrese de que certgen esté instalado
  2. instalar el navegador
  3. instalar la bandeja QZ

instalé un qz con mi certificado

No estoy seguro de entender lo que estás diciendo aquí. QZ-Tray debería instalarse bien sin cambios en el instalador. Siempre puedes agregar la huella digital del certificado a permitido.dat después. ¿Compilaste este instalador tú mismo?

También tengo curiosidad por saber si estás usando KDE u otra GUI.

I don't know how to do step 1.

Regarding step 2 and 3, I have repeated it several times with flatpack and apt . But I can't get it to work. It keeps giving an error.

It definitely doesn't work. I have uninstalled and installed several times. But it still doesn't work even in the flatpack version. However, it has worked before. So I don't really know what's going on.

I am using kde on both ubuntu and debian.

There is no certificate in the GUI.

ksnip_20231019-012640

zaqueoae commented 11 months ago

I think I don't have any certificate because it hasn't connected with websocket. The only time it connected, the window appeared telling me to accept the certificate.

zaqueoae commented 11 months ago

I just tried it on debian + Xfce with the same result on chromium apt. I installed qz like this: wget -qO - qz.sh | bash

tresf commented 11 months ago

Firefox on Debian should be fixed once QZ Tray 2.2.3 is released. You can test this out here while you wait, per:

We also added initial support for Epiphany browser here, starting with QZ Tray 2.2.3:

@zaqueoae I tested QZ Tray 2.2.2 with Chromium on Ubuntu 22.04 and I can confirm that it didn't work.

Next, I tested with QZ Tray 2.2.3-rc.2 and it works, so I my instinct is that I must have fixed this with one of the above PRs.

Can you please test it out here and let us know if it's fixed with the RC?

zaqueoae commented 11 months ago

I have tried this:

On Debian 12 KDE Plasma with qz v2.2.3-rc.1

I have uninstalled all versions of chromium and installed the apt version again and it was still working. Next I uninstalled qz and reinstalled it and with chromium it worked perfectly. Furthermore, when installing qz again, the Firefox window that I had active asked me to restart Firefox for an update (Actually I have not updated anything), and when it restarted it already connected to the websocket. Something quite strange.

On Debian 12 Xfce with qz v2.2.3-rc.1

tresf commented 11 months ago

The desktop environment shouldn't matter.

I'll check the following. Let me know if I missed one:

This will likely NOT make the 2.2.3 release, but we can provide a one-off installer if needed.

zaqueoae commented 11 months ago

Firefox apt seems to be the only version that doesn't crash. I just tried it in Kubuntu and it works fine.

Summary: Firefox apt works with debian and ubuntu. There is no guarantee that the rest of the browsers and packages will work.

tresf commented 11 months ago

Firefox apt seems to be the only version that doesn't crash.

What do you mean by "crash"?

tresf commented 11 months ago

On Debian 12 Xfce with qz v2.2.3-rc.1

  • 🚫 Chromium apt: Not working

On Debian 12 KDE Plasma with qz v2.2.3-rc.1

  • ✅ Chromium apt: Yes it works

The desktop environment should not affect this. Is there a chance an older version of QZ Tray was installed on your Plasma environment? See https://github.com/qzind/tray/pull/1004 for more details.

tresf commented 11 months ago

Testing chromium snap on Debian 12 🚫 FAILS.

IOException executing: [certutil, -d, sql:/home/debian/snap/chromium/current/.pki/nssdb/, -A, -t, TC, -n, QZ Industries, LLC, -i, /tmp/root-ca-16565941996156721047.crt]
zaqueoae commented 11 months ago

Firefox apt seems to be the only version that doesn't crash.

What do you mean by "crash"?

By crash in this case I mean that it does not connect to the websocket. In the case of Firefox, with version v2.2.3-rc.1 it has worked for me on 3 different computers. One with deban kde, another with kubuntu and another with debian xfce.

On the other hand, chromium only in one of them.

tresf commented 11 months ago

On the other hand, chromium only in one of them.

I was able to reproduce, but it was because of missing certutil. I've patched this here just now: cfaab7e . If that's not the cause, it may be from the other cause I mentioned here: https://github.com/qzind/tray/issues/1194#issuecomment-1771462445. We'll automatically install certutil on Debian starting with QZ Tray 2.2.3.

Debian 12:

tresf commented 11 months ago

QZ Tray 2.2.3 is now available which will fix the majority of the issues listed. If one's not working, please open up a dedicated bug report and we can look into it.