The Jenkins build process is encountering errors while trying to generate lighthouse reports

Fri, 28 May 2021 09:27:18 GMT ChromeLauncher Waiting for browser.............................................................................................
Fri, 28 May 2021 09:27:19 GMT ChromeLauncher Waiting for browser...............................................................................................
Fri, 28 May 2021 09:27:19 GMT ChromeLauncher Waiting for browser.................................................................................................
Fri, 28 May 2021 09:27:20 GMT ChromeLauncher Waiting for browser...................................................................................................
Fri, 28 May 2021 09:27:20 GMT ChromeLauncher Waiting for browser.....................................................................................................
Fri, 28 May 2021 09:27:21 GMT ChromeLauncher Waiting for browser.......................................................................................................

Fri, 28 May 2021 09:27:21 GMT ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:36157
Fri, 28 May 2021 09:27:21 GMT ChromeLauncher:error Logging contents of /tmp/lighthouse.mOZ6RIf/chrome-err.log
Fri, 28 May 2021 09:27:21 GMT ChromeLauncher:error Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Inconsistency detected by ld.so: ../elf/dl-tls.c: 488: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed!

Unable to connect to Chrome
370/0: Lighthouse analysis FAILED for https://website.com/en/....
rm: no such file or directory: report/lighthouse/website/en....report.json

/var/lib/jenkins/workspace/project/node_modules/lighthouse-batch/index.js:219
   const score = toScore(summary.detail.performance)

TypeError: Cannot read property 'performance' of undefined
   at checkBudgets (/var/lib/jenkins/workspace/project/node_modules/lighthouse-batch/index.js:219:42)
   at /var/lib/jenkins/workspace/project/node_modules/lighthouse-batch/index.js:67:20
   at Array.map (<anonymous>)
   at execute (/var/lib/jenkins/workspace/project/node_modules/lighthouse-batch/index.js:39:38)
   at Object.<anonymous> (/var/lib/jenkins/workspace/project/node_modules/lighthouse-batch/run.js:28:1)
   at Module._compile (internal/modules/cjs/loader.js:1068:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
   at Module.load (internal/modules/cjs/loader.js:933:32)
   at Function.Module._load (internal/modules/cjs/loader.js:774:14)
   at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="622e0b050a160a0d1711073d3007120d10161122534c524c5242">[email protected]</a> lighthouse: `lighthouse-batch -f sites.txt -p --config-path=config.js -h --performance 75 --score 70 --no-report –chrome-flags='–headless','--no-sandbox'`
npm ERR! Exit status 1

I am running this report for over 900 page URLs.

Answer №1

It appears that ChromeLauncher is experiencing difficulty connecting to Jenkins, according to the logs. It's recommended to ensure that Jenkins has permission to access this particular service.

This issue could arise if ChromeLauncher is not running in headless mode or if there are multiple instances of ChromeLauncher running with no available ports. You may want to consider including the following configurations in your ChromeLauncher launch settings:

chromeOptions = {
        chromeFlags: ["--disable-gpu", "--headless", "--enable-logging"] 
}

For more information on this, you can visit this link.

An alternate solution would be to run Lighthouse in a Docker environment to separate it from Jenkins. This method allows you to scan your project, generate HTML reports, and share them back with Jenkins.

To learn more about this approach, you can check out the details here.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Combine angular ui router templates using grunt into a single file

Currently, I am working on an angular-ui-router project that consists of 150 files scattered all over. My goal is to create a grunt task that will merge all these files into a single index.html file structured like this: <script type="text/ng-template" ...

The occurrence of NodeJS suddenly crashing was marked by a trio of

I encountered a strange issue with my nodejs project. The project is an online shop built using express and handlebars, with a mongo database connection. In the router section, I have the following code: router.get('/item/:item', function (req, ...

Node.js with Socket.io causes multiple events to be triggered

Currently, I am in the process of developing a rochambo game using node.js and socket.io. The game works as follows: A player places a bet, which is then sent to all other players. These players can choose a sign and click on 'challenge'. Howeve ...

Puppeteer App Error: An error has been detected on the client side

I am facing an issue using Puppeteer with NEXT.JS while attempting to capture a screenshot. Everything runs smoothly on localhost, but in production, the captured image comes back with the following error message: Application error - a client-side exceptio ...

"What are some strategies for locating a specific item within a MongoDB database, or perhaps querying for all

I am currently searching for a specific item using the following code: Product.find({ category: "bracelet" }); In one scenario, I need to find items with any category value or simply search for all items like this: let cat; if (req.body.cat) ...

The cookie set by express.session does not work on iOS Safari when trying to access the application via its own domain

I own a Node/Express application deployed on Heroku with a custom domain. Everything works perfectly when accessing the app from my desktop at or directly from its Heroku URL, . However, I'm facing an issue when trying to use the app on mobile Safar ...

Encountering a Problem When Exporting a Class Using Require

I find myself struggling with a particular detail that eludes me. Despite exploring numerous suggested solutions found through Google, I am overwhelmed by the uncertainty of what actually works. Here is MyProject on Replit and the problematic class I&apos ...

Javascript Operator Guide

I encountered this unique operator preceding the 'this' keyword in some Node.js Harmony code while working with the Koa web framework. Check out the example code below: app.use(function *(){ var n = ~~this.cookies.get('view') + 1; ...

Issue with Webpack Build Excluding JSON Resource Files

My Webpack build is not including the resources folder in the dist build, resulting in the translation files not being picked up and causing the translations to not take place... File structure: dist //The json files from src/resources need to be incl ...

Using the async.waterfall function in an Express application

Query: I'm encountering an issue with my express.js code where, upon running in Node.js, an empty array (ganttresult) is initially displayed. Only after refreshing the browser do I obtain the desired result. To address this problem, I have attempted ...

Node.js exporting fails due to an undefined variable

When attempting to export variables in Node.js, I keep receiving an undefined error. I'm not sure what the issue is, can anyone provide assistance or suggestions? Here is a snippet from index.js: var test = 10; module.exports.test = test; And here i ...

This error message indicates that the certificate for Angular 13 has expired

After successfully installing Angular and verifying the version, I encountered an issue when attempting to run the command npm start. Despite multiple attempts at uninstalling and reinstalling everything, the problem persists. Running npm install also resu ...

The Express application encounters a 500 Internal Server Error due to a TypeError where the Object #<EventEmitter> does not contain the method 'hr

The staging instance of my webapp is encountering an issue: Express 500 TypeError: Object #<EventEmitter> has no method 'hrtime' at Object.logger [as handle] (F:\approot\node_modules\express\node_modules\connect ...

Is it possible to authenticate a user in Firebase using Node.js without utilizing the client side?

Can I access Firebase client functions like signInWithEmailAndPassword in the Firebase SDK on the server side? Although SDKs are typically used for servers and clients use JavaScript, I need a non-JavaScript solution on the client side. I have set up the ...

Utilizing util.format to enclose every string within an array with double quotation marks

Currently .. var utility = require("utility"); var carsInput = 'toyota,chevrolet'; var cars = carsInput.split(','); var queryString = utility.format('Cars: [%s]', cars); console.log(queryString); // Cars: [toyota,chevrolet] ...

Capturing information transmitted from an input device

I'm currently working on capturing input data from a piano connected to my computer via USB. $ lsusb ... Bus 003 Device 046: ID fc08:0101 .... The piano is identified as Bus 003 Device 046: ID fc08:0101. When I try $ cat /dev/bus/usb/003/046, th ...

Having trouble resolving a dependency within an imported node module named "node-fetch"

As someone who is still a bit of a novice in Node, I apologize for what may seem like a beginner question. I have developed a small Chrome extension where the only node module I imported is called node-fetch. Typically, running yarn build to create a packa ...

Storing Nodes Externally: A Guide to Dockerizing Node-Red with External Node

My current challenge involves installing numerous missing node-red nodes to a container. When I maintain the (named) container and execute it with docker start, everything functions smoothly. However, my goal is to store the installed nodes in a separate ...

Utilizing NodeJS Puppeteer and the scrapedin framework to extract user email addresses from Linked-in profiles through web scraping techniques

Hello everyone, I am currently working on a project that involves scraping public LinkedIn profiles in order to extract information such as email address, name, company, job title, and photo (basic information). To achieve this, I am using NodeJS along wit ...

Error encountered in NodeJS after refreshing the node server

I am currently in the process of developing a web application using Node.js, Express framework, and EJS templates. Below is the code snippet for my server setup: const express = require('express'); const app = express(); const PORT = process.en ...