Service worker inactive - MV3

174 views
Skip to first unread message

Abdullah Al Naiem

unread,
Jan 23, 2022, 1:59:50 PM1/23/22
to Chromium Extensions
I'm having a problem with the service worker, in my extension a js file named "worker.js" which is used in the manifest file as "service_worker": "worker.js"
// worker.js file code
try {
self.importScripts('./js/background.js');
} catch (e) {
console.log('ERROR: ' + e);
}

background.js file is located in js folder
// background.js file code
setInterval(() => {

// my codes . . . . . . .
}, 25000);

it was working fine in MV2. The problem I noticed, service_worker (worker.js) sometimes works and sometimes it's not working. How can I figure out this problem?

Jackie Han

unread,
Jan 23, 2022, 3:42:30 PM1/23/22
to Abdullah Al Naiem, Chromium Extensions

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/a0f09b5a-643e-4be6-937a-4d020b799cdbn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages