puppeteer: Chrome Headless doesn't launch on Debian
Running this example code from the README:
const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({path: 'example.png'});
browser.close();
})();
I get the following error output:
(node:30559) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to connect to chrome!
(node:30559) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Platform info:
% uname -a
Linux localhost 3.14.0 #1 SMP PREEMPT Thu Jul 13 12:08:15 PDT 2017 x86_64 GNU/Linux
% lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch
% node --version
v8.1.1
% cat package.json
{
"dependencies": {
"puppeteer": "^0.9.0"
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 101
- Comments: 198 (49 by maintainers)
Commits related to this issue
- Add workaround step to use puppeteer at Debian See below references - https://github.com/GoogleChrome/puppeteer/issues/290 - https://github.com/GoogleChrome/puppeteer/pull/311 - https://github.com/Qu... — committed to taehwanno/jest-image-snapshot-example by taehwanno 7 years ago
- Add workaround step to use puppeteer at Debian See below references - https://github.com/GoogleChrome/puppeteer/issues/290 - https://github.com/GoogleChrome/puppeteer/pull/311 - https://github.com/Qu... — committed to taehwanno/jest-image-snapshot-example by taehwanno 7 years ago
- Add workaround step to use puppeteer at Debian See below references - https://github.com/GoogleChrome/puppeteer/issues/290 - https://github.com/GoogleChrome/puppeteer/pull/311 - https://github.com/Qu... — committed to taehwanno/jest-image-snapshot-example by taehwanno 7 years ago
- Add workaround step to use puppeteer at Debian See below references - https://github.com/GoogleChrome/puppeteer/issues/290 - https://github.com/GoogleChrome/puppeteer/pull/311 - https://github.com/Qu... — committed to taehwanno/jest-image-snapshot-example by taehwanno 7 years ago
- :wrench: For docker https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- :wrench: Use Docker GoogleChrome/puppeteer » Chrome Headless doesn't launch on Debian » Issue #290 https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- :wrench: Use Docker GoogleChrome/puppeteer » Chrome Headless doesn't launch on Debian » Issue #290 https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- :wrench: Use Docker GoogleChrome/puppeteer » Chrome Headless doesn't launch on Debian » Issue #290 https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- :wrench: Use Docker GoogleChrome/puppeteer » Chrome Headless doesn't launch on Debian » Issue #290 https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- :new: Use Docker GoogleChrome/puppeteer » Chrome Headless doesn't launch on Debian » Issue #290 https://github.com/GoogleChrome/puppeteer/issues/290 — committed to quanon/jmotto.js by quanon 7 years ago
- add launch args. via: https://github.com/GoogleChrome/puppeteer/issues/290 — committed to noriaki/svod by noriaki 7 years ago
- fix: trying to get the app running on heroku, following tips from https://github.com/GoogleChrome/puppeteer/issues/290 — committed to lassediercks/printme by lassediercks 7 years ago
- Disable sandbox mode to fix Heroku rendering. https://github.com/GoogleChrome/puppeteer/issues/290 — committed to alvarcarto/url-to-pdf-api by kimmobrunfeldt 7 years ago
- Disable sandbox https://github.com/GoogleChrome/puppeteer/issues/290 — committed to jakub300/generator-chisel by jakub300 7 years ago
- Adding --no-sandbox option to chrome headless to fix chrome crash on travis Reference - https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322851507 — committed to okta/okta-oidc-tck by vijetmahabaleshwar-okta 6 years ago
- Adding --no-sandbox option to chrome headless to fix chrome crash on travis Reference - https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322851507 — committed to okta/okta-oidc-tck by vijetmahabaleshwar-okta 6 years ago
- Disable sandbox https://github.com/GoogleChrome/puppeteer/issues/290 — committed to jakub300/generator-chisel by jakub300 7 years ago
- install packages required by chromium https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-395818983 — committed to uktrade/directory-periodic-tests by kowalcj0 6 years ago
- use correct debian package names https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322838700 — committed to uktrade/directory-periodic-tests by kowalcj0 6 years ago
- install all debian requirements for chromiun https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322838700 — committed to uktrade/directory-periodic-tests by kowalcj0 6 years ago
for the dockerisers amongst us - i’ve launched successfully with this setup:
The action to resolve this (which I’m working on now) is getting a list of all the required dependencies to run Chromium. Straight from the Debian the requirements are below. Documenting this for a PR shortly.
Dependencies for debian
This should be solved with the ‘–no-sandbox’ flag:
Can’t launch the local chrome:
I should have mentioned that this is a headless machine that I’m ssh’d into. Given that this is for headless Chrome, I assume that scenario is still supported?
It’s worth considering adding both
--no-sandbox --disable-setuid-sandbox
to the default flags on linux.In chrome-launcher/lighthouse we’re already including
--disable-setuid-sandbox
and plan to add--no-sandbox
soon for this reason.sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
For some reason I was missing the
libxcb-dri3.so.0
shared lib (I installed every packages mentioned in the troubleshooting guide previously). On Puppeteer3.0.1
.Fixed by adding the libxcb-dri3-0 package.
I don’t know if it an isolated issue, if future readers have the same problem, it may be added to the packages list.
Works perfectly on ubuntu xenial - no gtk - remote - ssh - non root Linux ip---- 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Ubuntu Xenial
update sudp apt-get update node v8.4.0
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
Install npm
sudo apt-get install npm
Install puppeteer
npm i puppeteer
Installed all the dependencies
sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
pass this to launch ({args: [‘–no-sandbox’, ‘–disable-setuid-sandbox’]}
running as non root
Works perfectly.
On Ubuntu 18.04 we had to install these:
Strangely enough, on CentOS 7.4.1708 we just had to install:
Still no luck w/ those two flags:
Same warning when just with
--no-sandbox
In my opinion this isn’t solved - the libraries should be delivered with puppeteer and work out of the box.
I have always strongly urged people to never turn off the sandbox without a good cause, even in tests. It is a major part of the security system from what I understand.
I’m setting up a squeaky clean and fresh Debian VM to run some install steps in. We should be able to have it well documented how to get it operating without compromising system security.
I recall PHPStorm for example having an issue where it was serving on localhost, so a remote code execution exploit was opened up for any site including code that would look for the port in use and take advantage of a flaw in that server. Let’s not open people up to security issues by disabling the sandbox here. Where they could be visiting any number of sites including code that looks for exploits to abuse.
This may or may not be helpful…
I run Electron in a Docker instance on Docker Cloud.
I run this command:
and my Dockerfile contains the following commands to install dependencies:
It doesn’t work out of the box, that’s the issue. And there’s zero decent documentation that’s straight forward in the Install instructions in the README. Also, these options didn’t even work and this thread has 100’s of comments. I think it’d be appropriate to post a comment here and lock the issue/thread.
@campbecf @danielsantiago I’ve hacked together a fork of Heroku’s Chrome buildpack that appears to work with Puppeteer.
heroku buildpacks:add https://github.com/mikeraimondi/heroku-buildpack-google-chrome
.{ args: ['--no-sandbox'] }
is required in the call tolaunch()
try this code on ubuntu server. i’m ok.
I run into this problem trying to use puppeteer in Heroku
Shoot @earshinov you were right, I missed the 1 when trying to install it. I ran
sudo apt-get update
sudo apt-get install libgbm1
and now everything works. Thanks for the help!Running into the problem using Windows Subsystem for Linux (WSL), as the “emulated” kernel doesn’t support namespacing, and its not possible to upgrade the kernel. No combination of flags seemed to work, I switched to native Node.js on Windows and everything works fine.
Hopefully this helps everyone running Debian.
The following works for me on Debian Jessie (without disabling sandbox!).
Check for missing dependencies with
ldd /path/to/puppeteer/chrome | grep not
For me on Debian Jessie I had to install this:
sudo apt-get install -y libatk-bridge2.0-0 libgtk-3-0
See full list of documented dependencies here: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launchcat /boot/config-$(uname -r) | grep CONFIG_USER_NS
sudo su; echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/00-local-userns.conf; service procps restart
@aymather , try installing
libgbm
instead oflibgbm.so.1
. It takes 1 minute to google: https://packages.ubuntu.com/search?lang=hu&suite=bionic&arch=any&mode=filename&searchon=contents&keywords=libgbm.so.1For anyone experiencing the same
NaCl helper process running without a sandbox
error with the sandbox flags and all of the proper dependencies - make sure you aren’t accidentally running withheadless: false
. Running with that parameter gave me the same error (totally didn’t take me an hour to figure it out 🙃)Already have that installed, perhaps a different package is needed?
The package is actually named
libgbm1
(I made a typo). Did you try installing that as well (andapt-get update
before installing just in case)?Haha, but how do I write the list if I can’t copy and paste ? That was my question 😉 In fact, I ended up using an ssh server and connecting to it from another machine just to copy and paste things more easily !
Doing both of the following fix it for me
Installing following dependencies (thanks @zhaopengme )
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
launching in no sandbox mode
Error message: Screenshot failed Error: Failed to launch chrome! puppeteer/.local-chromium/linux-
/chrome-linux/chrome: error while loading shared libraries: libX11 : cannot open shared object file: No such file or directory
Solution: To get Chromium screenshots working on Ubuntu 16.04 I had to install the missing libx11 package plus several others which I determined by trail and error. Ultimately installed all these: (command line:
sudo apt install <name>
)I finally get it work on centos 7.3.
To run chromium from command line, you should add
--headless
to prevent GUI related error, like this:That’s interesting. Could you please:
node_modules/puppeteer/.local-chromium
)dumpio
flag to thepuppeteer.launch
) and check what’s in the stderr:Hi folks, I’m running an AWS EC2 instance with Ubuntu and I can’t get it to work with or without sandboxing.
With
args: ['--no-sandbox', '--disable-setuid-sandbox'],
:Without
args: ['--no-sandbox', '--disable-setuid-sandbox'],
…And that’s it.
I’ve confirmed that all my dependencies are installed and Chrome appears to work from the command line. The configuration of Chrome itself came from
yarn install puppeteer
.Tried running
node_modules/puppeteer/.local-chromium/linux-674921/chrome-linux/chrome -v
as @fortes did above, but this produced no console output. The same with--help
instead of-v
produced: “No manual entry for chrome”.It is now 5 in the morning so I think I’d better tap out, but any direction as to what I can test would be deeply appreciated.
apt-get install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
Please try above command for installing all dependencies.
Using an external build is already detailed in the api docs and in the main README under Default Runtime Settings. I don’t think we need to go adding that anywhere else for the time being.
IMO a Docker image while nice, should be something internally waited on until after a stable tag. Right now we should focus on the issues with getting it running directly on machines. Improve this experience. And then once we are stable, we can assess how to best provide a docker image for people to use.
headless exists to not need
xvfb
to virtualize the X instance for Chrome. Since it is all done in software internally.In addition to libxcb-dri3-0, as @rigwild pointed out, I had to also:
apt-get install libgbm1
It was also not working for me on Debian.
This is what solved the problem for me: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
I had to enable the user namespace cloning:
sudo sysctl -w kernel.unprivileged_userns_clone=1
Hi,
I am on Debian 10 (Buster) and I have followed this recommended solution to make it :
sudo sysctl -w kernel.unprivileged_userns_clone=1
@Garbee I personally had to use a Docker image for my application to work and after trying many of the images I found on the internet none of them simply “just work” without installing extra dependencies to the system libs.
If someone knows of a Docker image that runs Puppeteer out of the box, I would be thrilled to know what it is.
I agree with @egoroof. If this was an edge case OS, I’d say close it - but this affects Windows users with WSL and Ubuntu (and other Debian) users. That’s a huge base of users that need to troubleshoot.
Here’s a neat alternative to copy-pasting the dependency list:
Probably doesn’t cover all edge cases, but at least removes the hardcoding. Tested on
node:10
image.Just in case, Chromium’s dependencies don’t cut it, unfortunately, so can’t get by with
apt-cache
.Not sure if either of you can/want to use docker to do the provisioning, but I’ve open-sourced all the work to running on linux here.
I don’t see anything in the README for puppeteer that tell you about this.
npm install puppeteer
does not leave you with a working chrome, as you’d expect it to (and as the README implies it will).Hmm that is unfortunate. 🤔
How about providing a Docker image or something like that with the correct libs preinstalled? Would that be feasible?
Addendum: Thanks a lot for the info @JoelEinbinder - I couldn’t run it on my machine, either, so I installed
=www-client/google-chrome-unstable-62.0.3178.0
(on Gentoo GNU/Linux). I am running a grsec kernel, which is known to break the Chrome sandbox.So I pass
options
tolaunch()
:I would add this to the docs, but I’m unsure where to put it. I just signed up for the CLA. Can anyone guide me there?
Ah yea, that’s it. Your box host is messing you up. It has a very old Kernel. Debian 9 ships with
4.9.0-3
and you’re running3.14.0
. So the security features of the kernel are extremely different. So, you may be in a case where you need to fallback to using the older file-based sandbox to have some level of security.Although, in all honesty… Upgrade the kernel or get a host that doesn’t keep you back. It’s very important that the kernel gets updated for the best security and you’re being left vulnerable.
The command to install deps has been posted at least half a dozen times now.
Please DO NOT post the packages to install again. They are located in the troubleshooting guide and are here plenty. If you find an error in the package list, please submit a pull request to address that issue.
Works fine on Ubuntu 18.10 after manual installation of the following packages:
To resolve sandbox security issue, the server
sysctl
needs to havekernel.unprivileged_userns_clone=1
flag enabled.For other issues, make sure all required dependencies are installed from this list.
thats resolve my problem. OS -
Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux
npm -5.3.0
node -v8.4.0
echo 1 > /proc/sys/kernel/unprivileged_userns_clone
(work untill reboot, i guess)node example.js
description
P.S. for ubuntu kernel:
source
I’ve installed those and can now run
chrome --help
. However, if I try to runchrome -v
, I get the following:I’m disappointed that installing X-related dependencies are the most upvoted answers. Chrome Headless is made to avoid that dependency so it sounds like a terrible workaround.
PR #311 is open to start looking at expanding the install script to make it much more interactive and friendly to help catch installation problems. You can check the code out from that PR and give it a spin. Please report on the PR of any problems you face or things you think could improve the flow.
@Garbee awesome. This stuff isn’t my strong suit.
I’m going to attempt to replace the Electron usage with puppeteer, so hopefully this will simplify our environment.
You are the best dude. Thank you !
I arrived here from the
troubleshooting.md
page, recommended due to theELF: not found
puppeteer startup error, on Raspbian Buster. In the end I found a good-enough solution in usingpuppeteer-core
withchromium
(as described here):This helped me test pdf generation with non-english fonts.
@CoVoCre If you use the list in the troubleshooting guide (or most of them here that are a single line.) They’ll all install with just copy and pasting the command. So no, you don’t need to copy every single one manually to install. A simple
apt-get install {pack1} {pack2} ...
works just fine.Am I seriously supposed to copy every one of those packages by hand ?!?!?! Is there no smarter way ?
Has anyone worked around this problem in the CircleCI pre-build Docker images? I can use --no-sandbox but would prefer a proper fix.
Maybe it can help someone , but for me on debian 9 I had to enable namespace in kernel : Enable user namespaces in Debian kernel echo 1 > /proc/sys/kernel/unprivileged_userns_clone
Just add this to your Dockerfile
This will install Chromium with all the necessary dependencies and then we let Puppeteer know that it doesn’t need to re-download Chromium.
Then in your code, launch Puppeteer like so
@mrbar42 for president!!
If it helps, I followed the advice found in the URL given in the error message (https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md) and changed the file “chrome_sandbox” so that it was owned by root and had setuid set. Now the sandbox error is gone and chrome launches. To summarize:
Why is @coldner’s comment not in the docs? Thanks
For CentOS 7.4, kernel 3.10.0-693.5.2 (I’m running on VirtualBox):
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
No, this would be wrong and a security risk. The proper solution is to enable the sandboxing in your OS:
Run
echo 1 > /proc/sys/kernel/unprivileged_userns_clone
as root and addkernel.unprivileged_userns_clone=1
to/etc/sysctl.conf
. This works on debian, may be different on other distributions.We really need this documentation for required options to run added to the README in an “Ubuntu/Debian/Linux” section:
I anticipate a lot of users don’t know to search GitHub issues for this issue, therefore can’t find this thread, and are then not using this package because “it doesn’t work”.
Edit: I didn’t even see https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-fails-due-to-sandbox-issues at first despite it being in the warning error message:
I think putting this in the Install section would be appropriate to prevent people from wasting so much time here with this.
Edit: These options didn’t work, see my comment below https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-335793154
doesn’t seem to work on nixos even with all the solutions above. dumpio shows no output 😦
@jasondonnette I just got it running on Heroku an hour ago or so.
I used the google chrome buildpack even though it downloads Chrome in addition to just installing the dependencies. It’s probably a little more bloat than the absolute bare minimum (since
puppeteer
downloads it’s own chromium…) but it works without any extra effort on my part.EDIT: I am using the two flags also…
Don’t use untrusted, prebuilt binaries. Use the trusted package from your distro: https://packages.debian.org/stretch/chromium
Install it and then you can run
chromium --headless
. Puppeteer should also use it instead of bloating your home directory.I think in the case of Debian systems you still need https://packages.debian.org/sid/libx11-xcb1 to run headless. That way the system has some of the API calls it needs to to do the rendering calculations.
This worked even for node 14.17. Thank you so much for the help @mrbar42 . This did not, however, work for node 16.8
Hi, when I try to run it, in my debian, I have this:
Do you have any idea on how to solve it?
Thank you
@AtiqGauri I have also got some shared library missing error on CI. Installing all fonts, libraries explicitly helped resolve the issue.
I have used this as a reference.
https://github.com/puppeteer/puppeteer/blob/main/.ci/node10/Dockerfile.linux
Hey @earshinov sorry I left that out on accident. I already tried that with
sudo apt-get install libgbm
and got this same response:I’ve managed to get libx11 installed on Ubuntu 18 via Docker but for some reason Puppeteer doesn’t seem to be utilizing it. When I initialize my node app do I need to run it within x11 or is it sufficient to just install the live and run the node app that’s depending on Puppeteer?
Also I have no-sandbox enabled. Matter of fact these are the arguments I’m passing in:
Anyone have a similar issue? PS I’m running this on a microdevice (Odroid XU-4 which has no video out ability).
@dkommineni Yes, I have the issue resolved.
Basically you are missing dependencies when you are using CF. Then you will face a second issue once you install the dependencies. That issue is that Puppeteer needs to be ran with options passed to it.
There is a solution you could use if you have control over the CF environment you are deploying to. I was deploying to a large company and did not have control.
If you have control, you could install the missing dependencies into your CF environment with this,
If you are like me and do not have control, you can take 3 steps to solve this issue.
Put the project in a Docker image.
Update the code to pass options to Puppeteer
Deploy the Docker image to CF
You will find 100 examples of Dockerfiles on line and none of them worked for me. The way I finally got the Dockerfile right was using this,
You will need to make sure you update the Dockerfile to have the correct values for port, host and start command. That is up to you and your deployment.
The second thing I had to do was change puppeteer to launch like this,
Originally I was launching it like this which will not work on Debian using the Dockerfile mentioned above,
At that point I was able to create the Docker Image and test that Puppeteer was working on my localhost inside of the Docker Image. Once I could see that it was working, I deployed the Docker Image to CF and it worked like a charm on my first try.
This took me 3 or 4 days to figure out AFTER I had failed for a week to get it to work in CF without Docker. I truly hope this helps a ton of people.
i did this as a workaround
ln -s /mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe node_modules/puppeteer/.local-chromium/linux-515411/chrome-linux/chrome
to get it working on windows linux subsystem (wsl)Hello there,
I’m still struggling in trying to make things work on Ubuntu 16.04 Server. I have installed all @coldner 's dependencies and here’s the result:
Running as root:
Running as non-root:
As you can see, it will only work as root, with the --no-sandbox flag. I have also tried with
chromium-browser
, same result.Any ideas?
Thank you, Ben
@joelgriffith looks really interesting! Let us know when that goes out.
One word of caution are the Chrome logos on the site. Distorting, changing it’s orientation, etc. is technically against the brand trademark usage. The colored line versions are probably ok if you made those, but I’d be cautious about the altering the official logo.
It’s not a work around. Chrome requires these things to operate. The API calls to them still need to be made even to emulate the environment.
thanks, it work perfectly @girishpatil
Same on Debian GNU/Linux 8. node.js v6.11.2 Works without sandbox…
@Garbee that list of dependencies wasn’t sufficient. It was missing
libcairo-gobject2
at the very least.Adding
libcairo-gobject2
to the list may have solved it, but I found the buildpack to be a more palatable solution that required less configuration on my end.https://github.com/GoogleChrome/puppeteer/issues/390 same ubuntu 16.04 DO VPS
@AndrewBarba You’re missing a dependency there.
Please reference the full list I posted earlier and make sure they are installed.
Also, do not disable the sandbox. Do not disable the sandbox. We need to debug why things are happening with the sandbox and address those via documentation so you have a secure system to run tests on. Disabling the sandbox will leave your applications vulnerable to exploit the host machines if any malicious code ever makes it inside of them.
FYI, I ran this script: https://raw.githubusercontent.com/Garbee/puppeteer/cd00f7d936c942f8f378a332401024e501b186ce/utils/linux/debian-check.sh – there are no missing dependencies.