Skip to content
Puppeteer · error message

Puppeteer: net::ERR_ABORTED at <url>

Permanent - do not retryNavigation & network

Last verified

The exact message
Error: net::ERR_ABORTED at https://example.com/report.pdf

What it means

Chrome started the navigation and then cancelled it before a document was committed. page.goto() reports that as net::ERR_ABORTED. Unlike DNS or connection errors, the server may have responded perfectly; the browser simply decided not to display the response as a page.

The best-known trigger is navigating directly to a file that Chrome downloads instead of rendering, such as a PDF, ZIP or CSV served with Content-Disposition: attachment. In headless mode Chrome does not render PDFs as a page, so goto on a PDF URL aborts. Another trigger is a second navigation (a redirect in JavaScript, another goto, or a click) that replaces the first before it finishes. Request interception that calls request.abort() on the document request also produces it.

What is not wrong: the URL usually works in a normal browser, where it would start a download.

What it looks like

// Download a file using the page's session instead of navigating to it
const data = await page.evaluate(async url => {
  const res = await fetch(url, { credentials: 'include' });
  const buf = await res.arrayBuffer();
  return Array.from(new Uint8Array(buf));
}, 'https://example.com/report.pdf');
await fs.promises.writeFile('report.pdf', Buffer.from(data));

Why it happens

  • Navigating to a URL that triggers a download (PDF, CSV, ZIP, attachment headers).
  • Another navigation started before the first one committed.
  • Request interception aborted the main document request.
  • A browser extension or policy blocked the navigation.

How to fix it

  1. To download a file, fetch it instead of navigating: use page.evaluate with fetch, or read the response in Node with the page's cookies.
  2. Alternatively, configure downloads via the CDP Browser.setDownloadBehavior command and trigger the download from a link click.
  3. Remove overlapping navigations; await one goto before starting another.
  4. Check interception handlers so they never abort requests where request.isNavigationRequest() is true.
  5. If the PDF should be inspected, download it and parse it outside the browser.

How to stop it recurring

Treat file URLs as downloads, not pages. Keep a single navigation in flight per page, and keep interception rules scoped to subresources. When crawling unknown links, check the content type with a HEAD request before navigating, and route file types such as PDF and CSV to a download path instead of page.goto().

Official documentation: pptr.dev/api/puppeteer.page.goto. See all Puppeteer error messages.

Related errors

Definitions

Quick answers

What does "net::ERR_ABORTED at <url>" mean in Puppeteer?

Chrome started the navigation and then cancelled it before a document was committed. page.goto() reports that as net::ERR_ABORTED . Unlike DNS or connection errors, the server may have responded perfectly; the browser simply decided not to display the response as a page.

How do I fix "net::ERR_ABORTED at <url>"?

1. To download a file, fetch it instead of navigating: use page.evaluate with fetch, or read the response in Node with the page's cookies. 2. Alternatively, configure downloads via the CDP Browser.setDownloadBehavior command and trigger the download from a link click. 3. Remove overlapping navigations; await one goto before starting another. 4. Check interception handlers so they never abort requests where request.isNavigationRequest() is true. 5. If the PDF should be inspected, download it and parse it outside the browser.

Run browser automation you can watch and take over

Autonoly runs each job in a real cloud Chromium browser driven by Playwright. Timeouts and detached elements still happen; the difference is that you can watch the run live, see the step that failed, and take control of the browser to finish it.

Also see Live browser control.