sitespeedio / plugin-gpsi

GPSI plugin for sitespeed.io
MIT License
10 stars 8 forks source link

TypeError: Cannot read properties of undefined (reading 'score') #53

Open kdencerv opened 5 months ago

kdencerv commented 5 months ago

Have you read the documentation?

URL

https://www.sitespeed.io/

What are you trying to accomplish

I was running a GPSI test via sitespeedio plugin with this command:

docker run sitespeedio/sitespeed.io:33.6.0-plus1 --plugins.add /gpsi/lib/index.js --plugins.remove browsertime --plugins.remove /lighthouse/index.js "https://www.sitespeed.io/" -n 1

We've been using GPSI plugin in sitespeed for a long time with no problems. But recently we've been experiencing the same error

ERROR: TypeError: Cannot read properties of undefined (reading 'score') at repackagePageSummary (file:///gpsi/lib/pageSummary.js:19:58) at file:///gpsi/lib/index.js:92:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

What browser did you use?

Chrome

How to reproduce

Run a GPSI sitespeed test via docker with this command

docker run sitespeedio/sitespeed.io:33.6.0-plus1 --plugins.add /gpsi/lib/index.js --plugins.remove browsertime --plugins.remove /lighthouse/index.js "https://www.sitespeed.io/" -n 1

Log output

ERROR: TypeError: Cannot read properties of undefined (reading 'score')
at repackagePageSummary (file:///gpsi/lib/pageSummary.js:19:58)
at file:///gpsi/lib/index.js:92:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
soulgalore commented 5 months ago

Hi @kdencerv can try sitespeedio/sitespeed.io:33.6.1-plus1? I released that late yesterday. The reason for the error is that GPSI upgraded to Lighthouse 12 and they removed the PWA score, and wasn't handled in the plugin.

kdencerv commented 5 months ago

Hi @soulgalore, I tried using sitespeedio/sitespeed.io:33.6.1-plus1 and it's now working fine. Thanks!