Skip to content
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

bugfix: Fix Temporary Containers Automatic mode | change firefox -> zen for default cookiestore id #2411

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lbrooney
Copy link

@lbrooney lbrooney commented Oct 30, 2024

Closes #172

This PR fixes automatic mode for Temporary Containers by patching firefox-default to zen-default. I also included changes to the other store names to maintain consistency.

Based off brief testing this does not impact Workspaces. The default container of a workspace takes precedence over an automatic container.

I can't comment whether this fix breaks other container extensions. If they hardcoded checking cookieStoreId against firefox-default, then this fix would break them.

Why temporary containers didn't work

Inspecting the Temporary Containers extension and then opening a new tab, you will notice an uncaught error from showOrHide caused by L4943.

Examining Temporary Containers source code, showOrHide is found in pageaction.ts with the line causing the throw at L43. The correct behaviour is the if else on L31 executing, not the else.

In Zen that if else doesn't execute because Temporary Container assumes the default cookieStoreId is the browser's name (zen) appended with -default. However the default cookiestore id is set to firefox-default. Thus the else if doesn't execute as zen-default does not equal firefox-default and the extension proceeds to the else causing the error.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Bug labels Oct 30, 2024
@lbrooney lbrooney changed the title bugfix: change firefox -> zen for store name bugfix: change firefox -> zen for default store name Oct 30, 2024
@lbrooney lbrooney changed the title bugfix: change firefox -> zen for default store name bugfix: change firefox -> zen for default cookiestore name Oct 30, 2024
@mr-cheff
Copy link
Member

Id have to investigate this, as idk if it'll log out of all session for all users updating

@lbrooney
Copy link
Author

Based off a quick test, when using the tab without a container, I don't get logged out of accounts when I change from firefox-default to zen-default and vice versa. This was done in the dev environment. Also doesn't affect the session status in other containers. Excited to hear your results!

@lbrooney lbrooney changed the title bugfix: change firefox -> zen for default cookiestore name bugfix: Fix Temporary Containers Automatic mode | change firefox -> zen for default cookiestore id Nov 5, 2024
@lbrooney
Copy link
Author

Hi,
Just wondering if there were anything blocking this from being merged? If there's something I can do to help out or speed it along I'm willing to contribute.

Thanks for all your hard work!

@lbrooney
Copy link
Author

lbrooney commented Nov 16, 2024

This PR would break Simple Tab Groups automatic temporary container functionality as it checks against firefox-default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: To Review
Development

Successfully merging this pull request may close these issues.

Temporary Containers Automatic Mode doesn't work on Zen Browser
2 participants