icidasset / diffuse

A music player that connects to your cloud/distributed storage.
https://diffuse.sh
Other
808 stars 67 forks source link

Propose solutions in the "Failed to start the service worker" error #325

Closed Winterhuman closed 2 years ago

Winterhuman commented 2 years ago

I was using Firefox v100 and getting "Failed to start the service worker.". When I hit F12, I saw these errors:

Failed to register/update a ServiceWorker for scope ‘https://diffuse.sh/’: Storage access is restricted in this context due to user settings or private browsing mode. ui.js:2:115127
DOMException: The operation is insecure. ui.js:2:115178
    <anonymous> https://diffuse.sh/ui.js:2
    (Async: promise callback)
    <anonymous> https://diffuse.sh/ui.js:2
    <anonymous> https://diffuse.sh/ui.js:12

What fixed it was adding an expection for https://diffuse.sh in the Cookies and Site Data settings since "Delete cookies and site data when Firefox is closed" was enabled. It'd be nice if Diffuse prompted possible solutions to try, maybe change the proposals depending on the browser detected or propose all browser solutions at once, like: "For Firefox, check Cookies and Site Data for if https://diffuse.sh can access browser storage".

icidasset commented 2 years ago

Thanks @Winterhuman, I had no idea this was a thing! I'll look into it soon 👍

icidasset commented 2 years ago

Seems to be a Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1413615

I'll just add a better message for Firefox as suggested 👌

icidasset commented 2 years ago

Service worker message will be adjusted for Firefox in Diffuse version 3.1.0