Closed Bug 1660658 Opened 4 years ago Closed 4 years ago

Tab modal print only allows black and white selection on some color printers on environments using older CUPs such as Ubuntu 16.04

Categories

(Core :: Print Preview, defect, P1)

Firefox 81
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox82 --- fixed
firefox83 --- fixed

People

(Reporter: 6dnail, Assigned: alaskanemily)

References

Details

(Whiteboard: [print2020_v82][old-ui-][likely fixed by bug 1662518 (or bug 1665618)])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Selected file-> print preview
noticed the color mode only allows black and white

Actual results:

The preview was black and white and the resulting print was blank and white
If in the preview (which is black and white), I select Print using the system dialog, I get a color print

Expected results:

I should have been able to select color mode

Back around 8/18/20, the print dialog was working correctly.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Printing: Output
Product: Firefox → Core
Component: Printing: Output → Printing
Product: Core → Toolkit
Whiteboard: [print2020_v81]

Hi Lee: Does your selected printer support color? Are you able to select color if you choose "Save as PDF" from the Destination list?

Flags: needinfo?(6dnail)

(In reply to Sean Voisen (:svoisen) from comment #2)

Hi Lee: Does your selected printer support color? Are you able to select color if you choose "Save as PDF" from the Destination list?

The about:config item print.print_in_color keeps getting reset to false except if I select "Save as PDF". It's as if the new print preview dialog is controlling that config item.

If I "Save as PDF", I am able to select color

Two printers, both Canon, IP3600 and iX6820. Both support color. Going to the system printer menu, I see nothing about Black and White. I do see two items on the printer definition: Color model is CMYA and Color Precision is normal. Both of these option imply color printing.

The new menu (file -> print preview) which is only showing mode "black and White" for the Canon printers will print in color if " Print using the system dialog" is selected. I thought the version of nightly prior to 8/18 did show a color preview page. I'm not sure how to regress nightly to a previous build.

User agent is: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0
OS is: Linux 4.4.0-170-generic #199-Ubuntu SMP Thu Nov 14 01:45:04 UTC 2019
About:config items include
print.print_colorspace - default
print.print_bgcolor - true
print.print_in_color - false <- changed to true but made no difference

Emily or Erik: Is it possible CUPS is not providing the right information here?

Severity: -- → S3
Flags: needinfo?(enordin)
Flags: needinfo?(emcdonough)
Priority: -- → P1
Summary: firefox print only allows blank and white selection → Tab modal print only allows black and white selection on some color printers

Hi Lee,

Thanks for reporting this.

Thankfully, Canon iX6820 is the exact printer that I have.

Interestingly, everything is working fine for me with regard to color printing on my Canon. I was able to navigate both color modes in the preview, and print a physical page, in color, from my printer. Note, however, that I am on macOS 10.15.5, rather than on Linux, though the code paths should be the same.

I've attached a screenshot of my in-color print preview with my Canon printer selected.

I would like to get to the bottom of what is going on here. It's interesting that you said it worked previously, but seems to have regressed.

Depending on your technical background, running the mozregression tool to find out exactly where the functionality regressed may be an option you can explore if you feel comfortable doing so.

The website goes over various installation options, but on macOS and Linux, we can use the command-line version, which I prefer. Here's a brief list of steps on how you might get it running.


  1. You must have Python (preferably Python3) along with Python-Pip installed on your computer.
  2. Install mozregression in the terminal via pip3 install mozregression.
  3. Find a regression range in the terminal, e.g. mozregression --good 2020-08-20 --bad 2020-08-24.

How step 3 works:

This will launch a version of Firefox, starting with your "good" date, 2020-08-20 in this case; once the browser opens, you will be able to open the print UI to check for color modes. If you find that the functionality is, indeed, good, then you would type good into the terminal and press enter.

mozregression will close that version of the browser and then check your "bad" date by launching a version of Firefox from that date, 2020-08-24 in this case; you will be able to test the print UI in the same way, and if the functionality is, indeed, bad, then you would type bad into the terminal and press enter.

One by one, mozregression will search through versions of Firefox, where you verify whether the functionality you're looking for is "good" or "bad," until you find two adjacent versions where one is good and one is bad. At that point, mozregression will leave you with a regression range that will look something like this:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=94982363dfa4b5bde758cf1442a9166dc07c16fb&tochange=d6ae04588d3425c058afc56a47ba5345167ea04b


Again, please don't feel any obligation to run through these steps if you don't feel comfortable doing so.

I will also keep digging to see if I can reproduce the behavior.

Flags: needinfo?(enordin)

Using mozregression:
Through Nightly of 8/18, it was looking good - color was present on the preview however, the color/B&W selection did not exist.

Nightly of 8/21 did have the option and it did allow color selection for my Canon iX6820, as well as my Canon IP3600.

Beginning with Nightly of 8/22, the option does not allow me to select color for either of my Canon printers.

Flags: needinfo?(6dnail)

Lee,

That's great that you were able reproduce the issue and find the date range with mozregression. Would you be able to paste the final push log that mozregression shows after the final check?

It would look similar to this link:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9a0556195f9df083dabb657b953e112c2366f234&tochange=72ba4a955fb40f1ea4e47ab4ab27252e55f2f220

Here's an example output from a recent mozregression that I ran, with the link at the bottom:

Was this integration build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): good
 3:59.46 INFO: Narrowed integration regression window from [623e8ceb, 72ba4a95] (4 builds) to [9a055619, 72ba4a95] (2 builds) (~1 steps left)
 3:59.46 INFO: No more integration revisions, bisection finished.
 3:59.46 INFO: Last good revision: 9a0556195f9df083dabb657b953e112c2366f234
 3:59.46 INFO: First bad revision: 72ba4a955fb40f1ea4e47ab4ab27252e55f2f220
 3:59.46 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9a0556195f9df083dabb657b953e112c2366f234&tochange=72ba4a955fb40f1ea4e47ab4ab27252e55f2f220

This will help us narrow down exactly which code modifications may have led to this change in behavior.

Thank you for looking into this! It's incredibly helpful.

Flags: needinfo?(6dnail)

This morning I was able to get older releases when they were between dates however, once it got to individual revisions such as , it began failing as 'not found'. I tried this afternoon but even if I put in a couple weeks worth of range, I get the following error:

ERROR: The url 'https://hg.mozilla.org/integration/mozilla-inbound/json-pushes?changeset=20200816' returned a 404 error. Please check the validity of the url.

For future reference, is there some way to get around this error? For the immediate problem, hopefully it will help that I got it down to 8/21 good and 8/22 bad.

I'd love to move python forward. I'm on Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-170-generic x86_64)

Flags: needinfo?(6dnail)
Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Lee McFarland from comment #9)

ERROR: The url 'https://hg.mozilla.org/integration/mozilla-inbound/json-pushes?changeset=20200816' returned a 404 error. Please check the validity of the url.

Strange. Was that a transitory problem that has since cleared up?

The date range is useful, thank you, but it's still quite wide given the amount of churn on this code right now. There are multiple builds on both dates. Would you be able to manually download and narrow the range to two specific builds from:

https://ftp.mozilla.org/pub/firefox/nightly/2020/08/

Component: Printing → Print Preview
Product: Toolkit → Core

I should say, ignore the '*-i10s' directories, and it's the 'firefox-81.0a1.en-US.linux-x86_64.tar.bz2' archives that contain the builds you'd need.

The problem persists if the operating system is Ubuntu 16 however a check of the problem with a test Ubuntu 18 system does not show the problem. There are other, unrelated problems with Ubuntu 18, which is why I don't plan to roll out a system change before Ubuntu 20.10

I tried
mozregression --good 2020-08-21 --bad 2020-08-22

Which resulted in:
INFO: Got as far as we can go bisecting nightlies...
0:08.54 INFO: Last good revision: 432e42cbbc4139efd2319952ec33efe8ff9add3c (2020-08-21)
0:08.54 INFO: First bad revision: 369f72130f3604c85f73a3b03b2b48f33ad9b19e (2020-08-22)
0:08.54 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=432e42cbbc4139efd2319952ec33efe8ff9add3c&tochange=369f72130f3604c85f73a3b03b2b48f33ad9b19e

0:08.54 INFO: Switching bisection method to taskcluster
0:08.54 INFO: Getting mozilla-central builds between 432e42cbbc4139efd2319952ec33efe8ff9add3c and 369f72130f3604c85f73a3b03b2b48f33ad9b19e
0:38.95 WARNING: Skipping build 369f72130f36: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.369f72130f3604c85f73a3b03b2b48f33ad9b19e.firefox.linux64-opt'
1:18.63 WARNING: Skipping build 432e42cbbc41: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.432e42cbbc4139efd2319952ec33efe8ff9add3c.firefox.linux64-opt'
1:24.45 WARNING: Skipping build c105f961424c: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.c105f961424c3a56aafccc82205d797d012f3b64.firefox.linux64-opt'
1:24.75 WARNING: Skipping build e375b85cfba3: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.e375b85cfba38ff5f49493d1d48b7561f7f2f8d7.firefox.linux64-opt'
1:28.82 WARNING: Skipping build 98f04ffcd64a: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.98f04ffcd64ad234afe670acac66e0c4fab231eb.firefox.linux64-opt'
1:33.18 WARNING: Skipping build b0888d07df69: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.b0888d07df690ed43df31a2b013d12464b183a30.firefox.linux64-opt'
1:33.84 WARNING: Skipping build 8cb700c12bd3: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.8cb700c12bd3acfdef56ce084c87d64fa4daae03.firefox.linux64-opt'
2:38.35 WARNING: Skipping build 920ef04bf423: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.920ef04bf423ccb2ce154ab6ff3e2aaa47f5b2e3.firefox.linux64-opt'
3:08.11 WARNING: Skipping build 157db696462d: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.157db696462d8a98905d0f8697088aa97cb6e08f.firefox.linux64-opt'
3:58.43 WARNING: Skipping build 069bb8bd2356: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.069bb8bd2356b4d5738e1cec37bf561c24c0f923.firefox.linux64-opt'
4:08.80 WARNING: Skipping build c38fb352aacf: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.c38fb352aacfa6afe7fe9975fca2e777787961e8.firefox.linux64-opt'
4:15.35 WARNING: Skipping build 508a0cc2f6d4: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.508a0cc2f6d446e4b016ebb6d2c740c80f830dd9.firefox.linux64-opt'
4:18.70 WARNING: Skipping build 483ef87aa6e8: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.483ef87aa6e85cb340d1c17b5b87bb7c217fb3b8.firefox.linux64-opt'
5:00.40 WARNING: Skipping build aa98a6ece5fb: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.aa98a6ece5fbbe2b09796d543fa91db5735a44a9.firefox.linux64-opt'
5:05.52 WARNING: Skipping build 1891b1e3fa34: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.1891b1e3fa34901dd33a61575d34dd52e15679f5.firefox.linux64-opt'
5:10.35 WARNING: Skipping build 2a823bfe8895: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.2a823bfe88959bebfc61a4f5015fa25e5024a8e7.firefox.linux64-opt'
5:40.10 WARNING: Skipping build e6fa159738fa: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.e6fa159738fa2f0b460c3867d0b4d439d64e59cd.firefox.linux64-opt'
5:45.00 WARNING: Skipping build 7dcb2bda35c7: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.7dcb2bda35c7d725759ffa5f53578898e0256662.firefox.linux64-opt'
5:45.22 WARNING: Skipping build ffc01c0f13a8: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.ffc01c0f13a841719e86d032ac27fe9dbc1fc5f7.firefox.linux64-opt'
5:49.62 WARNING: Skipping build 01c8bc283e34: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.01c8bc283e34f95f3550eb0641a3c82fdef7c443.firefox.linux64-opt'
5:54.18 WARNING: Skipping build 9bfa6276ddc5: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.9bfa6276ddc55be311c681960647e96317589a0d.firefox.linux64-opt'
6:19.41 WARNING: Skipping build 605c404fbd80: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.605c404fbd80c67e1127ac054b8bec6742bd748f.firefox.linux64-opt'
6:19.43 CRITICAL: First build 432e42cbbc41 is missing, but mozregression can't find a build before - so it is excluded, but it could contain the regression!
6:24.92 WARNING: Skipping build b0d012ec753d: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.b0d012ec753deb0880963f267806035da3a6b013.firefox.linux64-opt'
6:25.15 WARNING: Skipping build 5f02f3442f26: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.5f02f3442f26c1d052d10d1d7bf97819c8be5845.firefox.linux64-opt'
6:29.25 WARNING: Skipping build a67d5eac3843: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.a67d5eac384369f29e88c82cd224aa319154dfd2.firefox.linux64-opt'
6:33.73 WARNING: Skipping build 63d860f118da: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.63d860f118da09320ed65431129775b4e3631ff3.firefox.linux64-opt'
6:34.45 WARNING: Skipping build 2944e59a19f9: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.2944e59a19f9e8d15417ae88633c13679525d91e.firefox.linux64-opt'
6:38.57 WARNING: Skipping build ced8e8e8322c: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.ced8e8e8322c3926439b0b138fe75e44099265a7.firefox.linux64-opt'
6:43.31 WARNING: Skipping build ae3feb731c92: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.ae3feb731c92425c7bd4d32b9d0c8fbb907f4f9b.firefox.linux64-opt'
6:43.59 WARNING: Skipping build e9ff11c7fe04: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.e9ff11c7fe044fd8bd6c1b76aa94dc0bfef54068.firefox.linux64-opt'
6:47.86 WARNING: Skipping build a8f04609cdd8: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.a8f04609cdd89e6dd4f6e8c3f24daca3b6dc33be.firefox.linux64-opt'
6:53.08 WARNING: Skipping build e7988afc46d5: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.e7988afc46d5611771b5e269738e07b9be970046.firefox.linux64-opt'
6:53.52 WARNING: Skipping build 7cea08d78f8b: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.7cea08d78f8b23d7c8a41a76c9bb90c69df3a9bf.firefox.linux64-opt'
6:57.21 WARNING: Skipping build 61ed3192760a: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.61ed3192760a3aaef282c089c064fc8dd3890125.firefox.linux64-opt'
6:57.23 CRITICAL: Last build 369f72130f36 is missing, but mozregression can't find a build after - so it is excluded, but it could contain the regression!
7:01.80 WARNING: Skipping build 230239284bc2: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.230239284bc29144a4e8b15875623305b71034bc.firefox.linux64-opt'
7:02.03 WARNING: Skipping build 35cdd8678bbf: Unable to find build info using the taskcluster route 'gecko.v2.mozilla-central.revision.35cdd8678bbfed2d652deb2d7105494e366f1a0e.firefox.linux64-opt'
7:02.04 INFO: There are no build artifacts on inbound for these changesets (they are probably too old).

Hi Lee,

It's really good to know that this is only happening on Ubuntu 16. This helps us narrow down the search.

Regarding your mozregression output, may I ask what version is installed?

mozregression --version

My current mozregression version is 4.0.12

If your mozregression on an earlier version, this may explain some of the differences we're seeing.

(In reply to Lee McFarland from comment #13)

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=432e42cbbc4139efd2319952ec33efe8ff9add3c&tochange=369f72130f3604c85f73a3b03b2b48f33ad9b19e

Awesome, thank you! Almost certainly the first patch from bug 1658833 then. In that case it really does look like the CUPS library that ships with Ubuntu 16.04 is returning the wrong value. That sucks.

I'm not sure what the best way forward is yet, but perhaps we need to blacklist older versions of CUPS for the color check and just return true.

(In reply to Erik Nordin [:nordzilla] from comment #14)

Hi Lee,

It's really good to know that this is only happening on Ubuntu 16. This helps us narrow down the search.

Regarding your mozregression output, may I ask what version is installed?

mozregression --version

My current mozregression version is 4.0.12

If your mozregression on an earlier version, this may explain some of the differences we're seeing.

My mozregression is 2.3.9

I think the mozregression error is bug 1655682. It's been already fixed in newer versions of mozgression.

I am not sure whether macOS has the same problem or not, but tentatively I am specifying platform to Linux for now.

OS: Unspecified → Linux
Summary: Tab modal print only allows black and white selection on some color printers → Tab modal print only allows black and white selection on some color printers on environment using older CUPs such as Ubuntu 16.04
Summary: Tab modal print only allows black and white selection on some color printers on environment using older CUPs such as Ubuntu 16.04 → Tab modal print only allows black and white selection on some color printers on environments using older CUPs such as Ubuntu 16.04
See Also: → 1661785

Hopefully this will be fixed by bug 1661785 when it lands. If not, it will take more investigation.

Flags: needinfo?(emcdonough)

Duplicate of my comment for bug 1661785:
As of build 20200828153126:
There is no print preview option

Ubuntu 16.04- the print option does appear in color. The color/b&w selection item is greyed out with color mode "blank and white" selected. A print is in color, the about:config variable print.print_in_color remains TRUE

Ubuntu 18.04 - same as 16.04 except, the color/b&w selection item is operable.

Lee, would you mind trying the latest nightly? I believe buildid:20200828153126 doesn't include bug 1661785.

Flags: needinfo?(6dnail)

(In reply to Hiroyuki Ikezoe (:hiro) from comment #21)

Lee, would you mind trying the latest nightly? I believe buildid:20200828153126 doesn't include bug 1661785.

build 20200829091226 is reacting exactly like 20200828153126

There is no print preview option

Ubuntu 16.04- the print option does appear in color. The color/b&w selection item is greyed out with color mode "blank and white" selected. A print is in color, the about:config variable print.print_in_color remains TRUE

Ubuntu 18.04 - same as 16.04 except, the color/b&w selection item is operable.

Flags: needinfo?(6dnail)
Priority: P1 → P2

(In reply to Jonathan Watt [:jwatt] from comment #15)

(In reply to Lee McFarland from comment #13)

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=432e42cbbc4139efd2319952ec33efe8ff9add3c&tochange=369f72130f3604c85f73a3b03b2b48f33ad9b19e

Awesome, thank you! Almost certainly the first patch from bug 1658833 then. In that case it really does look like the CUPS library that ships with Ubuntu 16.04 is returning the wrong value. That sucks.

I'm not sure what the best way forward is yet, but perhaps we need to blacklist older versions of CUPS for the color check and just return true.

I can look at fetching the CUPS version, and then using that to dummy out this attribute if it's before a certain version.

Assignee: nobody → emcdonough
Status: NEW → ASSIGNED

The Firefox nightly build of moments ago (20200831215215) just undid all the good work done so far on this problem - the problem is BACK.

Depends on: 1662518

It cannot be said this is resolved as it is not possible to verify the problem until bug 1662946 (firefox print hangs) is corrected.

Whiteboard: [print2020_v81] → [print2020_v81][old-ui-]

Allowing the user to select either Color or Black & White when the printer only supports B&W seems like a P2. But not allowing the user to select color when the printer is a color printer seems like a P1 to me.

Priority: P2 → P1
Whiteboard: [print2020_v81][old-ui-] → [print2020_v82][old-ui-]

Could you retest in the latest Nightly, Lee? I think this should have been fixed by the patch for bug 1662518 (or bug 1665618).

Flags: needinfo?(6dnail)
See Also: → 1665618

(In reply to Jonathan Watt [:jwatt] from comment #27)

Could you retest in the latest Nightly, Lee? I think this should have been fixed by the patch for bug 1662518 (or bug 1665618).

It is not possible to check the patch as the menu cannot be seen until bug 1662946 [fire fox nightly print hangs] is fixed.

Flags: needinfo?(6dnail)

(In reply to Lee McFarland from comment #28)

It is not possible to check the patch as the menu cannot be seen until bug 1662946 [fire fox nightly print hangs] is fixed.

Ah yes, I lost track of what was waiting for what, sorry.

Now that bug 1662946 is fixed, can you test again?

Flags: needinfo?(6dnail)

When this bug was written, the File menu option offered PRINT and PRINT-PREVIEW. It was PRINT-PREVIEW that showed the 'preview' in black and white only. Now on Ubuntu 16.04, only the PRINT option is shown and, within that option, the preview screen is a a small color rectangle on a gray background. See the PDF attachment

Flags: needinfo?(6dnail)

Per bug 1659928 comment 46 comment I believe you've resolved the small page (color rectangle) issue. Now that's resolved, are you able to switch between Color and Black and White in the preview?

(In reply to Jonathan Watt [:jwatt] from comment #31)

Per bug 1659928 comment 46 comment I believe you've resolved the small page (color rectangle) issue. Now that's resolved, are you able to switch between Color and Black and White in the preview?

I am able to switch between a color selection and B&W

(In reply to Lee McFarland from comment #32)

I am able to switch between a color selection and B&W

Alright, let's close this as fixed then. :-) Thank you for reporting this bug and for your patience!

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: [print2020_v82][old-ui-] → [print2020_v82][old-ui-][likely fixed by bug 1662518 (or bug 1665618)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: