Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Next.js and React

Puppeteer's page.goto() rejects because Chrome dropped the navigation

Your error

Error: net::ERR_ABORTED at http://localhost:8090/test1 more line it can show

Fix it fast

Most common cause, 1 of 2

The URL answers 204 No Content or 205 Reset Content

Stop treating the endpoint as a navigation.

Fix
const [response] = await Promise.all([
  page.waitForResponse(res => res.url() === targetUrl && res.status() === 204),
  page.click('#trigger'),
]);
console.log(response.status());

// direct call to a URL that may return 204:
const [res] = await Promise.all([
  page.waitForResponse(targetUrl),
  page.goto(targetUrl).catch(() => null),
]);
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

Error: net::ERR_ABORTED at <url> from page.goto() means Chrome abandoned the navigation instead of showing a page. Two cases are confirmed in Puppeteer's tracker: the server answered 204 No Content (or 205), which browsers must not navigate to, or the URL turned into a file download. Wait with page.waitForResponse(), or configure downloadBehavior. Applies to Puppeteer 25.

  • Applies to Puppeteer 25.18.1 (page.goto, waitForResponse, downloadBehavior)
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Request the same URL with curl, outside the browser, and read its status code plus the Content-Disposition and Content-Type headers. A 204 or 205 status points to cause 1. An attachment header, or a type the browser does not render as a page, points to cause 2.

Run this first
curl -sI https://example.com/report | grep -iE "^HTTP/|^content-(type|disposition)"

Then find the line you see in this list and open its fix:

  1. 1The URL answers 204 No Content or 205 Reset Contentcurl shows HTTP/1.1 204 or 205, and the endpoint is an API action rather than a page
  2. 2The URL starts a file download instead of loading a pagecurl shows Content-Disposition: attachment, or a type such as a font, archive or binary file, and the error appears only on that link

What does the error look like?

  • Error: net::ERR_ABORTED at http://localhost:8090/test
  • Error: net::ERR_ABORTED at https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/fonts/glyphicons-halflings-regular.eot

Cause 1 of 2

The URL answers 204 No Content or 205 Reset Content

You seecurl shows HTTP/1.1 204 or 205, and the endpoint is an API action rather than a page

Check

net::ERR_ABORTED after a 204 is the browser following the rules. A Puppeteer maintainer closed the tracking issue as working as intended in October 2026: the WHATWG HTML standard says a navigation that receives 204 or 205 must be abandoned and the current document kept. page.goto() therefore never gets a page to resolve with.

Check
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8090/test

Fix

Stop treating the endpoint as a navigation. When a click or form submit calls it, wait for the response instead of a navigation. When you only need to hit the URL, catch the goto rejection and keep the response you waited for.

Fix
const [response] = await Promise.all([
  page.waitForResponse(res => res.url() === targetUrl && res.status() === 204),
  page.click('#trigger'),
]);
console.log(response.status());

// direct call to a URL that may return 204:
const [res] = await Promise.all([
  page.waitForResponse(targetUrl),
  page.goto(targetUrl).catch(() => null),
]);

Verify

The script logs 204 and carries on, with no unhandled ERR_ABORTED rejection.

Verify
node script.mjs

Confirmed by github.com

Did this fix it?

Cause 2 of 2

The URL starts a file download instead of loading a page

You seecurl shows Content-Disposition: attachment, or a type such as a font, archive or binary file, and the error appears only on that link

Check

When the response is a file that Chromium saves instead of rendering, it turns the navigation into a download and reports the page request as failed, so page.goto() rejects with net::ERR_ABORTED. A Puppeteer contributor explained that this comes from how Chromium handles such downloads internally and cannot be worked around on the Puppeteer side. The page.goto reference adds that headless shell mode cannot navigate to a PDF document.

Check
curl -sI https://example.com/files/report.zip | grep -i "^content-disposition"

Fix

Let the browser save the file: set downloadBehavior with policy allow and a downloadPath when you launch, then start the download by clicking its link on a normal page rather than passing the file URL to goto. If no browser session is needed, download the URL with fetch() in Node instead.

Fix
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  downloadBehavior: { policy: 'allow', downloadPath: '/tmp/downloads' },
});
const page = await browser.newPage();
await page.goto('https://example.com/files');
await page.click('a#report-download');

Verify

The file appears in the downloadPath folder and the script no longer stops on ERR_ABORTED.

Verify
ls -l /tmp/downloads

Confirmed by github.com

Did this fix it?

How do I stop it coming back?

  • Keep API calls that return 204 out of page.goto(); test them with fetch() or page.waitForResponse() instead.
  • Set downloadBehavior once in the launch options of every scraper that may meet attachments, with a known downloadPath per job.
  • Log the status and Content-Disposition of each URL before navigating in crawlers, so non-page responses are routed to a download path.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.