Navigation timeout is disabled when remote debugging is enabled

Viewed 163

I saw the other sections about --remote-debugging, but in running my google cloud function I don't have that enabled. I am still getting a callback:

Unhandled error Error: Failed to launch the browser process! [0122/235916.996111:ERROR:headless_shell.cc(204)] Navigation timeout is disabled when remote debugging is enabled.

My initialization of puppeteer is:

const browser   = await puppeteer.launch(PUPPETEER_OPTIONS);
const page      = await browser.newPage();

and my PUPPETEER_OPTIONS is equal to:

const PUPPETEER_OPTIONS = {
    headless: true,
    args: [
        '--disable-gpu',
        '--disable-dev-shm-usage',
        '--disable-setuid-sandbox',
        '--timeout=30000',
        '--no-first-run',
        '--no-sandbox',
        '--no-zygote',
        '--single-process',
        "--proxy-server='direct://'",
        '--proxy-bypass-list=*',
        '--deterministic-fetch',
    ],
};

I am running node10 and using puppeteer v5.5.0, and running puppeteer within a google cloud function. I've tried taking out the '-timeout=30000', only leaving '--no-sandbox', with and without headless: true, and the error still persists.

1 Answers

I used the following puppeteer configuration with NodeJS 10 framework and it worked for me

const PUPPETEER_OPTIONS = {
  headless: true,
  args: [
    '--disable-gpu',
    '--disable-dev-shm-usage',
    '--disable-setuid-sandbox',
    '--no-sandbox',
    '--window-size=1920,1080'
  ]
};
Related