lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

PageSpeed Insights page not working

Open qdb opened this issue 6 years ago • 4 comments

Hi,

Please check URL below, looks like some data is missing in response from backend or there is bug in the front-end code, which generates the report.

https://developers.google.com/speed/pagespeed/insights/?url=google.com

lightsights-en.js:344 TypeError: Cannot read property 'length' of undefined at DetailsRenderer._renderTable (labreport_js.js:77) at DetailsRenderer.render (labreport_js.js:71) at PerformanceCategoryRenderer.populateAuditValues (labreport_js.js:87) at PerformanceCategoryRenderer.renderAudit (labreport_js.js:85) at Array.map (<anonymous>) at PerformanceCategoryRenderer.renderClump (labreport_js.js:93) at PerformanceCategoryRenderer.render (labreport_js.js:126) at prepareLabData (labreport_js.js:148) at In (lightsights-en.js:332) at Hn.f.b (lightsights-en.js:328)

qdb avatar Mar 02 '20 22:03 qdb

We're looking into this.

exterkamp avatar Mar 03 '20 04:03 exterkamp

We are rolling out a fix, should be rolled out within a few hours.

exterkamp avatar Mar 03 '20 05:03 exterkamp

@qdb Thank you for reporting! Fix is rolled out and PSI frontend should now be working. More details coming soon.

jazyan avatar Mar 03 '20 06:03 jazyan

Post Mortem: PSI Frontend Outage

On March 2, 2020 from 12:26 - 22:51 PST, the PSI frontend would fail on all sites as pictured below. image This resulted in about 10 hours of downtime for https://developers.google.com/speed/pagespeed/insights/. While the frontend was down, the API continued to process requests as normal.

What happened?

On January 30, there was a change in one of our upstream dependencies that updated the behavior of an internal flag. This internal flag now suppressed empty arrays in the JSON response during proto-to-JSON serialization.

Before After
{
    "details": {
        "items": [],
        ...
    },
    ...
}
{
    "details": {
        ...
    },
    ...
}

We upgraded PSI on March 2, which included the above change. Since the Lighthouse renderer relied on empty arrays being preserved, it would crash and fail to render any results. This behavior presented in the Pagespeed frontend, but also affected anyone who relied on empty arrays being preserved in the API JSON responses. Upon noticing the frontend outage, we immediately rolled back to the previous working PSI version.

Moving forward

We removed the internal flag. We also updated our end-to-end tests and release documentation to enable catching similar failures in the future earlier.

Major thanks to @qdb for reporting this issue!

jazyan avatar Mar 10 '20 18:03 jazyan