

So that needs to be taken care of, the exact path can be easily found by cd-ing into this path, however - /node_modules/puppeteer/.local-chromium/.

This command needs to be run in the directory where chromium is installed by puppeteer, which in our case happens to be ~/ss/node_modules/puppeteer/.local-chromium/linux-848005/chrome-linux, but the linux-848005 part and ~/ss/ path might vary. Ldd chrome | grep not | awk '' | tr '\n' ' ' Troubleshoot common errors in PuppeteerĬase 1: Missing dependencies and librariesįirstly, get a list of missing dependencies in the local chromium installation using the ldd command. Run npm install puppeteer for the whole setup consisting of chromium, or, just npm install puppeteer-core for only puppeteer's core functionality or, just the puppeteer module, which is suitable if Chromium installation has already been dealt with or, the app is running it remotely on another container/instance. If you see an error like, Failed to launch chrome, it's likely a problem in chromium rather than puppeteer.

It's not properly documented in the Puppeteer documentation, and hence a cause of confusion for many developers working on browser automation with puppeteer. This is specifically a problem with puppeteerand not pupeteer-core, as puppeteer comes with the chromium. Puppeteer installation is quite tricky and assumes you have all the. Headless chrome(-ium) needs a lot of dependencies to work with, and puppeteer doesn't install them all. Seems like you are not facing this problem alone, others too have faced it and while there's no elegant solution to it presently, we will walk you through a couple of solutions we tested, and it worked in our development environment. So they are 100% confirmed to work, at least, in our testing environment, which is Ubuntu, but we can't confirm about yours. To solve puppeteer installation errors, there are a lot of solutions, but we are sharing only the ones we tried and tested. Often, there are bugs and only way to deal with is to upgrade or downgrade to move to a more stable version. General rule of thumb solutionĬheck Node version, Chromium version and Puppeteer version. The goal of this puppeteer tutorial is to fix them and install puppeteer without any errors. If you are reading this, chances are you are stuck with an error in the headless chromium installation of Puppeteer which appears to be too common. It can help your Node js and Javascript based application scrape content from the web or, screenshot pages, in a predictable and reliable way. Puppeteer is a popular js based Node module that lets you interact with Chromium in a headless manner.
