When further debugging the JSON files, I can see that "normal" JSON reports have the metricSavings object directly in the audit object, but the JSON report from the PageSpeed Insights API has the metricSavings under details.debugData - and I guess this is the reason why the report viewer doesn't show that info.
What did you expect?
I expected the "Show metrics relevant to" to be available on Lighthouse reports fetched from the PageSpeed Insights API.
What have you tried?
I have tried to explain this under "what happened", but I found out that the JSON schema of the regular Lighthouse software (version 12.0.0), run in a Node.js environment, is slighty different than the JSON schema of the PageSpeed Insights API, even though it's the same Lighthouse version (12.0.0).
More specifically, the metricSavings object is normally directly under the audit object, where the PSI API places it under .details.debugData.metricSavings.
FAQ
URL
https://googlechrome.github.io/lighthouse/viewer/
What happened?
When fetching a Lighthouse report via the PageSpeed Insights API (https://www.googleapis.com/pagespeedonline/v5/runPagespeed), and then paste the resulting report into the Lighthouse Report Viewer (https://googlechrome.github.io/lighthouse/viewer/), I don't see the "Show audits relevant to" option.
When further debugging the JSON files, I can see that "normal" JSON reports have the
metricSavings
object directly in the audit object, but the JSON report from the PageSpeed Insights API has themetricSavings
underdetails.debugData
- and I guess this is the reason why the report viewer doesn't show that info.What did you expect?
I expected the "Show metrics relevant to" to be available on Lighthouse reports fetched from the PageSpeed Insights API.
What have you tried?
I have tried to explain this under "what happened", but I found out that the JSON schema of the regular Lighthouse software (version 12.0.0), run in a Node.js environment, is slighty different than the JSON schema of the PageSpeed Insights API, even though it's the same Lighthouse version (12.0.0).
More specifically, the
metricSavings
object is normally directly under the audit object, where the PSI API places it under.details.debugData.metricSavings
.How were you running Lighthouse?
node, PageSpeed Insights
Lighthouse Version
12.0.0
Chrome Version
No response
Node Version
No response
OS
No response
Relevant log output
No response