ray-lothian / UserAgent-Switcher

A User-Agent spoofer browser extension that is highly configurable
https://webextension.org/listing/useragent-switcher.html
Mozilla Public License 2.0
923 stars 143 forks source link

Firefox: Containers Reset when Pressing "Restart" If No Other Addons Depends On Container #91

Open MikuAuahDark opened 4 years ago

MikuAuahDark commented 4 years ago

I just lost all my container window because this. If container is enabled using this method and pressing reset, containers are reset to their defaults. This is because Firefox mark the extension depends on container (privacy.userContext.extension pref in about:config) and when the extension is reset, Firefox is "somehow"(?) notified that the addon is disabled, and since there are no more extension that depends on container, Firefox disables (and deleting all the) container(s) altogether.

I'm not even sure if this is caused by unsupported scenario of using containers at all, but it's worth to know that this happends.

ray-lothian commented 3 years ago

I am not able to reproduce this. The reset has nothing to do with the container itself. It just clears a local preference to let the extension know the agent is not needed anymore. Can you confirm this on a clean profile?

MikuAuahDark commented 3 years ago

Hello, I misinterpret the button, sorry. It was "Restart" button that caused this. Here's the video of me reproducing that problem: https://youtu.be/WdwoMhcGzB4

ray-lothian commented 3 years ago

I can reproduce this now. It looks like FF clears the container data when there is no extension to use it. When the restart is pressed the extension gets disabled and then enabled. On the disabled state, there is no other extension to use the containers, and hence FF deletes all the custom data! There is an ongoing discussion here: https://bugzilla.mozilla.org/show_bug.cgi?id=1549204

I hope this bug gets fixed soon otherwise we should warn users