GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.34k stars 105 forks source link

Improved message when web vitals not available #144

Closed tunetheweb closed 1 year ago

tunetheweb commented 1 year ago

We occasionally see reviews, or complaints on Twitter like this:

image

I noticed on our Corp machines when looking at some sites (e.g. www.youtube.com) we get a This page cannot be scripted due to an ExtensionsSettings policy. error in the service worker console, so suspect this is the cause of a lot of these errors.

~I think a quick fix here, rather than surfacing the exact error and feeding it through from the service worker to the popup page~ Actually I changed my mind and did it the full way after all.

image

Fixes https://github.com/GoogleChrome/web-vitals-extension/issues/118 Fixes https://github.com/GoogleChrome/web-vitals-extension/issues/54 Fixes https://github.com/GoogleChrome/web-vitals-extension/issues/56 As handles exceptions better and so switched from console.error to console.log as no need to surface them in the chrome://extensions page anymore.

tunetheweb commented 1 year ago

Updated implementation to feed through the message after all. Note, this supersedes #143 as it's a better solution that also switched to using console.log rather than console.error and so stops surfacing these "expected" errors to the chrome://extensions screen.