GoogleChromeLabs / AutoWebPerf

AutoWebPerf provides a flexible and scalable framework for running web performance audits with arbitrary audit tools including PageSpeedInsights, WebPageTest and more.
Apache License 2.0
350 stars 32 forks source link

Problem to get lighthouse score "works-offline" #46

Closed krystianjj closed 3 years ago

krystianjj commented 3 years ago

Hi, When I run script I get some results but I have error [psi] Unable to assign json.lighthouseResult.audits["works-offline"].score to metrics: Cannot read property 'score' of undefined Has anyone have similar problem ?

ptim commented 3 years ago

I'm seeing this, too…

I wonder if this should instead be: json.lighthouseResult.audits["service-worker"].score?

https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/service-worker.js

Edit: Scratch that - json.lighthouseResult.audits["service-worker"].score is separately defined:

https://github.com/GoogleChromeLabs/AutoWebPerf/blob/stable/src/gatherers/psi.js#L78-L79

and works-offline was removed on 2020-12-16: https://github.com/GoogleChrome/lighthouse/pull/11806