lighthouse-ci
lighthouse-ci copied to clipboard
gitlab ci blocks during run
lighthouserc.js
module.exports = {
ci: {
collect: {
url: [
'http://127.0.0.1:8089/'
],
numberOfRuns: 3,
startServerCommand: "PORT=8089 node src/server",
settings: {
hostname: '127.0.0.1',
chromeFlags: ['--no-sandbox'],
},
},
upload: {
target: 'temporary-public-storage',
}
}
}
.gitlab-ci.yml
lhci:
stage: test
image: cypress/browsers:node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
script:
- npm install
- npm install -g @lhci/[email protected]
- npm run build
- lhci autorun --config=./lighthouserc.js || echo "LHCI failed!"
I also got this. Any solution?
Has the npm package been compromised?
$ npx lhci --version
Hello, this is AnupamAS01!
I also got this. Any solution?
no 😞
I have the same issue with the following CI config:
lighthouse:
stage: .pre
image: cypress/browsers:node16.17.0-chrome106
script:
- npm install -g @lhci/[email protected]
- lhci autorun --upload.target=temporary-public-storage --collect.settings.chromeFlags="--no-sandbox" --collect.staticDistDir="wiki/pages" --collect.numberOfRuns=1 || echo "LHCI failed!"
I found a solution. I executed this download-chrome.sh to install Chrome, and then set the environment variable LIGHTHOUSE_CHROMIUM_PATH
to the location of Chrome downloaded by the script, and then it can run normally.
Any news on this? I am also facing this kind of issue
Any news on this? I am also facing this kind of issue
I found a solution. I executed this download-chrome.sh to install Chrome, and then set the environment variable
LIGHTHOUSE_CHROMIUM_PATH
to the location of Chrome downloaded by the script, and then it can run normally.
here
Any news on this? I am also facing this kind of issue
I found a solution. I executed this download-chrome.sh to install Chrome, and then set the environment variable
LIGHTHOUSE_CHROMIUM_PATH
to the location of Chrome downloaded by the script, and then it can run normally.here
How does it work? The script already checks for LIGHTHOUSE_CHROMIUM_PATH
and exit if not exist. And what the value of LIGHTHOUSE_CHROMIUM_PATH
... I tried this script partially ... meaning downloading chrome .... and execute wget ... but with this ... its still not working
Manage to "Fix" this by using Node 22 and setting the following flag:
export NODE_OPTIONS="--max-old-space-size=7168"
Turns out that was only for one pipeline. It's happening again. Have opened https://github.com/GoogleChrome/lighthouse-ci/pull/1070 to figure out whats going on. Not giving up on this one!
With debugging turned on looks like it's blocking connecting to Chrome:
Mon, 02 Sep 2024 12:13:45 GMT LH:status Auditing: Document has a valid `rel=canonical`
Mon, 02 Sep 2024 12:13:45 GMT LH:status Auditing: Structured data is valid
Mon, 02 Sep 2024 12:13:45 GMT LH:status Auditing: Page didn't prevent back/forward cache restoration
Mon, 02 Sep 2024 12:13:45 GMT LH:status Generating results...
done.
Run #3...Mon, 02 Sep 2024 12:13:46 GMT LH:ChromeLauncher Found existing Chrome already running using port 41471, using that.
Just sits there waiting at that. Debugging continues.
Ok - I don't know why but this is related to the version of Chrome used. I downgraded from 128 to 127 and everything started working fine again.
We faced the same issue, we fixed it by using a newer version of the container, it has updates of node and Chrome, so we don't know the root cause.
This never ends:
docker run --rm -it cypress/browsers:node-20.5.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1 \
bash -c 'yarn global add @lhci/[email protected] ; lhci collect --url https://www.google.com \
--collect.settings.chromeFlags="--no-sandbox"'
This works:
docker run --rm -it cypress/browsers:node-20.17.0-chrome-128.0.6613.119-1-ff-130.0-edge-128.0.2739.63-1 \
bash -c 'yarn global add @lhci/[email protected] ; lhci collect --url https://www.google.com \
--collect.settings.chromeFlags="--no-sandbox"'