docs(troubleshooting): launching Chromium on Windows (#4235)

Fixes #3186.
This commit is contained in:
Andrey Lushnikov 2019-04-02 19:59:17 -07:00 committed by GitHub
parent 695b30a425
commit 1b8769d09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,8 @@
# Troubleshooting
<!-- GEN:toc -->
- [Chrome headless doesn't launch](#chrome-headless-doesnt-launch)
- [Chrome headless doesn't launch on Windows](#chrome-headless-doesnt-launch-on-windows)
- [Chrome headless doesn't launch on UNIX](#chrome-headless-doesnt-launch-on-unix)
- [Setting Up Chrome Linux Sandbox](#setting-up-chrome-linux-sandbox)
* [[recommended] Enable user namespace cloning](#recommended-enable-user-namespace-cloning)
* [[alternative] Setup setuid sandbox](#alternative-setup-setuid-sandbox)
@ -17,7 +18,24 @@
- [Code Transpilation Issues](#code-transpilation-issues)
<!-- GEN:stop -->
## Chrome headless doesn't launch
## Chrome headless doesn't launch on Windows
Some [chrome policies](https://support.google.com/chrome/a/answer/7532015?hl=en) might enforce running Chrome/Chromium
with certain extensions.
Puppeteer passes `--disable-extensions` flag by default and will fail to launch when such policies are active.
To work around this, try running without the flag:
```js
const browser = await puppeteer.launch({
ignoreDefaultArgs: ['--disable-extensions'],
});
```
> Context: [issue 3681](https://github.com/GoogleChrome/puppeteer/issues/3681#issuecomment-447865342).
## Chrome headless doesn't launch on UNIX
Make sure all the necessary dependencies are installed. You can run `ldd chrome | grep not` on a Linux
machine to check which dependencies are missing. The common ones are provided below.