Firefox: Taking a screenshot with omitBackground fails [Emulation.setDefaultBackgroundColorOverride not implemented]
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 3.0.0
- Platform / OS version: Linux Debian unstable
- URLs (if applicable):
- Node.js version: v12.16.2
What steps will reproduce the problem?
var firefox = (await puppeteer.launch({
product: 'firefox',
executablePath: '/opt/firefox/firefox',
headless: true,
devtools: false,
defaultViewport: {
width: 1000,
height: 0,
deviceScaleFactor: 2
}
}));
page = (await firefox.pages())[0];
page.goto("https://github.com");
await page.screenshot({
omitBackground: true,
path: 'screenshot.png'
})
What is the expected result?
Just take a screenshot with transparent background.
What happens instead?
An error is logged in firefox console: Emulation.setDefaultBackgroundColorOverride
And in the terminal the following is logged:
Error: Protocol error (Emulation.setDefaultBackgroundColorOverride): Emulation.setDefaultBackgroundColorOverride RemoteAgentError@chrome://remote/content/Error.jsm:25:5
UnknownMethodError@chrome://remote/content/Error.jsm:108:7
execute@chrome://remote/content/domains/DomainCache.jsm:96:13
receiveMessage@chrome://remote/content/sessions/ContentProcessSession.jsm:69:45
MessageListener.receiveMessage*ContentProcessSession@chrome://remote/content/sessions/ContentProcessSession.jsm:27:25
@chrome://remote/content/sessions/frame-script.js:12:1
at node_modules/puppeteer/lib/Connection.js:173:63
at new Promise (<anonymous>)
at CDPSession.send (node_modules/puppeteer/lib/Connection.js:172:16)
at Page._screenshotTask (node_modules/puppeteer/lib/Page.js:860:32)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- ASYNC --
at Page.<anonymous> (node_modules/puppeteer/lib/helper.js:105:23)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Firefox Screenshots doesn't work anymore, how to fix it?
Screenshots are enabled but when I select "Take a Screenshot" in the "Page actions" menu nothing happens. Screenshots are enabled but when I ......
Read more >mozilla-central: changeset 534188 ...
mach puppeteer-test -On try they appear under the `remote(pup)` symbol, but because they're -a Tier-3 class test job they're not ...
Read more >Screenshot isn't work properly since updateing to Firefox 88
When I try to screenshot and download an image it screenshots multiple images instead. My OS is Windows 10 and I'm having this...
Read more >How to Fix Screenshot Capability | Firefox Support Forum
I am using Firefox version 92. The screenshot function is not working, both if I right click and request a screenshot from the...
Read more >Mozilla Firefox Release Notes
811185, Implement Emulator class for screen orientation for Marionette ... 780920, Cannot take on-device screenshot for Apps running in OOP (calculator, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well, it is still the case. However, the Firefox bug was closed due to low priority 😦
@michael-brade ok thanks for letting me know… looks like this is a dealbreaker so far as using firefox is concerned 😦