---
title: Puppeteer Max Timeout Error - Workaround
description: In this short post I'll show how to get around the common max timeout error in Puppeteer.
date: 2020-09-23
tags: Puppeteer, Error
source: https://brianchildress.co/blog/puppeteer-max-timeout-error
---

# Puppeteer Max Timeout Error - Workaround

I've been using [Puppeteer](https://developers.google.com/web/tools/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](https://github.com/puppeteer/puppeteer/blob/v5.3.1/docs/api.md#pagegotourl-options)

The solution looks something like:

```js
const browser = await puppeteer.launch({
  headless: true,
});
const page = await browser.newPage();

await page.goto(`https://myamazingwebsite.com`, {
  waitUntil: "load",
  // Remove the timeout
  timeout: 0,
});
```
