-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary containers not removed with new sync feature #371
Comments
That's unfortunate. I've mentioned this during review of the sync feature, and it was said that it should work. I'll look into it at some point, but it might be worth filing this in the MAC issues as well, since in theory the containers should get deleted eventually. |
Maybe it's because @neekt is reusing available numbers, and the dedupe gets screwed up, as per your exchange here mozilla/multi-account-containers#1611 (comment) and the list of deleted containers gets confused? |
I'm hitting this myself but turning off sync hasn't helped. I have 1,000s of containers and manually deleting (which is not fun) only works for a minute or two until they all come back. |
If turning off sync in MAC lets the container reappear, then that's definitely a MAC bug that you might want to report there. Did you have "Reuse available numbers" active in TC while MACs sync was active? |
Edit - Sorry, false alarm. I did have about 20 TCs lingering in my list (which is why I was here to begin with) but they may have been leftover from when I was trying out the updated MAC. I had MAC with its sync enabled for a few days before deciding to disable it and continue with Containerise. Now (without MAC), after deleting the leftover TCs and trying to reproduce the issue, I've found that everything is working perfectly; newly abandoned TCs are deleted immediately and don't reappear. Thanks for your help. |
@okradonkey TCs not getting deleted at all without MAC is a different issue (since the container sync is part of MAC), and definitely shouldn't happen. Would you mind:
|
Can anyone suggest a way to delete all the containers? I have over a thousand, it's inhumane to delete them by hand. I turned off sync but they're still there slowing everything down. |
@3dc1d3 You could remove all containers that aren't currently active temporary containers, though that will remove all your permanent containers that you might want to keep. To remove all containers except currently active temporary containers:
|
Related issue over at MAC: mozilla/multi-account-containers#1675 |
Thanks @stoically. Unfortunately I just used that to remove more containers than I wanted due to an unfortunate press of the Enter key, but for those who want to avoid that, this snippet should only remove containers starting with const containers = await browser.contextualIdentities.query({});
await Promise.all(containers.map(container => {
if (tmp.container.isTemporary(container.cookieStoreId)) return;
const prefix = 'tmp';
if (container.name.substring(0, prefix.length) !== prefix) {
return;
}
// could add exceptions here for other permanent containers,
// e.g. by looking into the containers.json, like so:
// if (container.cookieStoreId === "firefox-container-123") return;
return browser.contextualIdentities.remove(container.cookieStoreId);
}));
console.log("done"); (People using a different prefix can replace |
thanks @stoically and @Vinnl - finally got around to it. 👍 |
hi, i try the @Vinnl code, it removes all tmp# containers.. but after a minute, all of them reappear. |
Would you care to uninstall MAC and try again? |
i broke my firefox profile doing the last operation. i am wating for a real solution for this, if you want i can try do something else (after re-backup my profile again xD) thanks! |
Anyone have any luck with any workarounds? |
I am also facing this issue, what is worse is due to some bug, 100 temporary containers were created and they are not getting deleted. |
Same here. Script does not work. The massive amount of tmp containers really slows down FF. |
@svendsvin You can delete the containers in a much easier way by going to Container Settings in Preferences. |
To spare anyone else the time it took me to find the menu @krishnanunnir is talking about. It's not in the add-on preferences. It's in the main Firefox preferences, under the "General" tab. |
actually the quickest way is to just type "about:preferences#containers" in
the url bar. I have it bookmarked just for this purpose :)
|
"about:preferences#containers" is really helpful, would still be very useful to have a button in the Temporary Containers controls somewhere to 'delete all temporary containers now'. If there's a disagreement with MAC sync at some point it seems like I could just shutdown browsers and clear them individually using this button. |
thank you! |
@stoically has cancelled funding for this issue.(Cancelled amount: $50.00) See it on IssueHunt |
Opened a PR over in MAC: mozilla/multi-account-containers#2231 |
I've used Containers Helper in the past to mass delete containers. |
This extension was helpful for mass deleting all the tmp containers that kept syncing - thanks! - but no containers are syncing at all now that that mess is cleaned up. Seems the mass of synced containers broke something on the back end. |
@neekt You probably hit the storage quota on the sync server. See my comment about "HTTP 507 Insufficient Storage" error above. I've heard that resetting your account password (as in, going through the "forgot password" flow) fixes that because that deletes everything stored server side. I have not tried that myself (yet), so I can't say from first hand if it works or not. |
@avian2 I just reset my account password via forgot password, and containers still aren't syncing at all. I'm not sure how storage quotas work on the server, but newly added bookmarks and extensions are still syncing. Sync is enabled in the Firefox Multi-Account Containers extension on both machines I'm testing this on. |
That is my experience as well. Only the multi-account containers add-on sync is affected by this problem. If I leave the sync enabled in Multi-Account containers, every once in a while Firefox will still download something like 8000 tmpxxxx containers from the server (which makes Firefox UI seriously unresponsive). I then have to run @vinni's console script to remove them. The deletion won't sync back to the server, so I tend to just leave sync disabled these days. You can enter "about:sync-log" in the URL bar and search for "Insufficient Storage" in the files there to see if this is still the same error happening for you after you did the "forgot password" thing. The files are ordered by date, so find one that was created after you reset the password. |
I haven't had this happen simply by leaving it enabled, but I did try to disabling and re-enabling containers in the browser yesterday, after which over one thousand tmp containers were synced to my browser 🙄 I can only conclude that resetting the password doesn't delete container data, despite the warning on accounts.firefox.com about everything being removed from the server when you do this. |
Just ran into this today. @Vinnl's solution in #371 (comment) helped, but my extension's sync was still bricked, and it kept pulling all of the dead
// Your temporary containers prefix:
// WARNING: this script removes any container with this prefix regardless of the origin!
const prefix = 'tmp';
// First, turn off sync to speed up the following steps. This is the same as the "Enable
// sync" checkbox in the Multi-Account Containers options page.
// IMPORTANT: leave this disabled until you finish fixing all of your Firefox profiles.
await browser.storage.local.set({ syncEnabled: false });
// Delete local containers that start with `prefix`:
const containers = await browser.contextualIdentities.query({});
await Promise.allSettled(containers.map(container => {
if (container.name.startsWith(prefix)) {
return browser.contextualIdentities.remove(container.cookieStoreId);
}
}));
// Delete containers from Multi-Account Containers' sync storage that start with `prefix`:
const data = await browser.storage.sync.get();
const keys = Object.keys(data).filter(k => data[k].name && data[k].name.startsWith(prefix));
await browser.storage.sync.remove(keys);
// If your sync is already broken, you may need to delete the following too. This list
// is one reason why sync breaks. The extension tries to put every deleted container
// ID here to notify your other profiles, and this can bump the sync storage over the
// quota limit:
await browser.storage.sync.remove('deletedIdentityList'); After that, I did a manual sync for good measure ( At this point, the container sync is still disabled from the code above. Unfortunately, I don't see a way to make sync reliable without something like @stoically's PR at mozilla/multi-account-containers#2231. In the meantime, it seems as if I can run manual syncs when needed:
|
crosslinking mozilla/multi-account-containers#2349 because I just opened it, then found this extensive issue already in progress |
The related PR that allows excluding containers from sync via regex was just merged: mozilla/multi-account-containers#2231 (comment) So, hopefully, the next version of multi-account-containers will work flawlessly ❤️ |
Thank you very much for this. It didn't work for me because the await Promise.allSettled(
containers.map(
container =>
{
if (container.name.substr(1).startsWith(prefix))
{
return browser.contextualIdentities.remove(container.cookieStoreId);
}
}
)
); ... const keys = Object.keys(data).filter(k => data[k].name && data[k].name.substr(1).startsWith(prefix)); Then it worked flawlessly. |
If you're using wayland on Linux this script might help to clean up tmp containers. Go to
Once confident in the number of tabs bump the 10 to 100 or so. This solution uses wtype, and allowed me to delete several hundred tmp containers in a few minutes. |
Despite all the great proposed solutions in this thread, I have found that the only way to fix the bricked cloud sync issue is to delete your Firefox account and sign up again. It takes ~5-10 mins. Steps:
Regarding the last step; if you use "Strict" mode in Firefox's Privacy & Security settings, temporary containers aren't really necessary from a privacy perspective any more, because this mode uses dynamic first-party isolation to isolate cookies anyway. I do still use the extension to create temporary containers manually on occasion though, e.g., if I want to sign into something temporarily. You'll also need to re-create all of your permanent containers. It's a bit of a pain, but they should all happily sync from now on. |
I just checked that now to see if I could find out when it will be released, and noticed this: mozilla/multi-account-containers#2444
So the fix is going to be reverted? :/ |
I have countless tmp* containers from past sessions, how can I delete them? |
Install an ADDITIONAL extension called Containers Helper. It helps batch
delete containers matching a specific string such as "tmp".
…On Tue, Feb 21, 2023 at 1:24 AM Andre ***@***.***> wrote:
I have countless tmp* containers from past sessions, how can I delete them?
—
Reply to this email directly, view it on GitHub
<#371 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPXB53AOMZRSLEKKOLU6NLWYOSELANCNFSM4KY4O6QA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
For anyon ethat wanst to batch delete containers, I found the UI to be extremly unhelpful especially if you want to delete 100+ containers. The easiest way I found is to just find your I'd really like to see the ability for users to whitelist containers they want to sync, and to add an option to force overwrite rremote storage from a local FF instance. Until then container sync is unfortunatly not usable. |
Note for anyone commenting here that Temporary Containers is no longer maintained, due to the owner and developer of this repository, @stoically, sadly passing away in January (see issue #618 ). |
I wrote a Python script that can clean out containers that start with |
I use "Container Helper" addon to delete the 1064 containers named tmp* |
I've just noticed that with Firefox's new Multi-Account Containers sync feature, temporary containers are being synced across browsers on different machines, and then not removed, even when all instances of the container (e.g., tmp4) are closed in both browsers. Completely closing both browsers and then re-opening doesn't get rid of them either. They can be manually removed, if you manually remove them from both browsers and then sync Firefox, but in my case I have found dozens of temporary containers are being synced and kept, so this is not practical.
I assume it's possible to deactivate the container syncing feature (it asks whether to activate it upon update to the new Multi-Account Containers version), but I actually find it quite useful. So if there is some way to prevent temporary containers from being synced (ideally), or (less ideally) to allow them to still be automatically removed even after they've synced, that would be great.
This is using Automatic Mode, deleting no longer needed temporary containers after the last tab in it closes, and reusing available numbers in settings. Everything else is set to default.
The text was updated successfully, but these errors were encountered: