New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Headless=new fails to start Chrome without sandbox #10367
Comments
This issue was not reproducible. Please check that your example runs locally and the following:
Once the above checks are satisfied, please edit your issue with the changes and we will |
Does it work with a sandbox? Note that we don't recommend running without the sandbox and, in general, there are no guarantees about stability of command line flags in Chromium. In any case, we need to report it to crbug.com but it will likely be classified as working as expected. |
Updated as I think this isn't a Puppeteer bug but rather Chrome not respecting no-SUID sandbox for the child process. But it should affect Puppeteer's adoption of that mode as the default. |
It does appear to be okay with the sandbox configured appropriately. And I am aware of the recommendation- just also aware of the current warning about headless mode=new being the new default. It is annoyingly difficult to run a sandbox mode in Kubernetes so why we avoid it for now (it's rendering our own content server-side so we have no concerns) |
Could you please report it to crbug.com (the Internals>Headless component) and post the issue here? |
I just spent the better part of a day trying to solve this very issue before ending up here. @nicknotfun were you able to figure this out? Maybe switch to a Chromium beta release or something? Or did you end up running with the sandbox? |
Unable to repro with M117. |
Chrome: Startup params:
Starting docker image locally (MacOS Ventura 13.1), no problems. Browsers start up.
Right now it's not mission critical, because we can use Chrome 115 and an older Puppeteer version with headless: true. But I'd be thankful for any pointers. |
@Schaka could you file an issue for the headless component at crbug.com including a repro for your environment? thanks. |
For anyone else stumbling across this: Chrome will NOT run in Docker using 117 and headless=new when using a readonly root-fs. You need to write to the rootfs or at least map the user folder of the user you're using to start Chrome. I don't know which parts of it exactly are the issue, but it looks like Chrome is creating a bunch of files in the home directory and some others. |
Bug expectation
I'm running Chrome without sandbox in a Kubernetes environment, after much bisection I've narrowed the issue to this:
Works.
Fails with
Bug behavior
Minimal, reproducible example
Error string
no error
Puppeteer configuration
No response
Puppeteer version
20.6.0
Node version
20.0.0
Package manager
yarn
Package manager version
1.22.19
Operating system
Linux
The text was updated successfully, but these errors were encountered: