Fixed PageSpeed Insights & 2.2

@sy509 and @XenArabia have discovered that if you remove data-app="public" from the PAGE_CONTAINER template then you no longer get the "internal error".

This mostly confirms what we already knew - this is an internal issue to Lighthouse. I have tried keeping the data-app attribute, but setting it to a different value. Any value except public works. Including, publi or pub or not-public.

It's also worth noting that this is not new in XF 2.2. This same attribute was there with the same value in XF 2.1 and XF 2.0 but clearly some code path in their tool related to PWA support is now causing it to trip over.

We will attempt to report this to them via the existing issue on GitHub.
 
New discovery.

1.webp

I bet CTR of those pages has already dropped down. I predict they will disappear from SERPs soon as pages with duplicated content.
 
I predict they will disappear from SERPs soon as pages with duplicated content.
taking back this one. checked with an old browser. it's just a duplicating notice. I thought that error message is all that a crawler can see.
so I replace "will disappear from SERP" with "will drop down in SERPs" as G can't afford to show links with low CTR.
 
Okay thanks to @Jeremy P's efforts in tracking this down we now have a workaround in place for this and have been able to shed some light on the situation.

The reason changing data-app="public" to any other value works is because there are some relevant PWA bits that only run if that value is set to public.

Inexplicably, it turns out that the root cause of this issue is in fact a bug in "headless Chromium" which causes it to crash when it accesses the Notification.badge API.

This existing bug has been reported here:

We will attempt to give them a nudge but from an XF point of view it is fixed. We now detect if the user agent appears to be from Lighthouse and bypass that API in that case.

Those changes are rolled out here if you'd like to test them.
 
Last edited:
Okay thanks to @Jeremy P's efforts in tracking this down we now have a workaround in place for this and have been able to shed some light on the situation.

The reason changing data-app="public" to any other value works is because there are some relevant PWA bits that only run if that value is set to public.

Inexplicably, it turns out that the root cause of this issue is in fact a bug in "headless Chromium" which causes it to crash when it accesses the Notification.badge API.

This existing bug has been reported here:

We will attempt to give them a nudge but from an XF point of view it is fixed. We now detect if the user agent appears to be from Lighthouse and bypass that API in that case.

Those changes are rolled out here if you'd like to test them.
did this make it into the release? just upgraded to 2.2 and lighthouse crashes.
 
Can you be more specific? Does it give an error? How are you accessing Lighthouse? Through the browser or one of the Google tools, and which one?
 
ran it through webpagetest.org, clicked on the light house button, and it showed the same error as before in this thread.

Ran it again this afternoon and it seems to be working. Perhaps it was a bug on their side last night...
 
Top Bottom