I got Chrome auto updated and now I have the lighthouse tab in devtools instead of the audit. I used to be able to test my own page via audit and get full score: https://medda86.com/ But now the devtools lighthouse crashes and I think it's because of my serviceworker or something.
It used to run fine before Chrome update, not sure what else it could be. Please have a go at it if you want and try to find out what it is, I can't pinpoint exactly what it is.
The service worker should be working, just install, cache, delete old cache, and fetch latest data. But could be something that have changed.
Chrome version: Chrome is up to date Version 95.0.4638.54 (Official Build) (64-bit)
Here is my service worker:
var cacheName = 'site-cache-v1';
// Install
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(cacheName).then(function(cache) {
//console.log('Service Worker Installed');
})
);
});
// Delete old cache objects
self.addEventListener('activate', function(event) {
event.waitUntil(caches.keys().then(function (keyList) {
Promise.all(keyList.map(function (key) {
if (key === cacheName) {
return;
}
caches.delete(key);
//console.log('Old Service Worker '+key+' Deleted');
}));
}));
//console.log('Service Worker Activated');
});
self.addEventListener('fetch', function(event) {
//console.log('Fetch', event.request);
});