qzind / tray

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

Printer status change not firing reliability #1278

Closed tresf closed 3 weeks ago

tresf commented 1 month ago

Environment:

Product Version(s): QZ Tray 2.2.x (may affect other QZ Tray versions)

Steps:

  1. Natigate the DEMO page to the "Status" tab (i.e. https://demo.qz.io/#statusContent)
  2. Click "All Printers"
  3. Visit CUPS web interface (i.e. http://localhost:631/admin/)--> "Manage Printers" --> Click any printer
  4. Click "Maintenance" --> "Pause Printer"
  5. Notice that the "Pause" status has been reported
  6. From Visit CUPS web interface, click "Maintenance" --> "Pause Printer"
  7. Notice that the "Pause" status is MISSING

Since this does not appear to be a regression with the 2.2.4 release, I'm not holding up its release for it.

Assigning @Vzor- as he's authored most of the status listener code.

Vzor- commented 1 month ago

This looks to be an issue with cups, and it is most likely an issue that cropped up between when this feature was added to QZ, and now. In my test, I paused a printer, then unpaused it. These are the events reported to us from cups:

notify-sequence-number: 1 integer {1}
notify-subscribed-event: 1 keyword {printer-stopped}
notify-text: 1 textWithoutLanguage {Printer "_127_0_0_1" state changed to stopped.}
printer-state: 1 enum {stopped}
printer-state-reasons: 1 keyword {paused}
printer-is-accepting-jobs: 1 boolean {false}
------------------------
notify-sequence-number: 1 integer {2}
notify-subscribed-event: 1 keyword {printer-state-changed}
notify-text: 1 textWithoutLanguage {Printer "_127_0_0_1" state changed to idle.}
printer-state: 1 enum {idle}
printer-state-reasons: 1 keyword {paused}
printer-is-accepting-jobs: 1 boolean {false}

We can se the state changed from stopped to idle , but the state-reason remained as paused. We can also see the printer is not accepting jobs. If we however pull the printers current state, we get:

printer-state: 1 enum {idle}
printer-state-reasons: 1 keyword {none}
printer-is-accepting-jobs: 1 boolean {false}

Here we can see the paused state is gone, but it still reports as not accepting jobs. I do not know why it doesn't think it is accepting jobs, but it is probably unrelated.

tresf commented 3 weeks ago

Fixed upstream via https://github.com/OpenPrinting/cups/issues/1013. The next release of CUPS 2.4.x will have this feature included.