Firefox Sync and temporary containers fix

My synchronized Firefox items got out of sync. Here is how I fixed that.

  1. Log out of Firefox Sync on every machine that has Firefox.
  2. Backup your profile on your master machine.
  3. On every machine except the machine I want to keep as master, delete all temporary containers.
    1. This is most easily done with about:preferences#containers
    2. Click on the remove button for all the temporary containers that start with tmp.
  4. Go to about:support in Firefox on the master machine.
    1. Click the Open Directory button to open the profile directory folder.
  5. Copy the containers.json file to an external file share of some sort. Could be a USB key, or NextCloud, or email it to yourself and use webmail to get a copy of it.
  6. Go to about:support in Firefox on the slave machine.
    1. Click the Open Directory button to open the profile directory folder.
    2. Exit Firefox.
  7. Copy the containers.json file from the external share to the opened profile folder. Yes – replace the file.
  8. Start Firefox on the slave machine, and log in to the containers you have set which need to keep their login state.

  1. Log in to Firefox Sync on the master machine. You can do this, though it will only really help with keeping bookmarks in sync.
    1. Note that it sent me a confirmation code to my email address.
  2. Log in to Firefox Sync on all the rest of the machines.
  1. Note that if in Step 2, you have too many containers to click the remove button on:
    1. Navigate to about:debugging#/runtime/this-firefox
    1. Click “Inspect” right to Temporary Containers
    2. Click “Console”
    3. Insert into the console
      1. const containers = await browser.contextualIdentities.query({});
      2. await Promise.all( => {
      3. if (tmp.container.isTemporary(container.cookieStoreId)) return;
      4. const prefix = 'tmp';
      5. if (, prefix.length) !== prefix) {return;}
      6. return browser.contextualIdentities.remove(container.cookieStoreId);
      7. }));
      8. console.log("done");

Credit where credit is due:

And of course … it does not work.

I have a set of temporary containers on my master machine, but, my other machines will not copy that list.

At least the slave instances don’t wipe out the master list.

I’ve updated this post with instructions that do copy the containers list to the slave machines. I don’t expect that Firefox Sync is going to be able to keep them in sync, though.

Leave a Reply