Printing from composition fails: Uncaught TypeError: can't access property "printWindow", PrintUtils is undefined
Categories
(MailNews Core :: Printing, defect)
Tracking
(thunderbird_esr78 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | unaffected |
People
(Reporter: thomas8, Unassigned)
References
Details
(Keywords: regression)
+++ This bug was initially created as a clone of Bug #1654548 +++
Printing composition window of Daily 81.0a1 (2020-07-30) (64-bit) seems to fail in a different way than Bug 1654548 (no response), but maybe related.
TB 78.1.0 (64-bit) is not affected.
Alice, can you confirm if this is also regressed by bug 1652627 (see your regressionwindow in Bug 1654548 Comment 4)?
Uncaught TypeError: can't access property "printWindow", PrintUtils is undefined
DoCommandPrint chrome://messenger/content/messengercompose/MsgComposeCommands.js:2567
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1012
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1157
goDoCommand chrome://global/content/globalOverlay.js:101
oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
MsgComposeCommands.js:2567:3
An error occurred executing the cmd_print command: [Exception... "[JavaScript Error: "can't access property "printWindow", PrintUtils is undefined" {file: "chrome://messenger/content/messengercompose/MsgComposeCommands.js" line: 2567}]'[JavaScript Error: "can't access property "printWindow", PrintUtils is undefined" {file: "chrome://messenger/content/messengercompose/MsgComposeCommands.js" line: 2567}]' when calling method: [nsIController::doCommand]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 101" data: yes] globalOverlay.js:104
With my patch attachment 9167489 [details] [diff] [review] from Bug 1654548 the error messages are different:
Uncaught TypeError: topBrowser.print is not a function
printWindow chrome://global/content/printUtils.js:192
DoCommandPrint chrome://messenger/content/messengercompose/MsgComposeCommands.js:2567
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1012
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1157
goDoCommand chrome://global/content/globalOverlay.js:101
oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
printUtils.js:192:16
An error occurred executing the cmd_print command: [Exception... "[JavaScript Error: "topBrowser.print is not a function" {file: "chrome://global/content/printUtils.js" line: 192}]'[JavaScript Error: "topBrowser.print is not a function" {file: "chrome://global/content/printUtils.js" line: 192}]' when calling method: [nsIController::doCommand]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 101" data: yes] globalOverlay.js:104
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
^^ ni? wrt regressionwindow per comment 1, probably already known to you
Comment 2•4 years ago
|
||
(In reply to Thomas D. from comment #0)
+++ This bug was initially created as a clone of Bug #1654548 +++
Printing composition window of Daily 81.0a1 (2020-07-30) (64-bit) seems to fail in a different way than Bug 1654548 (no response), but maybe related.
TB 78.1.0 (64-bit) is not affected.Alice, can you confirm if this is also regressed by bug 1652627 (see your regressionwindow in Bug 1654548 Comment 4)?
Yes, I got same regression window.
Comment 3•4 years ago
|
||
(In reply to Thomas D. from comment #0)
Uncaught TypeError: can't access property "printWindow", PrintUtils is undefined
DoCommandPrint chrome://messenger/content/messengercompose/MsgComposeCommands.js:2567
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1012
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1157
goDoCommand chrome://global/content/globalOverlay.js:101
oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
MsgComposeCommands.js:2567:3
I don't see how PrintUtils being undefined could be caused by the same bug (bug 1652627), even if it has the same regression range.
Looking at:
it seems that file does not import printUtils.js but uses the PrintUtils object, which looks like it would result in exactly this issue. But that's the Suite version of that file. Surely Thunderbird is using:
https://searchfox.org/comm-central/source/mail/components/compose/content/MsgComposeCommands.js
Right at the top of that file there is some sort of comment about importing printUtils.js - it's unclear to me whether those comments are some sort of preprocessing instruction that actually results in those files being imported or not though.
Comment 4•4 years ago
|
||
(In reply to Thomas D. from comment #0)
Uncaught TypeError: topBrowser.print is not a function
printWindow chrome://global/content/printUtils.js:192
DoCommandPrint chrome://messenger/content/messengercompose/MsgComposeCommands.js:2567
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1012
doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1157
goDoCommand chrome://global/content/globalOverlay.js:101
oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
printUtils.js:192:16
topBrowser.print should be calling this function FWIW (unless Thunderbird is doing something different than Firefox):
Updated•4 years ago
|
Updated•4 years ago
|
Description
•