Since updating to the latest version, I can no longer enable browser push notifications on Twitter. I get this message when going to the Web notifications section under the user settings:
Browser notifications are unsupported
This browser doesn't support web notifications.
I have tried changing the site specific useragent to a few of the latest, most common firefox ones to no avail.
If you go to about:config and set dom.serviceWorkers.enabled to true, does that fix it?
(I don't know if restarting Waterfox is required for that to take effect.)
If you go to
about:configand setdom.serviceWorkers.enabledtotrue, does that fix it?(I don't know if restarting Waterfox is required for that to take effect.)
Seems to fix it but I never had to enable this before and would prefer not to.
I never had to enable this before and would prefer not to.
It was enabled by default before. see https://github.com/MrAlex94/Waterfox/commit/521afd50114f7814ad7f0c013fd7c3dfad15d4e5
Surprised Twitter needs service workers for Notifications.
Btw service workers were enabled previously but disabled them due to some
issues.
On Sat, 16 Mar 2019 at 14:57, SenpaiSharp notifications@github.com wrote:
If you go to about:config and set dom.serviceWorkers.enabled to true,
does that fix it?(I don't know if restarting Waterfox is required for that to take effect.)
Seems to fix it but I never had to enable this before and would prefer not
to.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MrAlex94/Waterfox/issues/893#issuecomment-473538343,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEgoWMTg6a70VfvZAgic8NWhbPJFIrV-ks5vXQZQgaJpZM4b3zt_
.
Fair enough, I was unaware that it was enabled before. I am confused reading up on it, as some places are inferring that no notifications would work without it enabled but plenty of other places I tried worked fine.
From https://github.com/MrAlex94/Waterfox/issues/545#issue-321359296 (2018-05-08):
… Push notifications rely on service workers …
Surprised Twitter needs service workers for Notifications.
Best I can tell, there's a check to see if they're enabled before they'll allow notifications to be enabled but they don't actually seem to use that type of notification. I'm guessing this is some weird mix of legacy and newer code getting their wires crossed but that's just my speculation.
To test this, I re-enabled them and installed the Block Service Workers extension:
https://addons.mozilla.org/en-US/firefox/addon/block-service-workers/
The extension works seems to do its job. It blocks on visiting Youtube and it blocks this push notifications test, for example:
https://gauntface.github.io/simple-push-demo/
But on Twitter, with the service workers enabled, it lets me allow web notifications and they do work but at no time is anything ever blocked by the extension.
I get this:

– and this:

– but then I don't know when something might occur to trigger a notification, because I'm really not into _following_:

@SenpaiSharp I temporarily followed you, would you like to do something that might trigger a notification here?
@SenpaiSharp maybe put that thought on hold. Sorry.
I forgot, for test purposes I un-registered my two service workers for Twitter.
Neither worker has been regained (and I have no Service Worker Detector icon in my address bar):
I'll re-enable my Redirector redirect to mobile Twitter, this might cause one of the two workers to reappear sooner rather than later …
@SenpaiSharp I temporarily followed you, would you like to do something that might trigger a notification here?
I got a notification when you followed me, actually.
For reference this is what I get when dom.serviceWorkers.enabled is set to False.

And when set to true.

My settings page looks different than yours, I'm guessing it's just a Windows vs Mac thing.

As you can see, nothing has been blocked:

As I said, I got a notification when you followed me. I didn't screencap it because I didn't realize it was you but it did work. My only conclusion is that Twitter has a check on the settings page for service workers, but ultimately doesn't actually use or need them for their implementation. Why they even check, I don't know. If there's something that could fool it without having to set dom.serviceWorkers.enabled to true, that would be nice but in fairness, this feels like something Twitter should fix on their end.
Edit: Just for posterity, here's a notification via twitter:

and here's the Blocker working as intended, in conjunction with no conflict:

Thanks.
Side note,
My settings page looks different than yours, I'm guessing it's just a Windows vs Mac thing.
I use Breezemite with KDE – on FreeBSD-CURRENT (I switched away from Apple).
The major differences in my screenshots were probably from me using a narrow window.
@SenpaiSharp please clarify:
When that notification appeared, did you (or did you not) have a worker for Twitter at about:serviceworkers?
Okay, apparently I do have one registered. Neither Service Worker Detector nor Block Service Workers appear to catch it.
The Service Worker Detector icon appears only when a worker is active.
Block Service Workers does not have a retrospective effect. I clarified the first bullet point at https://github.com/MrAlex94/Waterfox/issues/545#issuecomment-473608315
I can unregister it and Block Service Workers won't catch it when I reenable notifications on Twitter.
Compare to this test: https://gauntface.github.io/simple-push-demo/
After unregistering

Twitter will waltz through without problem. Whatever the difference is between the Twitter and everything else, I'm afraid I can't say.
unregister it and Block Service Workers won't catch it
Did you close all Twitter tabs before un-registering?
I regained a https://mobile.twitter.com/sw.js worker. I can't tell exactly when or how it was regained, but my serviceworker.txt file was modified 18:36 yesterday (Sunday).
Yes. I've gone as far as using a fresh profile on a separate install. Twitter somehow always evades Block Service Workers.
I've done more testing and a lot more confirmation that BSW is completely evaded by Twitter. I don't know why and as this is far out of the scope of Waterfox at this time, I'm going to close this. I have decided to just move on with service workers entirely disabled and will find another solution for my notification needs.
… I forgot, for test purposes I un-registered my two service workers for Twitter.
Neither worker has been regained
After regaining both workers, I un-registered the one for mobile Twitter then found the remaining worker apparently working for push notifications.
A notification at launch time:

For the only Twitter worker in Firefox, no push endpoint:

Waterfox, post-launch:

For the only Twitter worker in Waterfox, a push endpoint:

Most helpful comment
Seems to fix it but I never had to enable this before and would prefer not to.