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
975 stars 176 forks source link

Extension forces all Facebook tabs to load at startup, completely exhausing all memory #716

Open jakejgw opened 3 years ago

jakejgw commented 3 years ago

Actual behavior

Firefox starts up and restores three windows containing hundreds of tabs, including many (~100?) Facebook tabs. Firefox is set to restore tabs on startup, and is set not to load tabs until requested. Firefox stalls while Facebook Container extension apparently loads every single Facebook tab. The entire system eventually stalls when all 8GB physical memory and 5GB swap are completely exhausted.

Expected behavior

Firefox starts up and restores all previously open tabs. Only the single focused tab in each of the three open windows is loaded. Facebook tabs do not load until requested.

Steps to reproduce

  1. Quit Firefox (or kill process if needed).
  2. Restart Firefox.
natelovesyou commented 3 years ago

I was looking for information on why Firefox was getting bogged down and even crashing when trying to resume because most or all Facebook tabs were being opened on session restore. It's maddening how long it takes Firefox to start up because of it. I'm glad to find out it was the fault of an extension, but hopefully it's fixed soon. I may have to disable the culprit until then.

natelovesyou commented 3 years ago

Steps to reproduce:

  1. Install Facebook Container (2.1.2) on Firefox (using Nightly 86.0a1 (2021-01-17) 64-bit).
  2. Open Facebook in multiple tabs.
  3. Close Firefox.
  4. Open Firefox and resume the last session (if not set to automatically resume).
  5. Observe that all of the Facebook tabs load, and only the Facebook tabs. All other sites remain unloaded.
jakejgw commented 3 years ago

Workaround: Don't use this extension at all; instead use Firefox Multi-Account Containers. It requires some setup:

maxxcrawford commented 3 years ago

@jakejgw @natelovesyou I walked through the steps and can confirm the issue. It looks like it only applies to facebook.com domains? (I had messenger.com open in a tab as well and it wouldn't reload on start-up).

We'll look into this.

cc/ @groovecoder

maxxcrawford commented 3 years ago

Looks like this function may be the culprit.

In this function, we comments for the following bugs:

mohmyo commented 3 years ago

I dropped using Facebook Container 2 weeks ago because of this issue, it was also eating up ram so badly. I'm using windows 10 latest version, both FB container and FF on the latest version too.