screenshot command in browser console is broken
Categories
(DevTools :: Console, defect, P3)
Tracking
(Fission Milestone:Future, firefox87 fixed)
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: soeren.hentzschel, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-future)
Attachments
(4 files)
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]
Comment 1•5 years ago
|
||
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
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
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?
Reporter | ||
Comment 3•5 years ago
|
||
> 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 hidden (mozreview-request) |
Comment 5•5 years ago
|
||
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.
Comment hidden (spam) |
Updated•5 years ago
|
Comment 7•4 years ago
|
||
Please note that there is a new API called drawSnapshot()
which will make that work. In Marionette I call this API always from the parent process (bug 1559592), and it correctly renders the image with both the output from chrome and content included. Just note that this new API doesn't have tests yet, and as such still has some remaining issues. Therefore see the dependency list on the before-mentioned bug.
Assignee | ||
Comment 8•2 years ago
|
||
Bug 1678483 will probably fix this, and we could repurpose this bug to add a test of the :screenshot
command in the browser console (which could look very similar to what we'll do in Bug 1686720)
Assignee | ||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Tracking dt-fission-m3-reserve bugs for Fission M8 (blocking Release channel experiment, but not Beta experiment).
Comment 10•2 years ago
|
||
Moving "dt-fission-m3-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
In order to enable screenshots from the browser console and browser toolbox, we
make a small change in the simulateCameraFlash
, as the browsing context we
pass to it does not have a topFrameElement
property (so we use the top chrome window
document element instead).
We also have to register browser actors when starting the browser console so it
can have access to the screenshot actor.
A simple test is added for :screenshot
in the Browser Console.
Depends on D103613
Comment 12•2 years ago
|
||
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed5759f4e21f [devtools] Enable screenshots for Browser Console and Browser Toolbox. r=jdescottes.
Comment 13•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•