Closed Bug 1471854 Opened 6 years ago Closed 4 years ago

Silent printing does not work on Linux - Firefox 59.x (print.always_print_silent=true)

Categories

(Core :: Printing: Output, defect, P3)

59 Branch
x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla79
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- verified
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- verified
firefox80 --- verified

People

(Reporter: tomjokiel, Assigned: emilio)

References

Details

(Keywords: regression, Whiteboard: [layout:print-triage:p3])

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180621125625

Steps to reproduce:

I have set 'print.always_print_silent' to 'true' and tried to print by pressing the 'Ctrl+P' shortcut. If i used a print button in the Firefox UI then print preview window was displayed correctly but then an error occurred when i pressed the actual 'Print' button.


Actual results:

I have got "Print preview error" window with following error:
"An error occurred while printing.​"

When i started the Firefox from the terminal an additional error was displayed:
"IPDL protocol Error: Received an invalid file descriptor"

No job was sent to CUPS.

I was able to reproduce this issue on Gentoo linux and Ubuntu 18.04.

Silent printing works ok under Windows 10 so this problem must be isolated to the linux platform.


Expected results:

Firefox should print the page silently.
Component: Untriaged → Printing: Output
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
I have investigated a bit further.

Firefox-58.0.2 is the last version where 'silent printing' feature still works.
Breakage must happen between Firefox-58.x and Firefox-59.x.

Please let me know if i could help in any way with resolving this issue.
Forgot to mention - I'm testing official Firefox builds:
https://ftp.mozilla.org/pub/firefox/releases/
(In reply to TomaszJ from comment #1)
> Breakage must happen between Firefox-58.x and Firefox-59.x.
> 
> Please let me know if i could help in any way with resolving this issue.

If you could find the exact regression range, that would be useful.
https://mozilla.github.io/mozregression/quickstart.html
Has Regression Range: --- → no
Flags: needinfo?(tomjokiel)
Summary: Silent printing does not work on Linux - Firefox 60.x ESR → Silent printing does not work on Linux - Firefox 59.x
Version: 60 Branch → 59 Branch
According to my tests done with the help of 'mozregression' utility (great tool by the way) the regression occurred here:

12:44.37 INFO: Narrowed inbound regression window from [2a4362ce, a4b21feb] (4 builds) to [2a4362ce, b84fe2ad] (2 builds) (~1 steps left)
12:44.37 INFO: No more inbound revisions, bisection finished.
12:44.37 INFO: Last good revision: 2a4362ce2d9fa82f62909532a1b534d214761341
12:44.37 INFO: First bad revision: b84fe2ad1ca27fc30c2e3f609b8f766185652560

Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2a4362ce2d9fa82f62909532a1b534d214761341&tochange=b84fe2ad1ca27fc30c2e3f609b8f766185652560 


Please let me know if you need more help.
Flags: needinfo?(tomjokiel)
Thank you for making the effort.

:jwatt, please have a look if you can. Bug 1425641, bug 1425190, and bug 1425188 are in the range.
Has Regression Range: no → yes
Flags: needinfo?(jwatt)
Any update on this?

I believe this issue prevents Firefox deployments in many corporate/commercial environments, would be nice to have this feature working again.

Thank you.
Priority: -- → P3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jwatt)
Summary: Silent printing does not work on Linux - Firefox 59.x → Silent printing does not work on Linux - Firefox 59.x (print.always_print_silent=true)
Flags: needinfo?(jwatt)
See Also: → 1200593
TomaszJ, it would be helpful to know what your other "print.*" prefs are set to. Can you open the page about:support and copy and paste those prefs into an attachment on this bug. It would be helpful if anyone else who's experiencing this could do the same.
Flags: needinfo?(tomjokiel)
Attached file about-support
Flags: needinfo?(tomjokiel)
I was able to recreate this issue on a clean Ubuntu live session (18.04). 

a) booted Ubuntu in VirtualBox
b) confirmed that printing to file works
c) opened Firefox and added 'print.always_print_silent' preference through 'about:config'
d) tried to print with 'Ctrl+P'
e) error occurred

No other preferences are manually set or modified.

I have attached requested info to this bug.

I have the same issue with Fedora and Firefox 63: An error dialog or silent failure when print.always_print_silent is true.

Same problem in Ubuntu 16.04. Also happens when using the print() Javascript function.

Forgot to mention: my FF version ist: 65.0.1 (64-bit)

Same problem here on LUbuntu 18.04, Firefox 66 (64bits).

Don't know if there is a link, I can also see a dconf-warning : "unable to open /var/lib/snapd/desktop/dconf/profile/user : Permission denied" Indeed, there is nothing in /var/lib/snapd/desktop/

Whiteboard: [layout:print-triage:p3]

Hello,

I am also experiencing this bug with the on Firefox 69.0.2 on Ubuntu. I've also tried it with the nightly two days ago. I was hoping to use Firefox on all of our staff desks at my library for checking out, but with this bug, it will not be possible.

We're currently experiencing the same issue with Firefox 73.0.1 on Ubuntu 18.04.4. Setting this option will cause Firefox to crash.
We would like to use this option for a POS. Any update on this?

Same issue with Firefox 75.0 on Ubuntu 20.04.

It's a shame that we cannot use such a nice browser for print automation because of a silly 2 year old bug forgotten by everyone.

So it seems this is likely a regression from bug 1425188 or such. I can take a look, I agree this is unfortunate.

Assignee: nobody → emilio
Flags: needinfo?(jwatt)

Not returning a valid target for print output causes the whole printing
progress to fail. When printing silent, we choose "native" format, which in the
GTK backend just fails because we return null (wat).

This fixes printing with print.always_print_silent. Printing via the file
dialog gets an explicit format so we don't hit that code path.

So that it shows up in about:config (and also it's faster that way).

Depends on D79116

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/09465d16c95d
Don't make native format-choosing dependent on print preview. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/28d20aef861d
Make print.always_print_silent a static pref. r=jwatt
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79

I don't understand why this issue has been marked as 'Closed'.

The error is still there in Firefox 79.0a1 under Ubuntu 20.4
Setting print.always_print_silent to true leads to error popup:

Printer Error
An error occurred while printing

and following console log:

(/usr/lib/firefox-trunk/firefox-trunk:24614): dconf-WARNING **: 10:57:36.223: Unable to open /var/lib/snapd/desktop/dconf/profile/user: Permission denied
IPDL protocol Error: Received an invalid file descriptor

Setting print.always_print_silent to false allows to perform printing successfully

Are you sure this is with a build with the patch?

Attached file Firefox info
Emilio, I am not.
Please find my Firefox info below:

That build doesn't have the patch, if you click in the link in comment 23, then you see:

  • First release with: 20200610214041

While your build id is 20200610111348, which is from ~10 hours earlier.

Sorry for that Emilio and thank you for quick fixing :)

Emilio,

Is there any chance to get this fix backported to the Firefox 78 ESR release?
Or we will need to wait another year or so till it hits the ESR branch?

Thank you for your work on this.

Comment on attachment 9155627 [details]
Bug 1471854 - Don't make native format-choosing dependent on print preview. r=jwatt

Beta/Release Uplift Approval Request

  • User impact if declined: Silent printing, which is important for automation of print testing, won't work on Linux.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0 (make sure that print.print_to_file is true if you don't have a printer to actually see the print output in your file system).
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very simple change that unifies the print-preview and non-print-preview format choosing on GTK
  • String changes made/needed: none
Attachment #9155627 - Flags: approval-mozilla-beta?
Attachment #9155628 - Flags: approval-mozilla-beta?
Flags: qe-verify+

I think it's reasonable to try to uplift it to 78, but not my call.

I think this can ride to 79, but we can put it in the queue for 78.x (x > 0).

Attachment #9155627 - Flags: approval-mozilla-beta? → approval-mozilla-es78?
Attachment #9155628 - Flags: approval-mozilla-beta? → approval-mozilla-es78?
QA Contact: vlad.lucaci

Comment on attachment 9155627 [details]
Bug 1471854 - Don't make native format-choosing dependent on print preview. r=jwatt

Approved for 78.1esr.

Attachment #9155627 - Flags: approval-mozilla-esr78? → approval-mozilla-esr78+
Attachment #9155628 - Flags: approval-mozilla-esr78? → approval-mozilla-esr78+

Hello,

I manage to reproduce the issue on the affected build 63.0a1(2018-06-28).

Confirming this issue as verified fixed with the latest 80.0a1 (2020-07-08), 79.0b5 , and the latest ESR build from Treeherder(20200630201553) on Ubuntu 18.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: