Print preview displays blank pages for pdf documents
Categories
(Core :: Printing: Setup, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | --- | verified |
firefox82 | --- | verified |
People
(Reporter: emilghitta, Assigned: emilio)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, regressionwindow-wanted, Whiteboard: [print2020_v81] [old-ui-])
Attachments
(2 files)
5.87 MB,
image/gif
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Affected versions
- 82.0a1 (BuildId:20200903151816)
- 81.0b6 (BuildId:20200903205131)
Affected platforms
- Windows 10 64bit
- Ubuntu 18.04 64bit
- macOS 10.14
Steps to reproduce
- Launch Firefox
- Access the following link
- Click the print button.
Expected result
- The print preview successfully displays the pdf file.
Actual result
- The print preview displays a blank pdf and it cannot be printed.
Regression Window
- This seems to be a regression but I can’t reproduce this issue using mozregression (odd..) I’ll try to search for a manual regression as soon as time permits.
Additional Information
- For further information regarding this issue please observe the attached screencast.
Comment 1•4 years ago
|
||
Emil, you probably put a wrong link in comment 0.
Reporter | ||
Comment 2•4 years ago
|
||
Whoops..the correct one is http://www.dbsparks.com/research/html/SNRN02.pdf
On a second glance...I can't seem to reproduce this using latest Nightly 82.0a1 BuildId: 20200903151816 (only latest beta)...so this may have been already fixed somewhere else.
But the interesting part is that I've reproduced it while testing the opt build for https://bugzilla.mozilla.org/show_bug.cgi?id=1663053#c10 (That's Firefox 82.0a1 BuildId:20200904094341)
Comment 3•4 years ago
|
||
(In reply to Emil Ghitta, QA [:emilghitta] from comment #2)
But the interesting part is that I've reproduced it while testing the opt build for https://bugzilla.mozilla.org/show_bug.cgi?id=1663053#c10 (That's Firefox 82.0a1 BuildId:20200904094341)
That's concerning.
Reporter | ||
Comment 4•4 years ago
|
||
Just updated Nightly to 82.0a1 (BuildId:20200904094341) and this issue is reproducible.
I think that this may be considered as a blocker for this feature ?
Comment 5•4 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=00a41c5183d7b3fedd9a632cccff8d0d3b970f60&tochange=ff9fbfbe506c186bb915ebfbdcd6e7cc130b3384
Suspect : 52d0f9a901a939bbf66f90dc5004527159a0937a Emilio Cobos Álvarez — Bug 1662975 - Don't return from window.print() until the print dialog is closed. r=jwatt
Comment 6•4 years ago
|
||
Error in Browser console when click print icon:
Error while calling actor 'frameTarget's method 'attach' An attempt was made to use an object that is not, or is no longer, usable Actor.js:95:13
sendPacket@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:316:10
send@resource://devtools/shared/transport/js-window-actor-transport.js:51:25
send@resource://devtools/server/devtools-server-connection.js:99:20
sendReturn@resource://devtools/shared/protocol/Actor.js:192:16
webViewerPrint@resource://pdf.js/web/viewer.js:2184:10
dispatch/<@resource://pdf.js/web/viewer.js:3427:16
dispatch@resource://pdf.js/web/viewer.js:3414:29
_bindListeners/<@resource://pdf.js/web/viewer.js:11937:25
EventListener.handleEvent*_bindListeners@resource://pdf.js/web/viewer.js:11935:15
Toolbar@resource://pdf.js/web/viewer.js:11887:10
_initializeViewerComponents@resource://pdf.js/web/viewer.js:620:20
initialize@resource://pdf.js/web/viewer.js:443:16
async*run@resource://pdf.js/web/viewer.js:660:10
webViewerLoad@resource://pdf.js/web/viewer.js:260:36
EventListener.handleEvent*@resource://pdf.js/web/viewer.js:266:12
__webpack_require__@resource://pdf.js/web/viewer.js:42:30
@resource://pdf.js/web/viewer.js:106:18
@resource://pdf.js/web/viewer.js:109:10
Actor.js:100:15
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIObserverService.removeObserver] browsing-context.js:1026
Error while calling actor 'frameTarget's method 'attach' An attempt was made to use an object that is not, or is no longer, usable Actor.js:95:13
sendPacket@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:316:10
send@resource://devtools/shared/transport/js-window-actor-transport.js:51:25
send@resource://devtools/server/devtools-server-connection.js:99:20
sendReturn@resource://devtools/shared/protocol/Actor.js:192:16
webViewerPrint@resource://pdf.js/web/viewer.js:2184:10
dispatch/<@resource://pdf.js/web/viewer.js:3427:16
dispatch@resource://pdf.js/web/viewer.js:3414:29
_bindListeners/<@resource://pdf.js/web/viewer.js:11937:25
EventListener.handleEvent*_bindListeners@resource://pdf.js/web/viewer.js:11935:15
Toolbar@resource://pdf.js/web/viewer.js:11887:10
_initializeViewerComponents@resource://pdf.js/web/viewer.js:620:20
initialize@resource://pdf.js/web/viewer.js:443:16
async*run@resource://pdf.js/web/viewer.js:660:10
webViewerLoad@resource://pdf.js/web/viewer.js:260:36
EventListener.handleEvent*@resource://pdf.js/web/viewer.js:266:12
__webpack_require__@resource://pdf.js/web/viewer.js:42:30
@resource://pdf.js/web/viewer.js:106:18
@resource://pdf.js/web/viewer.js:109:10
Actor.js:100:15
TypeError: can't access property "watch", this._progressListener is null
_watchDocshells resource://devtools/server/actors/targets/browsing-context.js:693
_attach resource://devtools/server/actors/targets/browsing-context.js:682
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
webViewerPrint resource://pdf.js/web/viewer.js:2184
dispatch resource://pdf.js/web/viewer.js:3427
dispatch resource://pdf.js/web/viewer.js:3414
_bindListeners resource://pdf.js/web/viewer.js:11937
_bindListeners resource://pdf.js/web/viewer.js:11935
Toolbar resource://pdf.js/web/viewer.js:11887
_initializeViewerComponents resource://pdf.js/web/viewer.js:620
initialize resource://pdf.js/web/viewer.js:443
run resource://pdf.js/web/viewer.js:660
webViewerLoad resource://pdf.js/web/viewer.js:260
EventListener.handleEvent* resource://pdf.js/web/viewer.js:266
__webpack_require__ resource://pdf.js/web/viewer.js:42
<anonymous> resource://pdf.js/web/viewer.js:106
<anonymous> resource://pdf.js/web/viewer.js:109
ThreadSafeDevToolsUtils.js:82:13
InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable 2 DevToolsFrameChild.jsm:316
printing.preview_opened_tm - Cannot record the scalar in the current process.
Assignee | ||
Comment 7•4 years ago
|
||
I think I know what might be going on.
Assignee | ||
Comment 8•4 years ago
|
||
Not really a fan of this, but I can't think of a better alternative
really... Ideas welcome :)
The main issue is that in bug 1662975 we made window.print() not return
until the user has closed the print / print preview dialog (as it is
needed for some use cases). This matches other browsers, too.
We use an nsAutoSyncOperation here, in order not to violate the
run-to-completion invariants, which turns off micro-tasks, timers,
etc... However we'd still want promises inside mozPrintCallback to
resolve and such, which is a bit contradictory. It is really awkward to
have this behavior change based on whether we have a print callback...
Assignee | ||
Updated•4 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45df7207f4e1 Don't block on window.print() if there are print callbacks. r=smaug
Comment 10•4 years ago
|
||
Backed out for bc failure on browser_window_print.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/e61f214dafd2092d3fa4aa43d3127db8e93af551
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314928866&repo=autoland&lineNumber=7596
Comment 11•4 years ago
•
|
||
.
Assignee | ||
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c45d44b05da Don't block on window.print() if there are print callbacks. r=smaug
Comment 13•4 years ago
|
||
bugherder |
Assignee | ||
Comment 14•4 years ago
|
||
Comment on attachment 9174017 [details]
Bug 1663140 - Don't block on window.print() if there are print callbacks. r=jwatt,smaug
Beta/Release Uplift Approval Request
- User impact if declined: comment 0
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Behind pref, only affects the new print ui
- String changes made/needed: none
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment on attachment 9174017 [details]
Bug 1663140 - Don't block on window.print() if there are print callbacks. r=jwatt,smaug
Approved for 81.0b8.
Comment 17•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Hello,
Confirming this as verified fixed on 82.0a1 (2020-09-20) and 81.0 - pref'd on. Confirmed using Windows 10x64, macOS 10.15 and Ubuntu 20.
Description
•