Closed Bug 1771500 Opened 4 months ago Closed 3 months ago

[linux] Firefox does not show all the nearby printers

Categories

(Toolkit :: Printing, defect)

Firefox 100
defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: jhorak, Assigned: jhorak)

References

Details

Attachments

(1 file)

  1. stop cups-browsed service:
systemctl stop cups-browsed
  1. Create multiple virtual printers on network (the ppd file has to be valid file):
sudo ippeveprinter -D file:/tmp/ps -P /usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd -c /usr/bin/cat "local_printer10"
  1. Open print dialog
  2. Only Save to PDF and one of the network or local printer is available to choose from.

The GTK dialog shows all the printers, libreoofice too (it has a own print dialog as Firefox has).

The problem is most likely with CupsDestCallback: https://searchfox.org/mozilla-central/source/widget/nsPrinterListCUPS.cpp#85
To continue enumerate all the printers it should return 1. For my case it returns 0, because the CUPS_DEST_FLAGS_MORE is not set. I think it is because some of the printers use ipps and other ipp:

avahi-browse -a|grep ipp                                                                                                                                                      15:33:09
+ wlp3s0 IPv6 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv6 local_printer9                                _ipp._tcp            local
+ wlp3s0 IPv4 Brother DCP-L2540DN series                    _ipp._tcp            local
+ wlp3s0 IPv4 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv4 local_printer9                                _ipp._tcp            local

I get the local_printer10 in the list sometimes and sometimes Brother DCP-L2540DN. So we should probably always return 1, because cups will handle the right iteration count for us.

Also the cups_get_cb which is used in CupsGetDests is always returning 1:
https://github.com/apple/cups/blob/23c45db76a8520fd6c3b1d9164dbe312f1ab1481/cups/dest.c#L4029

Allow to continue enumeration of the printers for all protocols
(ie. ipp and ipps).

Assignee: nobody → jhorak
Status: NEW → ASSIGNED
Severity: -- → S3
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/b7bc35cb4c89
Show all available printers; r=stransky
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
QA Whiteboard: [qa-103b-p2]
See Also: → 1666937

I do not need all printers.
I would like to see a distinction between directly connected printers and network nearby printers.

You need to log in before you can comment on or make changes to this bug.