puppeteer: [Bug]: Puppeteer v22.14.0 requires --no-sandbox when running on Windows as SYSTEM

Minimal, reproducible example

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch(
// Works when adding the following args:
//    { args: ['--no-sandbox'] }
);
const page = await browser.newPage();

await page.goto('https://pptr.dev/');
await page.screenshot({ path: 'pptr.png' });

await browser.close();

Background

After trying to upgrade a longstanding project from Puppeteer v22.13.1 to v22.14.0, Puppeteer now fails to navigate to a page when running on Windows under the build-in SYSTEM account. This was observed in GitLab CI, where the typical Windows configuration for the GitLab Runner service is running under the SYSTEM account. While there was no error message indicating a sandbox-related issue, and this occurs with page.goto(), the only resolution identified so far is to launch Puppeteer with the --no-sandbox arg.

This has previously not been required in this Windows configuration (this has been run in GitLab CI for years). When logging in to the same Windows GitLab runners, the test with Puppeteer v22.14.0 runs nominally as the logged in user. It also runs nominally on Linux. But, it consistently fails in this Windows configuration with v22.14.0, but continues to run nominally when reverting to v22.13.1. All of this behavior is consistent on both Windows 11 and Windows Server 2022, and when opening local HTML files or remote URLs.

It’s unclear if this is expected or not, but checking the Chrome 127 release notes and full changelog there was not an obvious change indicating this behavior.

Expectation

The script above should run without --no-sandbox, as previous versions of Puppeteer did.

Reality

Puppeteer, running in Windows as SYSTEM, fails to navigate to a page. This behavior can be seen in the example GitLab CI job logs below:

The minimal example above fails with net::ERR_ABORTED, although the original project has also timed out with Navigation timeout of 60000 ms exceeded when running Puppeteer directly, or with the test framework (vitest) timing out on a test.

Puppeteer configuration file (if used)

Not used.

Puppeteer version

22.14.0

Node version

20.16.0

Package manager

npm

Package manager version

10.8.1

Operating system

Windows

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 22

Most upvoted comments

I think it’s worth filing it. NetworkServiceInProcess2 is not available on all platforms and AFAIK it is mostly only used for Android WebViews. I would say Chrome should probably run without it.