Search code examples
azure-devopsazure-pipelineslighthouselighthouse-ci

Lighthouse CI failing with cryptic errors on Azure DevOps pipeline


I'm running Lighthouse CI with a Azure DevOps YAML pipeline on a Windows agent and am getting cryptic errors. I run this command: npx lhci autorun and get this result:

Starting: Lighthouse Testing (windows_build_container)
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.201.1
Author       : Microsoft Corporation
Help         : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents: shell
npm run ci:lighthouse
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\__w\_temp\769adb2-5ac7-4cfd-aff7-4efc2dc1b3b4.cmd""


> [email protected] ci:lighthouse
> npx lhci autorun

✅  .lighthouseci/ directory writable
✅  Configuration file found
✅  Chrome installation found
Healthcheck passed!

Automatically determined ./public as `staticDistDir`.
Set it explicitly in lighthouserc.json if incorrect.

Started a web server on port 49236...
Running Lighthouse 3 time(s) on http://localhost:49236/index.html
Run #1...failed!
Error: Lighthouse failed with exit code 1
    at ChildProcess.<anonymous> (C:\__w\1\s\web\node_modules\@lhci\cli\src\collect\node-runner.js:120:21)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Wed, 06 Apr 2022 00:01:33 GMT LH:ChromeLauncher Waiting for browser.
Wed, 06 Apr 2022 00:01:33 GMT LH:ChromeLauncher Waiting for browser...
Wed, 06 Apr 2022 00:01:33 GMT LH:ChromeLauncher Waiting for browser.....
Wed, 06 Apr 2022 00:01:34 GMT LH:ChromeLauncher Waiting for browser.......
Wed, 06 Apr 2022 00:01:34 GMT LH:ChromeLauncher Waiting for browser.........
Wed, 06 Apr 2022 00:01:35 GMT LH:ChromeLauncher Waiting for browser...........
Wed, 06 Apr 2022 00:01:35 GMT LH:ChromeLauncher Waiting for browser.............
Wed, 06 Apr 2022 00:01:36 GMT LH:ChromeLauncher Waiting for browser...............
Wed, 06 Apr 2022 00:01:36 GMT LH:ChromeLauncher Waiting for browser.................
Wed, 06 Apr 2022 00:01:37 GMT LH:ChromeLauncher Waiting for browser...................
Wed, 06 Apr 2022 00:01:37 GMT LH:ChromeLauncher Waiting for browser.....................
Wed, 06 Apr 2022 00:01:38 GMT LH:ChromeLauncher Waiting for browser.......................
Wed, 06 Apr 2022 00:01:38 GMT LH:ChromeLauncher Waiting for browser.........................
Wed, 06 Apr 2022 00:01:39 GMT LH:ChromeLauncher Waiting for browser...........................
Wed, 06 Apr 2022 00:01:39 GMT LH:ChromeLauncher Waiting for browser.............................
Wed, 06 Apr 2022 00:01:40 GMT LH:ChromeLauncher Waiting for browser...............................
Wed, 06 Apr 2022 00:01:40 GMT LH:ChromeLauncher Waiting for browser.................................
Wed, 06 Apr 2022 00:01:41 GMT LH:ChromeLauncher Waiting for browser...................................
Wed, 06 Apr 2022 00:01:42 GMT LH:ChromeLauncher Waiting for browser.....................................
Wed, 06 Apr 2022 00:01:42 GMT LH:ChromeLauncher Waiting for browser.......................................
Wed, 06 Apr 2022 00:01:43 GMT LH:ChromeLauncher Waiting for browser.........................................
Wed, 06 Apr 2022 00:01:43 GMT LH:ChromeLauncher Waiting for browser...........................................
Wed, 06 Apr 2022 00:01:43 GMT LH:ChromeLauncher Waiting for browser...........................................√
Wed, 06 Apr 2022 00:01:44 GMT LH:config:warn IFrameElements gatherer requested, however no audit requires it.
Wed, 06 Apr 2022 00:01:44 GMT LH:config:warn FormElements gatherer requested, however no audit requires it.
Wed, 06 Apr 2022 00:01:44 GMT LH:status Connecting to browser
Wed, 06 Apr 2022 00:01:52 GMT LH:CriConnection:warn Cannot create new tab; reusing open tab.
Wed, 06 Apr 2022 00:01:52 GMT LH:status Disconnecting from browser...
Wed, 06 Apr 2022 00:01:52 GMT LH:status Cleaning origin data
Wed, 06 Apr 2022 00:01:52 GMT LH:CriConnection:error sendRawMessage() was called without an established connection.
Wed, 06 Apr 2022 00:01:52 GMT LH:GatherRunner disconnect:error sendRawMessage() was called without an established connection.
Wed, 06 Apr 2022 00:01:52 GMT LH:ChromeLauncher Killing Chrome instance 11444
Wed, 06 Apr 2022 00:01:53 GMT LH:ChromeLauncher:warn Chrome could not be killed Command failed: taskkill /pid 11444 /T /F
ERROR: The process "11444" not found.

Wed, 06 Apr 2022 00:01:53 GMT LH:CLI:warn Warning: Chrome process could not be killed because it already exited.
Unable to connect to Chrome

##[error]Cmd.exe exited with code '1'.

What does this error mean?


Solution

  • After much testing, I discovered that the agent I was using lacked certain graphics libraries for Chrome. This error essentially was saying Chrome was started but was impotent (Cannot create new tab) and was killed off.