-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cannot run Puppeteer in sandbox mode? #17
Comments
Hmm, so there is a little further down in that document some stuff about using puppeteer in docker. I assume there is some additional steps like |
I would love to support this in the action, I'll take some time today to play around with it |
I experienced the same issue where puppeteer can only launch when The configuration must therefore look like this: browser = await puppeteer.launch({
args: ['--no-sandbox'],
executablePath: process.env.PUPPETEER_EXEC_PATH, // set by docker container
headless: false,
}); There does not seem to happen any progress on #18. I suggest to add this missing information in |
Thanks for this github action, btw! It's been super useful to test a chrome extension!
I was able to get it running, but when puppeteer attempted to launch, it reported this failure:
I was able to fix this by adding the
--no-sandbox
arg, but I wondered if it is possible to run in sandbox mode.According to the sandbox part of the troubleshooting docs, it looks like perhaps the Dockerfile needs to run
sudo sysctl -w kernel.unprivileged_userns_clone=1
and then switch into a non-privileged user before it launches the puppeteer browser.I tried adding the
sysctl
command to my test script, and it appears that it works, but even so I was still unable to run without the--no-sandbox
arg.The text was updated successfully, but these errors were encountered: