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

QZ Tray: websocket Steal won't steal the session 2 times #1237

Open
IT-Nisse opened this issue Feb 19, 2024 · 4 comments
Open

QZ Tray: websocket Steal won't steal the session 2 times #1237

IT-Nisse opened this issue Feb 19, 2024 · 4 comments
Assignees

Comments

@IT-Nisse
Copy link

The Problem:
So we got an environment with a Follow Me Print Sollution, we got a few computers where alot of people lock the computer and another user will login.

This casues the QZ Tray session to be logged on as the first user and the print jobs get sent to the follow me print session of the first user.

I tried to run qz | Multiple Instances to steal the instance from the first user, and it works ( Administrators can edit qz-tray.properties and add a line websocket.steal=true. This file can be found by clicking QZ Tray, Advanced, Diagnostic, Browse App folder (secure environments may store this file in the User or Shared folder) ).

However if the first user comes back and login again the instances does not get stolen back.

  • So User A log in, user A can print.
  • User A Locks the computer.
  • User B Log in, user B can Print.
  • User B Locks the computer.
  • User A Logs in again, user A can't print.

I did check the debug log and it does say WebSocket stolen when User A Logs in the secound time.
_- 2024-02-19 11:56:54,083 [INFO] Server started on port(s) 8283, 8282

  • 2024-02-19 11:56:54,084 [DEBUG] Checking for a running instance of QZ Tray on port 8182
  • 2024-02-19 11:56:54,332 [DEBUG] Checking for a running instance of QZ Tray on port 8384
  • 2024-02-19 11:56:54,414 [WARN] QZ Tray is already running on localhost/127.0.0.1:8182
  • 2024-02-19 11:56:54,415 [INFO] Asking other instance of QZ Tray to shut down.
  • 2024-02-19 11:56:54,420 [INFO] Remote shutdown message delivered.
  • 2024-02-19 11:56:54,427 [WARN] Remote connection closed - WebSocket stolen_
@tresf
Copy link
Contributor

tresf commented Feb 20, 2024

@IT-Nisse thanks for the detailed report. We'll attempt to reproduce an let you know what we find. @Vzor-, FYI, this is the websocket stealing code. Perhaps there's a bug?

@tresf tresf added this to the 2.2.4 milestone Feb 20, 2024
@Vzor-
Copy link
Contributor

Vzor- commented Mar 1, 2024

To clarify, when user A logs back in, are you relaunching QZ Tray?

@IT-Nisse
Copy link
Author

IT-Nisse commented Apr 4, 2024

Sorry for a late reply.

When i logged back as User A i tried to not open QZ Tray manually at first, when that did not work i tried to open it neither did work.

So if i don't start it the website just loads "Printing"
image

Otherwise it will say that QZ tray is not started then start to prompt to Allow the website.
image
after i allowed it 3 times it say that it failed.

@tresf
Copy link
Contributor

tresf commented Aug 26, 2024

@IT-Nisse by chance are you using fast-user-switching in Windows? We have not yet been able to reproduce.

Also, so that we're working from the same baseline, can you perform all tests with https://demo.qz.io? (e.g. paste qz:steal into the URL). That way we're not trying to guess what is occurring from your application.

@tresf tresf removed this from the 2.2.4 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants