tray
tray copied to clipboard
Printer status: "Printer state-reason "media-low-report" was not found" - leaves user confused as to print job status
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.
@Vzor- is this a missing mapping?
@Vzor- here's some additional information:
https://github.com/OpenPrinting/cups/blob/1da735b3f0cf258eba0836b54796dc99c4950ac3/backend/snmp-supplies.c#L161-L176
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.
@Vzor- please provide an update on this.
Pr soon. I took the truncation approach.
Some minor consequences of this fix,
- 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.
- ~~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.~~
- ~~There is a minuscule amount of info loss caused by combining two statuses into 1.~~
- 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.
Implemented via 6f3b5b3. This will be fixed in QZ Tray 2.2.2.