-
Notifications
You must be signed in to change notification settings - Fork 698
Open
Description
I can't run lighthouse in gitlab for nuxt server, what am I doing wrong?
.gitlab-ci.yml
lighthouse:
image: cypress/browsers:node-22.19.0-chrome-139.0.7258.154-1-ff-142.0.1-edge-139.0.3405.125-1
stage: lighthouse
script:
- npm install -g @lhci/cli@0.15.x
- lhci autorun || echo "lhci FAILED" && exit 1
allow_failure: false
lighthouserc.cjs
module.exports = {
ci: {
collect: {
settings: { chromeFlags: "--no-sandbox" },
url: ["http://[::]:3000"],
startServerCommand:
"npm i && npm run build && node .output/server/index.mjs",
startServerReadyPattern: "Listening on",
numberOfRuns: 3,
},
upload: {
target: "temporary-public-storage",
},
assert: {
},
},
};
log
$ npm install -g @lhci/cli@0.15.x
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
added 328 packages in 22s
27 packages are looking for funding
run `npm fund` for details
$ lhci autorun || echo "lhci FAILED" && exit 1
✅ .lighthouseci/ directory writable
✅ Configuration file found
✅ Chrome installation found
Healthcheck passed!
Started a web server with "npm i && npm run build && node .output/server/index.mjs"...
WARNING: Timed out waiting for the server to start listening.
Ensure the server prints a pattern that matches /Listening on/i when it is ready.
Server Output:
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
Running Lighthouse 3 time(s) on http://[::]:3000/
Run #1...failed!
Error: Lighthouse failed with exit code 1
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@lhci/cli/src/collect/node-runner.js:120:21)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)
{
"lighthouseVersion": "12.6.1",
"requestedUrl": "http://[::]:3000/",
"mainDocumentUrl": "chrome-error://chromewebdata/",
"finalDisplayedUrl": "chrome-error://chromewebdata/",
"finalUrl": "chrome-error://chromewebdata/",
"fetchTime": "2025-09-02T13:59:58.269Z",
"gatherMode": "navigation",
"runtimeError": {
"code": "CHROME_INTERSTITIAL_ERROR",
"message": "Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests."
},
"runWarnings": [
"The page may not be loading as expected because your test URL (http://[::]:3000/) was redirected to chrome-error://chromewebdata/. Try testing the second URL directly.",
"Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",
"The tested device appears to have a slower CPU than Lighthouse expects. This can negatively affect your performance score. Learn more about [calibrating an appropriate CPU slowdown multiplier](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md#cpu-throttling)."
],
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/139.0.0.0 Safari/537.36",
"environment": {
"hostUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/139.0.0.0 Safari/537.36",
"benchmarkIndex": 945,
"credits": {}
},
"audits": {
"is-on-https": {
"id": "is-on-https",
"title": "Uses HTTPS",
"description": "All sites should be protected with HTTPS, even ones that don't handle sensitive data. This includes avoiding [mixed content](https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content), where some resources are loaded over HTTP despite the initial request being served over HTTPS. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more about HTTPS](https://developer.chrome.com/docs/lighthouse/pwa/is-on-https/).",
"score": null,
"scoreDisplayMode": "error",
"errorMessage": "Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",
"errorStack": "LighthouseError: CHROME_INTERSTITIAL_ERROR\n at getInterstitialError (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/lib/navigation-error.js:97:10)\n at getPageLoadError (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/lib/navigation-error.js:163:29)\n at _computeNavigationResult (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:146:7)\n at async gatherFn (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:300:23)\n at async Runner.gather (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/runner.js:211:25)\n at async navigationGather (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/gather/navigation-runner.js:306:21)\n at async navigation (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/core/index.js:58:24)\n at async runLighthouse (file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/cli/run.js:210:26)\n at async file:///usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/cli/index.js:10:1"
},
"redirects-http": {
"id": "redirects-http",
"title": "Redirects HTTP traffic to HTTPS",
"description": "Make sure that you redirect all HTTP traffic to HTTPS in order to enable secure web features for all your users. [Learn more](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/).",
2025-09-02T13:59:47.192Z LH:ChromeLauncher Waiting for browser.
2025-09-02T13:59:47.192Z LH:ChromeLauncher Waiting for browser...
2025-09-02T13:59:47.720Z LH:ChromeLauncher Waiting for browser.....
2025-09-02T13:59:48.223Z LH:ChromeLauncher Waiting for browser.......
2025-09-02T13:59:48.724Z LH:ChromeLauncher Waiting for browser.........
2025-09-02T13:59:49.226Z LH:ChromeLauncher Waiting for browser...........
2025-09-02T13:59:49.728Z LH:ChromeLauncher Waiting for browser.............
2025-09-02T13:59:50.229Z LH:ChromeLauncher Waiting for browser...............
2025-09-02T13:59:50.731Z LH:ChromeLauncher Waiting for browser.................
2025-09-02T13:59:51.233Z LH:ChromeLauncher Waiting for browser...................
2025-09-02T13:59:51.735Z LH:ChromeLauncher Waiting for browser.....................
2025-09-02T13:59:52.237Z LH:ChromeLauncher Waiting for browser.......................
2025-09-02T13:59:52.738Z LH:ChromeLauncher Waiting for browser.........................
2025-09-02T13:59:53.240Z LH:ChromeLauncher Waiting for browser...........................
2025-09-02T13:59:53.741Z LH:ChromeLauncher Waiting for browser.............................
2025-09-02T13:59:54.243Z LH:ChromeLauncher Waiting for browser...............................
2025-09-02T13:59:54.744Z LH:ChromeLauncher Waiting for browser.................................
2025-09-02T13:59:55.246Z LH:ChromeLauncher Waiting for browser...................................
2025-09-02T13:59:55.247Z LH:ChromeLauncher Waiting for browser...................................✓
2025-09-02T13:59:57.170Z LH:status Connecting to browser
2025-09-02T13:59:57.189Z LH:status Navigating to about:blank
2025-09-02T13:59:57.218Z LH:status Benchmarking machine
2025-09-02T13:59:58.269Z LH:status Preparing target for navigation mode
2025-09-02T13:59:58.340Z LH:status Cleaning origin data
2025-09-02T13:59:58.404Z LH:status Cleaning browser cache
2025-09-02T13:59:58.431Z LH:status Preparing network conditions
2025-09-02T13:59:58.560Z LH:status Navigating to http://[::]:3000/
2025-09-02T14:00:02.061Z LH:Navigation:error Provided URL (http://[::]:3000/) did not match initial navigation URL (chrome-error://chromewebdata/)
2025-09-02T14:00:02.277Z LH:NavigationRunner:error Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests. http://[::]:3000/
2025-09-02T14:00:02.305Z LH:status Analyzing and running audits...
2025-09-02T14:00:02.306Z LH:status Auditing: Uses HTTPS
2025-09-02T14:00:02.306Z LH:is-on-https:warn Caught exception: CHROME_INTERSTITIAL_ERROR
2025-09-02T14:00:02.308Z LH:status Auditing: Redirects HTTP traffic to HTTPS
2025-09-02T14:00:02.311Z LH:redirects-http:warn Caught exception: CHROME_INTERSTITIAL_ERROR
...
2025-09-02T14:00:02.577Z LH:status Generating results...
2025-09-02T14:00:02.709Z LH:ChromeLauncher Killing Chrome instance 88
Runtime error encountered: Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.
lhci FAILED
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
I see that the server is unavailable, but it seems like there is not enough time to start it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels