tray icon indicating copy to clipboard operation
tray copied to clipboard

Printer status: "Printer state-reason "media-low-report" was not found" - leaves user confused as to print job status

Open lite1979 opened this issue 2 years ago • 3 comments

Writing this up as a user recently contacted us regarding a failed print.

While the failed print is most likely the result of PC or printer settings, perhaps a better message is available when the status call is less informative like this one.

lite1979 avatar Sep 02 '22 16:09 lite1979

@Vzor- is this a missing mapping?

tresf avatar Sep 02 '22 17:09 tresf

@Vzor- here's some additional information:

https://github.com/OpenPrinting/cups/blob/1da735b3f0cf258eba0836b54796dc99c4950ac3/backend/snmp-supplies.c#L161-L176

tresf avatar Sep 09 '22 13:09 tresf

So it appears to be some SNMP messaging that doesn't exactly match that from within CUPS...

https://github.com/qzind/tray/blob/875c7038cf18a4ae8ac440627f13230aeddaecee/src/qz/printer/status/printer/CupsPrinterStatusMap.java#L39

For example, QZ Tray looks for:

QZ Looks for SNMP reports
media-low media-low-report
media-empty media-empty-warning
toner-low toner-low-report
toner-empty toner-empty-warning
door-open door-open-report
media-jam media-jam-warning
offline-report :white_check_mark: offline-report
(missing) service-needed-warning
input-tray-missing input-tray-missing-warning
output-tray-missing output-tray-missing-warning
marker-supply-missing marker-supply-missing-warning
output-area-almost-full output-area-almost-full-report
output-area-full output-area-full-warning

@Vzor- I feel like we could populate the sorted reason table with the additional -warning and -report strings rather quickly and handle any/all of these. Alternately, we could truncate -report or -warning when the message arrives, taking special consideration for the ones that actually end with that suffix.

tresf avatar Sep 09 '22 13:09 tresf

@Vzor- please provide an update on this.

tresf avatar Sep 27 '22 14:09 tresf

Pr soon. I took the truncation approach.

Vzor- avatar Sep 27 '22 22:09 Vzor-

Some minor consequences of this fix,

  1. If there is an unknown status in the future that ends in report or warning, it will be truncated. exceptions like offline-report are hard-coded.
  2. ~~If cups reports 'toner-low-report', we will report 'toner-low'. I can't imagine a situation where you would need to know the exact native cups status code, but in that case this would cause a mismatch.~~
  3. ~~There is a minuscule amount of info loss caused by combining two statuses into 1.~~
  4. If the state includes something like 'media-jam' and 'media-jam-warning' shows up, it will be seen as a duplicate and ignored. I doubt this will come up though.

edit: The rawCode part of the status now reflects the real status message we received. This makes consequences 2 and 3 avoidable by the end user.

Vzor- avatar Sep 28 '22 22:09 Vzor-

Implemented via 6f3b5b3. This will be fixed in QZ Tray 2.2.2.

tresf avatar Sep 30 '22 03:09 tresf