Closed paul-bell closed 1 year ago
Ensure your package.json
looks like this:
{
"dependencies": {
"browserless": "latest",
"puppeteer": "latest"
},
"scripts": {
"postinstall": "node node_modules/puppeteer/install.js"
}
}
Then, npm install
, and that's all. You don't need to specify the binary path 🙂
Thank you very much. I will be testing today.
So...the beat goes on.
I got the install script to work, i.e., Chrome is now installed. But, given that we're dealing with a Docker container created by a "docker build" command, its location is different. It landed in this directory:
/efs/tmp/node/home/.cache/puppeteer/chrome/linux-117.0.5938.92/chrome-linux64
I naively assumed that, regardless of where the Puppeteer script installed Chrome, it would know to find it there. Wrong again: first experiments showed Puppeteer complaining that he could not find the Chrome executable.
Thus I again asserted the executablePath property to the browser constructor. The "not found" complaint went away, but the original "Timed out after 60000 ms" returned.
At this point, I am at a real loss as to how to proceed. In the hope that browserless+chrome is faster than Firefox+Selenium, I am eager to make it work. (I can say that browserless+chrome is far simpler to use than FF+Selenium).
I am grateful for your ongoing help with this.
Thanks again.
Prerequisites
package.json
.Subject of the issue
Steps to reproduce
I suspect that my program is doing something wrong. I believe the relevant parts of that program include:
I am running browserless.js version 10.1.2 and Puppeteer 21.3.1. I believe that they are happy with the version of Chrome shown above. Please note that despite this claim on the Puppeteer NPM page:
There is no evidence of any such "automatic download," i.e., Chrome exists only in the aforementioned executablePath. But at least for now, this issue is not germane.
The program runs Dockerized on a CentOS 7 Linux. Note also that 18 months ago I was able to run Puppeteer "raw", i.e., older versions that used chromedriver, in the same Linux environment.
Expected behaviour
The browser is found and instantiated.
Actual behaviour
The timeout error shown above
Thanks for your guidance on this.