lighthouse-ci icon indicating copy to clipboard operation
lighthouse-ci copied to clipboard

Custom audit graph not displayed on Lighthouse CI server dashboard

Open JonUK opened this issue 3 years ago • 5 comments

Describe the bug I have created a custom audit that runs fine and I can see the score in each individual report. I am running this custom audit with Lighthouse CI and uploading to a Lighthouse CI server. On the Lighthouse CI server, I can see a new section on the dashboard for my custom audit but instead of a graph, the text "No data available" is displayed.

To Reproduce Steps to reproduce the behavior:

  1. Create a new audit (in my case including a new gatherer too)
  2. In the lighthouserc.js, set the setting ci => collect => settings => configPath to the path of custom-config.js which extends lighthouse:default and includes the custom audit with the weight of 1.
  3. Run Lighthouse CI uploading to a Lighthouse CI server

Expected behavior On the dashboard, in the new section for the custom audit, the score should be displayed on a graph.

Logs/Screenshots Graph for custom audit is not displayed image

The score for the custom audit is available on each individual report image

Environment (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome 92
  • Lighthouse CI server: v0.8.0

Additional context I can provide the custom audit files and config file if needed to look into this further.

JonUK avatar Aug 13 '21 20:08 JonUK

@JonUK Hi, did you ever figure out a way to do this? I am trying to do the same

johnpmitsch avatar Feb 17 '22 19:02 johnpmitsch

@johnpmitsch Unfortunately no I've not found a way to resolve this issue.

JonUK avatar Feb 17 '22 22:02 JonUK

Same scenario for me.

gilhanan avatar Aug 06 '23 23:08 gilhanan

Aaarrgh... running into same. Any assistance here, if this is a configuration issue that could be remedied on our end, would be appreciated.

moos avatar Jan 19 '24 23:01 moos

Got it (sorta) working based on comments in #655.

Inside the Docker container, modify /usr/src/lhci/node_modules/@lhci/server/src/api/statistic-definitions.js to add a line for your category. I added mine just above the performance one:

  'category_<custom-category-name>_median': categoryScoreMedian('<custom-category-name>'),
  category_performance_median: categoryScoreMedian('performance'),

Save the file and restart Docker.

Screenshot 2024-01-19 at 4 03 54 PM

moos avatar Jan 20 '24 00:01 moos