Closed Bug 1474006 Opened 4 years ago Closed 2 years ago
screenshot command in browser console is broken
72.03 KB, image/png
63.72 KB, image/png
59 bytes, text/x-review-board-request
48 bytes, text/x-phabricator-request
|Details | Review|
The ":screenshot" command in the browser console does not work. As you can see in the attached screenshot the tabs have no color and the content area is blank. The browser console logged an error: "Saved to /Users/cadeyrn/Downloads/Screen Shot 2018-07-06 at 22.35.37.png" [Show/hide message details.] [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/DownloadHistory.jsm :: updateMetaData :: line 130" data: no]
FWIW, using Firefox 63.0a1 (2018-07-06) on Windows 10 there is no error logged and the browser tabs do have the correct background color. Only the content area is blank, which is obviously an issue between chrome and content processes being split as noted at https://groups.google.com/d/msg/mozilla.dev.developer-tools/z2f_URkQxL0/aYZX4VK-AgAJ. Sebastian
4 years ago
Priority: -- → P3
While I totally understand that this is broken, I'm curious about why are you trying to use :screenshot from the browser console. If you want to take a screenshot of the page, you can do it from the regular web console. Is it important for you to see both the page content *and* firefox UI around it? Are you doing blogpost/communication/docs about Firefox UI/features?
> While I totally understand that this is broken, I'm curious about why are you trying to use :screenshot from the browser console. To be honest only for QA reasons and because I didn't know that it's a command for the web console and not for the browser console. :D > Is it important for you to see both the page content *and* firefox UI around it? I would not say important but a capturing of content and Firefox UI would be a really nice thing. Since the integration of Firefox Screenshots I don't need a console command at all. > Are you doing blogpost/communication/docs about Firefox UI/features? Yes! I write a lot of blog articles about all Mozilla related topics, including articles about new Firefox features. ;)
Comment on attachment 8993606 [details] Bug 1474006 - Work in progress This code shows a way to retrieve the content of the tab from the parent process by using the message manager. It requires additional work to merge this screenshot into the parent process one by using Canvas API, as well as polish and a test. As-is, this patch will replace :screenshot done from the browser console with a screenshot of the tab, but this time the screenshot is retrieve in the parent process, where the console actor runs for the browser console. It mostly highlights how to do the cross process communication via message managers in order to retrieve the missing piece of the screenshot. I'm not planning to finish this patch, so anyone is free to pick this up.
Depends on: 1686720
No longer depends on: 1686720
Fission Milestone: --- → M8
Fission Milestone: M8 → Future
Whiteboard: dt-fission-m3-reserve → dt-fission-future
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/ed5759f4e21f [devtools] Enable screenshots for Browser Console and Browser Toolbox. r=jdescottes.
No longer regressions: 1691096
You need to log in before you can comment on or make changes to this bug.