Service workers terminating

243 views
Skip to first unread message

David H

unread,
Oct 30, 2024, 2:16:35 PMOct 30
to Chromium Extensions
Hello, had a question in regards to the change from background scripts to service workers.  I currently run an addon that has both a customer facing and developer/staff facing section to it.  With MV2, everything is fine as the script does not terminate when idle but with the changes to service workers that terminate after a certain length of time, I have ran into an issue as the staff facing part requires a lot more info to be pulled in from our API every time it initializes.  This leads to downtime I did not have with MV2.

Currently I am solving this by having two versions of the extension, one for staff that is using a heart beat style function as mentioned in the docs on how to keep a service worker alive and one for customers without this heart beat.  The staff one is an unpacked extension installed locally and the customer version is on the webstore.

I wanted to ask if merging the two into one extension and hosting it on the webstore would be breaking compliance with the current MV3 rules if the "staff" part (with the heart beat code) is not available to customers and only used by my staff as maintaining two different versions of this extension is not ideal.  

Thank you for your time!

woxxom

unread,
Oct 30, 2024, 6:40:30 PMOct 30
to Chromium Extensions, David H
In a sane world this is something that the user or developer of the extension should decide depending on the performance of the device and the importance of the extension's responsiveness. For example, due to the lack of a CSS userstyle API, extensions that provide this functionality and don't keep their service worker running forever will regularly cause flashes of unstyled content (FOUC), after the user made a pause for more than 30 seconds to read the tab and then navigated elsewhere, which is particularly blinding when the style changes the appearance substantially e.g. a dark theme.

David H

unread,
Oct 30, 2024, 8:32:57 PMOct 30
to Chromium Extensions, woxxom
Agreed but sadly we live in the real world so I felt a need to ask this question as it's not super clear where this situation would fall in regards to compliance to what Google wants.

Patrick Kettner

unread,
Oct 30, 2024, 8:41:34 PMOct 30
to David H, Chromium Extensions, woxxom
We can't approve anything other than the code itself, but what you are suggesting doesn't seem like something that would have an issue during review.

--
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 visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/a54ce02d-21ec-4294-a25a-fbcbb9576011n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages