chromium: [BUG] Timed out while waiting for the WS endpoint URL to appear in stdout!

Environment

  • chromium Version: 118.0.0
  • puppeteer-core Version: 21.4.1
  • Node.js Version: 16.x
  • Lambda / GCF Runtime: nodejs16

Expected Behavior

No errors and runs as expected running on AWS Lambda

Current Behavior

We sometimes get this error

#TimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout! at ChromeLauncher.launch (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:149:23) at async parseHTMLToPDF (/var/task/index.js:66:21) at async Runtime.exports.handler (/var/task/index.js:128:21)

Steps to Reproduce

Unable to reproduce all the time, it seems to be random, this is the code it errors at, specifically on const browser.

async function parseHTMLToPDF(html) {
    const browser = await puppeteer.launch({
        executablePath: await chromium.executablePath(),
        args: chromium.args,
        defaultViewport: chromium.defaultViewport,
        headless: chromium.headless,
    });
    const page = await browser.newPage();
    await page.setContent(html);
    const pdf = await page.pdf(pdfParams);
    await browser.close();

    return pdf;
}

Possible Solution

I am thinking whether it might be multiple run times at the same time. I initially had it at 30 seconds timeout for the whole lambda which ran fine on the old chromium method before upgrading to yours following a forced change from nodejs12 which meant we couldn’t revert back to it and saw that this is the only repo working so I did the conversion following your npm help. I saw these timeout issues so tried increasing to 3 minutes but to no avail.

This does not seem to occur all the time and anyway of replicating the failure each and every time has not worked for me.

Your input would be greatly appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Thanks @Sparticuz I cannot update the plugin yet as we are coming to a change freeze but I’ve done a dumpio:true just to see if it shows anything the next time it errors.

It seems to occur in clusters and then nothing for a few days, so I am just waiting and seeing what is going on. I shall certainly try your updated plugin asap though.

Many thanks for your support.