Known errors

Error TimeoutError: Navigation timeout of 30000 ms exceeded

In Puppeteer, the error TimeoutError: Navigation timeout of 30000 ms exceeded occurs when a navigation operation to a URL exceeds the default timeout of 30,000 milliseconds (30 seconds). This error can arise due to a variety of reasons, such as network slowness, pages taking a long time to load, blocked resources, or insufficient Puppeteer settings.

Resolving the Error

You can increase the navigation timeout by using the timeout parameter in the page.goto function or by adjusting the global timeout settings:

Increase Timeout in page.goto.

await page.goto('https://example.com', { timeout: 60000 });

Adjust Global Timeout

const page = await browser.newPage();
page.setDefaultNavigationTimeout(60000);
await page.goto('https://example.com');

Last updated