Closed Bug 1181630 Opened 10 years ago Closed 10 years ago

[e10s] Printing doesn't work in e10s mode when no printers installed (in Print & Scan system pref panel)

Categories

(Core :: Printing: Output, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
e10s m8+ ---
firefox42 --- fixed

People

(Reporter: smichaud, Assigned: mconley)

References

Details

(Whiteboard: [better description and STR in comment #18])

Attachments

(2 files)

Testing on OS X 10.11 (El Capitan) Beta 2 (build 15A204h), with today's mozilla-central nightly, printing doesn't work with e10s on. If you try to print a page with web content, you see a Printer Error dialog. If you try to print a page without web content (like the Preferences page), the menu flashes and nothing happens.
This probably has nothing to do with the content process sandbox. It happens even if you set security.content.sandbox.level to '0' (which makes the content process use an "allow everything" sandbox ruleset).
This bug also happens in today's aurora (Developer Edition) nightly, with e10s on.
Does it also happen with the new released El Capitan Beta 3 (15A216g)?
> Does it also happen with the new released El Capitan Beta 3 (15A216g)? Yes, it does :-(
Any errors in the Browser Console?
Flags: needinfo?(smichaud)
Oddly, I get almost exactly the same errors (in the browser console) with e10s off (where printing works) as with e10s on: Doing cmd-p (to show the Print dialog) on a page with web content, with e10s off (print dialog appears): [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIPrintSettingsService.defaultPrinterName]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://global/content/browser-content.js :: getPrintSettings :: line 428" data: no] browser-content.js:439:0 TypeError: printSettings is null browser-content.js:503:1 Doing cmd-p (to show the Print dialog) on a page with no web content, with e10s off (print dialog appears): [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIPrintSettingsService.defaultPrinterName]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://global/content/browser-content.js :: getPrintSettings :: line 428" data: no] browser-content.js:439:0 In Printing:Print:Done handler, got unexpected rv 2147500037. browser-content.js:493:0 TypeError: printSettings is null browser-content.js:503:1 Doing cmd-p (to show the Print dialog) on a page with web content, with e10s on (Printer Error dialog appears): [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIPrintSettingsService.defaultPrinterName]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://global/content/browser-content.js :: getPrintSettings :: line 428" data: no] browser-content.js:439:0 In Printing:Print:Done handler, got unexpected rv 2147500037. browser-content.js:493:0 TypeError: printSettings is null browser-content.js:503:1 Doing cmd-p (to show the Print dialog) on a page with no web content, with e10s on (Printer Error dialog appears): [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIPrintSettingsService.defaultPrinterName]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://global/content/browser-content.js :: getPrintSettings :: line 428" data: no] browser-content.js:439:0 In Printing:Print:Done handler, got unexpected rv 2147500037. browser-content.js:493:0 TypeError: printSettings is null browser-content.js:503:1
Flags: needinfo?(smichaud)
Forgot to mention that there's nothing interesting in the system console.
For my comment on the last log snippet in comment #6, I should have said "(menu flashes)" instead of "(Printer Error dialog appears)".
I should mention that I don't have any printer installed (in the Print & Scan system pref panel). That may explain the errors I reported in comment #6. And in any case they're probably unrelated -- since they happen with or without the bug.
Ah, this then might be a dupe of bug 1171550. If you install a printer (even a software one will do), does it print correctly?
Flags: needinfo?(smichaud)
Yup, just installed a printer and now printing works fine (from a page with web content). And page-without-web-content case turns out to be unrelated -- the Print dialog doesn't show up for such pages (like the Preferences and about:config pages) even on other versions of OS X. I'll spin off another bug once I've investigated further ... if one hasn't already been opened. The printer doesn't have to be on, by the way. And the errors from comment #6 still show up -- so I assume they're spurious, or at least harmless.
Flags: needinfo?(smichaud)
Severity: major → normal
I don't know whether bug 1171550 really is a dup. I've only seen the Printer Error dialog on OS X 10.11. I Print : Save as PDF quite often, and I generally don't have any printers installed in the Print & Scan system pref panel (even though I now actually do have a physical printer).
Actually I'm now pretty sure bug 1171550 *isn't* a dup -- it doesn't report the Printer Error dialog, only the (same) browser console errors.
> I've only seen the Printer Error dialog on OS X 10.11. Spoke too soon. I've just seen the Printer Error dialog on OS X 10.8.5 (after I deleted my printer from the Print & Scan system pref panel).
Summary: [e10s][10.11] Printing doesn't work on OS X 10.11 in e10s mode → [e10s][10.11] Printing doesn't work in e10s mode when no printers installed (in Print & Scan system pref panel)
Changed my mind again: Bug 1171550 should probably be duped to this bug. As confusing as this bug now is, it has *much* better (and fuller) information than bug 1171550.
Sounds like this affects other versions of OS X as well.
Summary: [e10s][10.11] Printing doesn't work in e10s mode when no printers installed (in Print & Scan system pref panel) → [e10s] Printing doesn't work in e10s mode when no printers installed (in Print & Scan system pref panel)
Assignee: nobody → mconley
I'll rewrite the bug description to help avoid confusion: If you try to print a page with web content in e10s mode and you have no printers installed (in the Print & Scan system pref panel), printing doesn't work. Even the Print dialog doesn't appear -- instead you get a Printer Error dialog. The bug doesn't happen with e10s off. A number of errors appear in the browser console when you try to print (see comment #6). But they're unrelated, and probably spurious. You seen them whenever you print (successfully or unsuccessfully, with e10s off or on). It's also not possible to print a page without web content (for example the Preferences or about:config pages). No dialog appears when you do this (and sometimes the menu flashes). But this, too, is unrelated -- it happens with or without e10s. I'll open another bug on this shortly.
Whiteboard: [better description and STR in comment #17]
Whiteboard: [better description and STR in comment #17] → [better description and STR in comment #18]
Thanks Steven!
You're most welcome, Mike. And thanks for taking this bug! :-)
> It's also not possible to print a page without web content (for > example the Preferences or about:config pages). No dialog appears > when you do this (and sometimes the menu flashes). But this, too, > is unrelated -- it happens with or without e10s. I'll open another > bug on this shortly. The bug already exists, and is *ancient* -- bug 102485. Older versions of Firefox used to display the following error message when you tried to print pages "without web content": "Printing XUL documents is not supported." But, very unfortunately, bug 965693 got rid of this error message, instead of replacing it. So now the menu just flashes :-(
Bug 1181630 - Do not fail out if there are no registered printers when printing with e10s on OS X. r?mstange. We were being overly cautious, and returning NS_ERROR_FAILURE if the printer name passed up from the content process didn't map to an existing system printer. The problem with that is that sometimes there are no registered printers. In that case, we just need to not set the printer in the NSPrintInfo. So in the event that we cannot find a printer with the name that the child sent up, we just leave the printer and printer name fields on the NSPrintInfo blank.
Attachment #8637344 - Flags: review?(mstange)
Attachment #8637344 - Flags: review?(mstange) → review+
Comment on attachment 8637344 [details] MozReview Request: Bug 1181630 - Do not fail out if there are no registered printers when printing with e10s on OS X. r?mstange. https://reviewboard.mozilla.org/r/13843/#review12715 Ship It!
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/b44a29e2044c60f5409c56d5767d5a1ff2dd8108 changeset: b44a29e2044c60f5409c56d5767d5a1ff2dd8108 user: Mike Conley <mconley@mozilla.com> date: Wed Jul 22 14:21:39 2015 -0400 description: Bug 1181630 - Do not fail out if there are no registered printers when printing with e10s on OS X. r=mstange. We were being overly cautious, and returning NS_ERROR_FAILURE if the printer name passed up from the content process didn't map to an existing system printer. The problem with that is that sometimes there are no registered printers. In that case, we just need to not set the printer in the NSPrintInfo. So in the event that we cannot find a printer with the name that the child sent up, we just leave the printer and printer name fields on the NSPrintInfo blank.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
No longer blocks: el-capitan
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: