stoically / temporary-containers

Firefox Add-on that lets you open automatically managed disposable containers
https://addons.mozilla.org/firefox/addon/temporary-containers/
MIT License
846 stars 57 forks source link

Does not open a temporary container for a new tab #633

Open electriquo opened 9 months ago

electriquo commented 9 months ago

Actual behavior

I am using a new Firefox profile with only Temporary Containers installed (see support.txt and debug.log below), which is configured in Automatic Mode. I do not use a temporary container with any target domains. That is, even if I open the same domain, temporary containers used to open a new temporary container.

Today, I've noticed that this is not the case, if I head to the console and do (yes, I issue the same command twice)

$ firefox https://github.com/stoically/temporary-containers
$ firefox https://github.com/stoically/temporary-containers

Then Firefox will open the URL in the same container. The same holds when clicking a any link in external program, Firefox will open the URL in the same container of the domain.

I feels like it uses a Permanent Container.

Expected behavior

For every new tab, temporary container must not switch to a container with the same domain.

Steps to reproduce

  1. Create a new Firefox profile and set it as a default profile
  2. Install Temporary Containers extension
  3. Open the OS console and open the same URL more than once, e.g.
    $ firefox https://github.com/stoically/temporary-containers
    $ firefox https://github.com/stoically/temporary-containers
  4. Or, open any external program that has a support for clicking on hyperlinks (e.g. Slack), and click the hyperlink more than once

Notes

This kinda the opposite than Multi-Account Containers since the URL is not opened in a new temporary container. It is opened in the same container which the user is already logged in.

I also noted that even if there are 2 different temporary containers for the same domain, the first temporary container will be used for a URL with the same domain.

Files are attached debug.log support.txt

Starwhooper commented 9 months ago

I'm afraid I can confirm that this problem exists. I use Firefox Developer Edition 121.0b4 (64-bit). The problem didn't occur until about 2 or 3 weeks ago.

My test is very simple. I started Firefox several times like this: C:\Program Files\Firefox Developer Edition>firefox.exe https://github.com C:\Program Files\Firefox Developer Edition>firefox.exe https://github.com C:\Program Files\Firefox Developer Edition>firefox.exe https://github.com Firefox then had three tabs, but all in the same container.

The same test with https://google.de and https://wikipedia.de leads to different containers. At https://de.wikipedia.org it is always the same container, too.

Regards, Thiemo

electriquo commented 9 months ago

@Starwhooper Thanks for your confirmation. The extension has not been updated lately whereas Firefox has and maybe everything is related to changes in Firefox itself. I cannot tell whether this is the case but I hope the developer will.

Maybe you could attach relevant logs so the developer will have more information.

crssi commented 9 months ago

I hope the developer will

Its still very hard for me to inform you, but the developer very unfortunately isn't among us any more. 😢

electriquo commented 9 months ago

@crssi Mind me asking a newbie question, how do you know that?

crssi commented 9 months ago

@crssi Mind me asking a newbie question, how do you know that?

https://github.com/stoically/temporary-containers/issues/618

electriquo commented 9 months ago

I raised an issue calling all community to assist and revive the project

MzHub commented 8 months ago

It looks to me that this is also a new bug in Firefox's own container functionality too.

If I have a tab open on domain.tld in a named container, let's say Work, then opening a link to https://domain.tld/whatever from an external application will open the link in Work container, even when I have not set domain.tld links to open in Work by default. Otherwise it will open in a containerless tab.

This isn't how it should work in the basic container functionality, even without Temporary Containers, right? It should respect the "always open" setting for that domain, right?

I have not yet tested this in a clean Firefox with no extensions installed. Also I haven't found any other information on this bug other than this issue.

We could work towards submitting this to bugzilla if it is a Firefox bug, and maybe get this fixed without changing Temporary Containers.

electriquo commented 8 months ago

@MzHub

This isn't how it should work in the basic container functionality, even without Temporary Containers, right? It should respect the "always open" setting for that domain, right?

I have not yet tested this in a clean Firefox with no extensions installed. Also I haven't found any other information on this bug other than this issue.

Thank you for that info. You can easily verify whether the issues related to Firefox or Temporary Containers (or both) :) by:

  1. Creating a new Firefox profile from Firefox itself or from the command line
  2. Launch the new profile
  3. Install Multi-Account Containers addon
  4. Test whether it is a Firefox related issue
  5. If it is, then file a Bugzilla issue (please share the link with us)
  6. If it isn't, then install Temporary Containers addon
  7. Test whether it is a Temporary Containers bug

We will be happy to hear from you

p5nbTgip0r commented 8 months ago

We could work towards submitting this to bugzilla if it is a Firefox bug, and maybe get this fixed without changing Temporary Containers.

I believe this commit is ultimately the cause of this behavior, and it was made because of this feature request so I don't know if it'd be treated as a bug, however the lack of a way to disable it seems like an oversight to me. Unfortunately it also seems to break this extension :\

electriquo commented 8 months ago

@p5nbTgip0r Thanks for that. I wonder what can be done about it... any ideas?

MzHub commented 7 months ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1874599

Looks like this might be worse than it seemed at first. The new guessing feature can even override your "Always Open In Container" settings.

One downside here is that "Always Open" seems to be a feature of the official Multi-Account Containers extension, but since that extension is almost required to be able to use containers, I'd still consider that pretty bad.

MzHub commented 4 months ago

For the record: tested this now in Firefox 124 with about:config setting browser.link.force_default_user_context_id_for_external_opens set to true, and Temporary Containers works again as expected.

My fear was that the fix would again bypass Temporary Containers and force all external urls into the default container ("no container"), but that did not happen.