Jenkins-lighthouse setup instructions:
https://kitconcept.com/blog/continuous-performance-analysis-with-lighthouse-and-jenkins/
Issue:
I am trying to setup lighthouse on jenkins machine.
I am getting following error:
Runtime error encountered: The environment variable CHROME_PATH must be set to executable of a build of Chromium version 54.0 or later.
Error: The environment variable CHROME_PATH must be set to executable of a build of Chromium version 54.0 or later.
at Object.linux (/xxxxx/node_modules/chrome-launcher/dist/chrome-finder.js:108:15)
They seem to have left out the step where you install Chrome :)
Take a look at https://github.com/GoogleChrome/lighthouse/blob/master/docs/headless-chrome.md#running-lighthouse-using-headless-chrome
Hi, I am getting the following error when trying to yum install chromium-browser
Error: Package: chromium-browser-38.0.2125.111-1.el6.centos.x86_64 (chromium-el6)
Requires: libudev.so.0()(64bit)
and when I try to install it with yum install chromium-browser --skip-broken, I get the following:
Packages skipped because of dependency problems:
chromium-browser-38.0.2125.111-1.el6.centos.x86_64 from chromium-el6
typing rpm -Va --nofiles --nodigest, produces no output, but the chromium-browser is not downloaded.
Red Hat Enterprise Linux 7.4
Troubleshooting RHEL issues for Chrome installs is a bit beyond the scope of these issues :)
you might be interested in https://github.com/GoogleChrome/puppeteer/issues/765 though, which seems similar?
Typing which chromium-browser outputs: Chromium 65.0.3325.181 Fedora Project
but still can't run lighthouse in my Jenkins as it fails with: Unable to connect to Chrome \n error Command failed with exit code 1. .
More specifically, the Jenkins fails during this script node_modules/lighthouse/lighthouse-cli/index.js --output-path=./lighthouse-report.html --quiet --chrome-flags='--headless' APP_URL
Are you able to start Chrome normally with a debugging port? Getting Chrome working normally on your machine is a prerequisite of using Lighthouse.
i.e. does chromium-browser --remote-debugging-port=9222 work? and if so, can you connect to it yourself without lighthouse?
I am running this on a VM running Red Hat Linux Server 7.4.
Running chromium-browser --remote-debugging-port=9222 outputs (chromium-browser:15573): Gtk-WARNING **: cannot open display:
Here are the versions:
google-chrome-stable --version: Google Chrome 67.0.3396.62
chromium-browser --version: Chromium 65.0.3325.181 Fedora Project
chromedriver --version: ChromeDriver 2.39.562737 (dba483cee6a5f15e2e2d73df16968ab10b38a2bf)
lighthouse --version: 2.9.4
If you're doing headless you'll need to add --headless, otherwise follow the aforementioned link for setting up xvfb
Running: chromium-browser --remote-debugging-port=9222 --headless outputs:
`[0605/124351.856035:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
DevTools listening on ws://127.0.0.1:9222/devtools/browser/2a69d624-323e-4aca-aebd-a079ada7a712
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
[0605/124352.885142:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0605/124352.888009:ERROR:viz_main_impl.cc(197)] Exiting GPU process due to errors during initialization
[0605/124353.414645:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0605/124353.417383:ERROR:viz_main_impl.cc(197)] Exiting GPU process due to errors during initialization
[0605/124353.995674:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0605/124353.998605:ERROR:viz_main_impl.cc(197)] Exiting GPU process due to errors during initialization
[0605/124354.601323:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: /usr/lib64/chromium-browser/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0605/124354.604222:ERROR:viz_main_impl.cc(197)] Exiting GPU process due to errors during initialization
[0605/124354.604967:ERROR:service_manager_context.cc(252)] Attempting to run unsupported native service: /usr/lib64/chromium-browser/content_gpu.service`
Then yes, it looks like Chromium is having trouble starting on your machine. Once you get Chromium working @ray-kim-12, you're able to connect to it yourself w/o Lighthouse, and you're still having trouble starting Lighthouse, please open a new issue that documents the specific bug.
Right now, it looks like it's complaining about GPU so try --disable-gpu, future generic Chromium output troubleshooting might be better received on StackOverflow.
@ray-kim-12 hi, I'm getting the same error, have you managed to start chromium successfully?
They seem to have left out the step where you install Chrome :)
Take a look at https://github.com/GoogleChrome/lighthouse/blob/master/docs/headless-chrome.md#running-lighthouse-using-headless-chrome
This says to run apt-get install chromium but chromium is not an installable option, but when considering what is actually available, it's not clear if I'm installing chromium-driver or chromium-browser (to a headless VPS/lambda).
@InstanceOfMichael it depends on your specific flavor of linux what it's called, but chromium-driver is almost certainly not it. chromium and chromium-browser are most common and recommended for a stable version but if no package is available you can always download directly from tip-of-tree builds https://download-chromium.appspot.com/.
This ended up working for me:
CHROME_PATH=/usr/bin/chromium-browser npx lighthouse-badges --urls https://myapp.com -o badges
Most helpful comment
They seem to have left out the step where you install Chrome :)
Take a look at https://github.com/GoogleChrome/lighthouse/blob/master/docs/headless-chrome.md#running-lighthouse-using-headless-chrome