I’ve been using Puppeteer a lot recently for automated testing and more often for web scraping. Often times though I’ve run into a timeout error where I’ve exceeded the default 30000ms timeout when requesting a new page in the headless Chrome browser. This is really common for heavier pages that are loading a LOT of assets.
A simple workaround is to override the default timeout value, setting the new value to _0_ and passing a “waitUntil”: “load” parameter in the options object in the Puppeteer goto() method.
Documentation and Additional options
The solution looks something like:
1 | const browser = await puppeteer.launch({ |