Job viewer shows "Printer error" for cups-waiting-for-job-completed

Aperta Adatta ai principianti
#494 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@RonitMehta08 ci sta già lavorando.

Dal 13/11/2026.

  • #500 di @RonitMehta08 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

Leggi statereason.py, in particolare StateReason.get_level(), e segui come jobviewer.py usa il livello del motivo in JobViewer.update_status(). Aggiungi il motivo CUPS indicato alla classificazione informativa, quindi verifica che la barra di stato non segnali più un errore mentre un job è in attesa di completamento. L’issue non indica alcun file di test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Note: This issue was written by my clanker. While I try to verify its steps as much as possible, it might not be 100% correct.


Summary

At the end of each job sent to an IPP printer, the job viewer's status bar shows "Printer error", even though the job prints and completes successfully.

Cause

  • After sending the document, the CUPS ipp backend sets the printer-state-reason cups-waiting-for-job-completed while it waits for the printer to finish (cups backend/ipp.c). CUPS clears it in finalize_job once the job is done.
  • StateReason.get_level() classifies every reason without a -report or -warning suffix, and not in its explicit list, as ERROR. So this normal reason becomes an error titled "Printer error".
  • JobViewer.update_status() pushes the worst reason's description to the status bar, so the error is shown while the job finishes.
  • #72 already added this reason to the blacklist in notify_printer_state_reason_if_important(), so desktop notifications are suppressed, but the status bar path still uses the ERROR level.

Steps to reproduce

  1. Use a driverless IPP printer (here via a cups-browsed implicitclass:// queue; any ipp/ipps queue uses the same backend code path).
  2. Open the job viewer: system-config-printer --show-jobs <queue>.
  3. Print a multi-page document.
  4. When all data has been sent and the printer is still printing, the status bar shows "Printer error".

Expected: no error; the job completes normally.
Actual: "Printer error" while the backend waits for completion. The job ends as completed and the printer reports job-completed-successfully.

Suggested fix

Classify the reason as REPORT in StateReason.get_level(), next to the other cups-* informational reasons. This fixes the status bar and the notification path at their shared source:

         if (self.reason.endswith ("-report") or
             self.reason in ["connecting-to-device",
+                            "cups-waiting-for-job-completed",
                             "cups-ipp-missing-cancel-job",

Environment

  • system-config-printer 1.5.18 (Ubuntu package 1.5.18-1ubuntu9), code unchanged on master at c40cbbb
  • CUPS 2.4.7, cups-browsed 2.0.0
  • Linux Mint 22.3 (Cinnamon)
  • Printer: HP Color LaserJet Pro MFP 3302 (IPPS)
Lingua principale
Python
Stelle
209
Fork
111
Merge medio
2g 3h
PR unite (30g)
8

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenPrinting/system-config-printer

Tutte le issue di OpenPrinting/system-config-printer

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.