diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 7902b6cf..efef33d9 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -1,7 +1,8 @@ # Troubleshooting -- [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) -## 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.