Closed Bug 1678293 Opened 4 years ago Closed 3 years ago

File picker is displayed while the print preview is still in a loading state for the “Save to PDF” destination

Categories

(Toolkit :: Printing, defect, P2)

defect

Tracking

()

VERIFIED FIXED
86 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- verified
firefox87 --- verified

People

(Reporter: emilghitta, Assigned: emmamalysz)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020_v86] [old-ui-] )

Attachments

(2 files)

Attached image SaveToPdf.gif

Affected versions

  • Firefox 84.0b2 (BuildId:20201117192430)
  • Firefox 85.0a1 (BuildId:20201118215158)

Affected platforms

  • Windows 10 64bit
  • Ubuntu 20.04 64bit
  • macOS 10.13

Steps to reproduce

  1. Launch Firefox.
  2. Access the following link
  3. Hit Ctrl + P in order to open the print preview.
  4. While the print preview is still in the loading state change the Destination to “Save to PDF” and click Save.

Expected result

  • The “Save” button gets locked and the file picker is not displayed.

Actual result

  • The file picker is displayed and the page can be saved as pdf but the outputted pdf file is damaged and can’t be opened.

Regression Range

  • I don’t think that this is a regression.

Notes

  • This issue is not reproducible while using: Microsoft Print to PDF, OneNote for Windows 10, Actual physical printer or Microsoft XPS documents. For these destinations, the Print button gets locked on click and the file picker or the print job is not started until the print preview finishes it's loading state (as expected).
  • [Suggested Severity] I think that S3 fits for this issue.
Severity: -- → S3
Priority: -- → P2

Why do you think this should wait to show the file picker? For consistency for other save to PDF printers? I believe the current reasoning is to do it this way so that hopefully the initial preview finishes while the user is selecting a filename rather than forcing the user to wait, and then pick a filename.

Flags: needinfo?(emil.ghitta)

Sure, consistency would be great but the other reason is that some users, which are trying to print longer pages/websites to PDF may end up receiving/saving damaged pdf files.

This highly depends on the weight that is being added to the print preview rendering time and if the user closes that particular tab or the print preview after saving to PDF. The probability of this to happen is there especially for users which prefer saving the pdf file to the default location (and since saving via "Save to PDF" destination auto fills the File Name field inside the file picker this gives less time for the print preview to finish rendering before the user saves to pdf).

I think that, in this case, forcing the user to wait would be better than "giving them" damaged files.

Flags: needinfo?(emil.ghitta)

(Moving bugs to 86, part 1.)

Whiteboard: [print2020_v85] [old-ui-] → [print2020_v86][old-ui-]
Assignee: nobody → emalysz
Status: NEW → ASSIGNED
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/125c68902194
update progress indicator string and limit how long a user has an empty document when saving a large file r=mstriemer,fluent-reviewers,flod

Backed out changeset 125c68902194 (bug 1678293) for browser_pdf_printer_settings.js failures.

Push with failure: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&fromchange=125c68902194afd3e3874dc9f897e290d8644893&test_paths=toolkit%2Fcomponents%2Fprinting%2Ftests&tochange=c986bfc03fcf666ec5b5f9ecbd51fa3a72a781bc&selectedTaskRun=NfnQkps7Q3m4mg8VQ-Hdtw.0

Backout link: https://hg.mozilla.org/integration/autoland/rev/c986bfc03fcf666ec5b5f9ecbd51fa3a72a781bc

Failure log: https://treeherder.mozilla.org/logviewer?job_id=327114780&repo=autoland&lineNumber=4583

[task 2021-01-19T06:50:28.361Z] 06:50:28     INFO - TEST-START | toolkit/components/printing/tests/browser_pdf_printer_settings.js
[task 2021-01-19T06:50:28.747Z] 06:50:28     INFO - GECKO(4315) | [Parent 4315, Main Thread] WARNING: g_object_ref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:135
[task 2021-01-19T06:50:28.748Z] 06:50:28     INFO - GECKO(4315) | (firefox:4315): GLib-GObject-CRITICAL **: 06:50:28.745: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
[task 2021-01-19T06:50:29.240Z] 06:50:29     INFO - GECKO(4315) | [Parent 4315, Main Thread] WARNING: g_object_ref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:135
[task 2021-01-19T06:50:29.241Z] 06:50:29     INFO - GECKO(4315) | (firefox:4315): GLib-GObject-CRITICAL **: 06:50:29.234: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
[task 2021-01-19T06:50:29.319Z] 06:50:29     INFO - GECKO(4315) | Waiting for removal
[task 2021-01-19T06:50:29.763Z] 06:50:29     INFO - GECKO(4315) | [Parent 4315, Main Thread] WARNING: g_object_ref: assertion 'G_IS_OBJECT (object)' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:135
[task 2021-01-19T06:50:29.763Z] 06:50:29     INFO - GECKO(4315) | (firefox:4315): GLib-GObject-CRITICAL **: 06:50:29.756: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
[task 2021-01-19T06:50:34.979Z] 06:50:34     INFO - TEST-INFO | started process screentopng
[task 2021-01-19T06:50:35.387Z] 06:50:35     INFO - TEST-INFO | screentopng: exit 0
[task 2021-01-19T06:50:35.387Z] 06:50:35     INFO - Buffered messages logged at 06:50:28
[task 2021-01-19T06:50:35.387Z] 06:50:35     INFO - Entering test bound testPDFPrinterSettings
[task 2021-01-19T06:50:35.388Z] 06:50:35     INFO - withTestPage: http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html" line: 0}]
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Check the current settings have a truthy printToFile for the PDF printer - 
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Check the current settings have a truthy printInColor for the PDF printer - 
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | The PDF printer has the correct outputFormat - 
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - Leaving test bound testPDFPrinterSettings
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - Entering test bound testPDFCancel
[task 2021-01-19T06:50:35.395Z] 06:50:35     INFO - withTestPage: http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html
[task 2021-01-19T06:50:35.397Z] 06:50:35     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html" line: 0}]
[task 2021-01-19T06:50:35.397Z] 06:50:35     INFO - Buffered messages logged at 06:50:29
[task 2021-01-19T06:50:35.397Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | At least one enabled form element before submitting - 
[task 2021-01-19T06:50:35.397Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Got disabled states while shown - 
[task 2021-01-19T06:50:35.397Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | All elements were disabled when showing picker - 
[task 2021-01-19T06:50:35.398Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Cancel button is still enabled - 
[task 2021-01-19T06:50:35.398Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | There is one print dialog - 
[task 2021-01-19T06:50:35.399Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | The dialog is visible - 
[task 2021-01-19T06:50:35.403Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Previous disabled states match after returning to preview - 
[task 2021-01-19T06:50:35.404Z] 06:50:35     INFO - TEST-PASS | toolkit/components/printing/tests/browser_pdf_printer_settings.js | There are no print dialogs - 
[task 2021-01-19T06:50:35.404Z] 06:50:35     INFO - Leaving test bound testPDFCancel
[task 2021-01-19T06:50:35.405Z] 06:50:35     INFO - Entering test bound testPDFFile
[task 2021-01-19T06:50:35.405Z] 06:50:35     INFO - withTestPage: http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html
[task 2021-01-19T06:50:35.407Z] 06:50:35     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html" line: 0}]
[task 2021-01-19T06:50:35.408Z] 06:50:35     INFO - Buffered messages finished
[task 2021-01-19T06:50:35.408Z] 06:50:35     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Uncaught exception - Wait for dialog to close - timed out after 50 tries.
[task 2021-01-19T06:50:35.409Z] 06:50:35     INFO - Leaving test bound testPDFFile
[task 2021-01-19T06:50:35.409Z] 06:50:35     INFO - GECKO(4315) | MEMORY STAT | vsize 3063MB | residentFast 363MB | heapAllocated 111MB
[task 2021-01-19T06:50:35.411Z] 06:50:35     INFO - TEST-OK | toolkit/components/printing/tests/browser_pdf_printer_settings.js | took 6623ms
[task 2021-01-19T06:50:35.412Z] 06:50:35     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-01-19T06:50:35.412Z] 06:50:35     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_pdf_printer_settings.js | Found an unexpected tab at the end of test run: http://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html - 
[task 2021-01-19T06:50:35.412Z] 06:50:35     INFO - checking window state
Flags: needinfo?(emalysz)
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7412605f5c47
update progress indicator string and limit how long a user has an empty document when saving a large file r=mstriemer,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Flags: needinfo?(emalysz)
Flags: qe-verify+

Moving things to 88, cause we're mostly on Proton these days…

Whiteboard: [print2020_v86][old-ui-] → [print2020_v88] [old-ui-]
Whiteboard: [print2020_v88] [old-ui-] → [print2020_v86] [old-ui-]

Hello,

Confirming this issue as verified fixed using 86.0b8(20210209185733) and 87.0a1(20210209214921) on a Windows 10x64, Ubuntu 20 and macOS 10.15.7.

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

Attachment

General

Created:
Updated:
Size: