豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

feat: support PUPPETEER_DANGEROUS_NO_SANDBOX environment variable#14756

Merged
zyzyzyryxy merged 2 commits intopuppeteer:mainfrom
NasehFaraj:feat/env-no-sandbox
Mar 18, 2026
Merged

feat: support PUPPETEER_DANGEROUS_NO_SANDBOX environment variable#14756
zyzyzyryxy merged 2 commits intopuppeteer:mainfrom
NasehFaraj:feat/env-no-sandbox

Conversation

@NasehFaraj
Copy link
Copy Markdown
Contributor

Description

This PR introduces the PUPPETEER_DANGEROUS_NO_SANDBOX environment variable. When set, it automatically appends the --no-sandbox flag to the browser's launch default arguments, provided it hasn't already been passed manually by the user in the args array.

This is particularly useful for Docker and CI environments where modifying the application code to pass --no-sandbox to every puppeteer.launch() invocation is not feasible or desirable.

Fixes #5505

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 9, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Collaborator

@zyzyzyryxy zyzyzyryxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one change requested

Comment thread packages/puppeteer-core/src/node/ChromeLauncher.ts Outdated
@NasehFaraj NasehFaraj requested a review from zyzyzyryxy March 12, 2026 10:52
@NasehFaraj
Copy link
Copy Markdown
Contributor Author

@zyzyzyryxy Hi Piotr, just a gentle ping on this PR. The requested changes were addressed last week and all CI checks are green. Let me know if there's anything else needed before merging!

@zyzyzyryxy zyzyzyryxy merged commit 2a8276e into puppeteer:main Mar 18, 2026
62 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Implement environment variable for --no-sandbox

2 participants