question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox: Taking a screenshot with omitBackground fails [Emulation.setDefaultBackgroundColorOverride not implemented]

See original GitHub issue

Steps 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
michael-bradecommented, Jun 24, 2022

Well, it is still the case. However, the Firefox bug was closed due to low priority 😦

0reactions
drmrbrewercommented, Sep 16, 2022

@michael-brade ok thanks for letting me know… looks like this is a dealbreaker so far as using firefox is concerned 😦

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found