Closed bjrn closed 3 years ago
Hey @bjrn ,
your commit breaks my installation. The new chromium revision required by puppeteer v10 is not downloaded automatically for some reason. Are you using the bundled chromium or do you have installed the browser separately?
/home/user/website-evidence-collector/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:82
throw new Error(missingText);
^
Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (884014).
at ChromeLauncher.launch (/home/user/website-evidence-collector/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:82:27)
at PuppeteerNode.launch (/home/user/website-evidence-collector/node_modules/puppeteer/lib/cjs/puppeteer/node/Puppeteer.js:125:31)
at /home/user/website-evidence-collector/website-evidence-collector.js:74:35
at Object.<anonymous> (/home/user/website-evidence-collector/website-evidence-collector.js:669:3)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
That is odd, I'll try removing my node_modules and reinstall from scratch. I have been testing it with both Node 14 LTS and Node 16.x, but I should probably add that I'm using a Macbook M1 which has been causing issues (one is that it's incompatible with older versions of puppeteer, unless I resort to install dependencies in intel-mode)
% nvm use 14
Now using node v14.16.1 (npm v6.14.12)
% rm -rf node_modules
% npm install
... lots of logging ...
puppeteer@10.1.0 install /Users/bjorn.rixman/dev/forks/website-evidence-collector/node_modules/puppeteer
> node install.js
Downloading Chromium r884014 - 113.6 Mb [====================] 99% 0.0s
added 226 packages from 243 contributors and audited 228 packages in 10.303s
and node 16.x:
% nvm use 16
Now using node v16.1.0 (npm v7.11.2)
% rm -rf node_modules
% npm install
... lots of logging ...
puppeteer@10.1.0 install /Users/bjorn.rixman/dev/forks/website-evidence-collector/node_modules/puppeteer
> node install.js
Downloading Chromium r884014 - 113.6 Mb [====================] 99% 0.0s
added 226 packages from 243 contributors and audited 228 packages in 10.303s
if I add console.log(puppeteer.executablePath())
right after puppeteer is require:d and run WEC, it gives me:
/Users/bjorn.rixman/dev/forks/website-evidence-collector/node_modules/puppeteer/.local-chromium/mac-884014/chrome-mac/Chromium.app/Contents/MacOS/Chromium
So it appears as if it is using a locally downloaded and installed Chromium, right?
btw @rriemann-eu, are you installing it locally on your system, or via Docker? (haven't tested the docker setup at all) what Node version are you running? I can perhaps try to reproduce the issue
I use version v16.4.0 without docker on a Linux system.
Upon npm install
, my node_modules/puppeteer/.local-chromium
is not created until I run manually node node_modules/puppeteer/install.js
.
I've included the update in the master version. I hope we get feedback before the next release whether automatic installation of chromium also breaks for others.
Thanks for the pull request.
Updating Puppeteer was the simplest way to make this run on an Apple M1 chip