mozilla / contain-facebook

Facebook Container isolates your Facebook activity from the rest of your web activity in order to prevent Facebook from tracking you outside of the Facebook website via third party cookies.
Mozilla Public License 2.0
974 stars 176 forks source link

Facebook container gets rid of all service workers on browser close #628

Open ecoreng opened 4 years ago

ecoreng commented 4 years ago

Narrowed it down to Facebook Container by disabling it and enabling all other extensions. Is this supposed to be the desired behavior? nuke all service workers regardless of relation to facebook?

This is an issue because (please correct me if I'm wrong) when a service worker that was used to subscribe to push notifications.. get unregistered it loses its ability to notify the user (who has opted in). So if a user wants to get notifications in Firefox while this add-on is enabled, they basically have to go back to the website and subscribe again on every browser open.

Expected behavior

Steps to reproduce

See above.

Notes

arjenm commented 4 years ago

While I don't use Facebook Container myself, I can confirm several others experience(d) this behavior.

I work for a website where we offer push notifications. But in contrast to most sites we send a push notification to inform the user the subscription is enabled. This behavior runs on every pageview and checks a account-based preference against the browsers push manager. Ergo it also triggers whenever someone visits with a new browser...

For most users they only receive very few 'hey, your browser now receives push notifications'-messages.

But in januari 2019 we started receiving a few reports from users receiving that message appearing everytime they visited the site after a browser close. Their Firefox didn't seem to have a valid push subscription after having closed the browser. Upon further investigation that behavior went afway after disabling/uninstalling Facebook Container.

Unfortunately they solved it by removing the plugin, I'm not sure if anyone thought to report a bug here (and neither did I).