lapcat/SafariExtensions

Service worker will crash when trying to start loading up again

Opened this issue · 3 comments

This crash is related to the following simultaneous conditions:

The extension is configured for Manifest 3.
The extension is configured with a content script for a particular host.
The user has granted the extension permission to access the content script host
The user has navigated to an extension page, e.g. safari-web-extension:///index.html
Enough time (~30 secs) has elapsed and service worker is shut down normally (status = "not loaded")
When the service worker starts up again, it will crash, resulting in status = "failed to load". It can take 2 unload/reload cycles for the crash to happen.

Repro here: https://github.com/getchardy/safari-extension-bug-service-worker-crash

This sounds like it might be the same as #39

For what it's worth this error became much rarer for me after upgrading to a recent (M2) mac. It would happen all the time on my old Intel Mac Mini.

Is this any better in Safari Technology Preview 192?

Unfortunately not :(