title: Puppeteer not working in headless mode with chromium
body: <p>I'm using Puppeteer 1.20.0 with Chromium-browser v74 on Raspberry pi running Raspbian 10. Using the example code from Puppeteer Github page works as expected when running Puppeteer in headless disabled, however, if I try to run it in headless mode I get this error and it crashes.</p>
  
  <blockquote>
    <p>UnhandledPromiseRejectionWarning: Error: Navigation failed because
    browser has disconnected.</p>
  </blockquote>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>const puppeteer = require('puppeteer-core');
  
  (async () =&gt; {
      const browser = await puppeteer.launch({
          args: ['--no-sandbox', '--disable-setuid-sandbox'],
          executablePath: '/usr/bin/chromium-browser',
          headless: true
      });
    const page = await browser.newPage();
    await page.goto('https://youtube.com');
    await page.screenshot({path: 'example.png'});
  
    await browser.close();
  })();
  </code></pre>
  
  <p>The same code works as expected both headless and non-headless in another Debian 10 machine. They both are running Puppeteer 1.20.0 the only difference is the Debian machine is running Google-chrome 77 whereas the Raspbian is running Chromium-browser 74.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I also tried the puppeteer-core version 1.13.0 which is the recommended version for chromium 74 but it also didn't work in headless mode.</p>