Closed Bug 1777419 Opened 2 years ago Closed 2 years ago

"Delete cookies and site data when Firefox is closed" checkbox gets disabled on startup

Categories

(Toolkit :: Data Sanitization, defect, P1)

Firefox 102
defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 102+ fixed
firefox102 + fixed

People

(Reporter: CoWindler02, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Steps to reproduce:

I updated Firefox 101 to 102 on Win10.

Actual results:

In Firefox 102 on Win10 (German version) now the menu checkmark "Delete cookies and website data when closing Firefox" disables itself after browser restart. Instead now the menu "Delete browser history when closing Firefox" falsely enables itself.

This would be a disastrous privacy flaw, because normally people want to keep their browsing history but discard the cookie spy garbage to prevent e.g. personalized too high prices in online shops. However it seems to be that only the menu in the browser settings got messed up but the browser still behaves correctly. I already tried start in safe mode but the bug persists.

Expected results:

Like in FF101 and before, "Delete cookies and website data when closing Firefox" should remember its state and "Delete browser history when closing Firefox" should never turn on by itself.

The Bugbug bot thinks this bug should belong to the 'Core::Privacy: Anti-Tracking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Privacy: Anti-Tracking
Product: Firefox → Core

Hannah, could you take a look please? Thanks!

Flags: needinfo?(hpeuckmann)
Component: Privacy: Anti-Tracking → Data Sanitization
Product: Core → Toolkit

The migration code from Bug 1681498 migrates the pref behind the "Delete cookies and site data when Firefox is closed" checkbox on startup. However the checkbox still updates the pref we migrate away from. This means after startup it becomes unchecked again, even though the sanitize-on-shutdown mechanism is still enabled.

This is caused by a partial backout from 102. We backed out Bug 1681498 but failed to back out Bug 1681495, which updates the checkbox code.
This is the partial backout: https://bugzilla.mozilla.org/show_bug.cgi?id=1681495#c11

The issue is fixed in 103, because that version contains both patches.

[Tracking Requested - why for this release]:
This bug may confuse users, since it appears as if the shutdown clearing gets disabled again after startup, even though it's still active. It is also not straightforward to disable the feature again, since the new prefs are managed in the "History" section: "Firefox will use custom settings for History".

Also NI to Pascal for visibility.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(pascalc)
Priority: -- → P1
Regressed by: 1681495, 1681498

Since ESR also has Bug 1681498 causing this issue I suggest we back it out, instead of uplifting Bug 1681495, which is higher risk.

Flags: needinfo?(pascalc)

The bug is marked as tracked for firefox102 (release). However, the bug still isn't assigned.

:pbz, could you please find an assignee for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbz)

We can uplift the backout of Bug 1681498 for ESR 102.1.0 which ships on July 26.
I am tracking this bug for the inclusion of the backout in a potential dot release before we ship 103.

Thanks Pascal!
Note that Bug 1681498 is a pref migration so clients that have it will have their prefs migrated on startup. A backout will not fix the UI issue for these clients until they manually check the checkbox or they get 103 which includes the UI fix from Bug 1681495. However, I think this is preferred over shipping Bug 1681495 which seems riskier.

Flags: needinfo?(pbz)
Flags: needinfo?(hpeuckmann)

As a workaround I suggest to use the History settings to clear data on shutdown. If you select Cookies, Cache, offline website data that has the same effect as using the "Delete cookies and site data when Firefox is closed" checkbox. It will take any exceptions you have set into account.

Summary: Clear cookies & history on exit broken in FF 102. → "Delete cookies and site data when Firefox is closed" checkbox gets disabled on startup
See Also: → 1771024

Paul, the patch in Bug 1681498 does not back out cleanly from the release branch, I believe that bug 1770881 which also landed during the 102 cycle should be backed out first from the mozilla-release branch to avoid the conflicts or we would need to import a patch for bug 1681498 that doesn't conflict with the branch.

Flags: needinfo?(pbz)

I've confirmed with Hannah that we can backout both bug 1681498 and bug 1770881. Does that back out without conflicts? Let me know if you need anything else.

Flags: needinfo?(pbz)

i have the same problem!
Now after the latest update 102.0.1 the tick stays in "Delete cookies and website data when closing Firefox" but the sites disappear from the exceptions when i restart FF!

(In reply to qaj1shi from comment #14)

i have the same problem!
Now after the latest update 102.0.1 the tick stays in "Delete cookies and website data when closing Firefox" but the sites disappear from the exceptions when i restart FF!

I can't reproduce this issue on 102.0.1. Could you check your setting in the "History" section of about:preferences#privacy? You might have Firefox set to clear this data on shutdown. Try if unchecking "Clear history when Firefox closes" fixes your issue. See https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox#w_how-do-i-make-firefox-clear-my-history-automatically
If you still run into issues after that, please file a new bug and link it here and I can take a closer look. When filing a bug, please include your data from about:support.

(In reply to Paul Zühlcke [:pbz] from comment #15)

(In reply to qaj1shi from comment #14)

i have the same problem!
Now after the latest update 102.0.1 the tick stays in "Delete cookies and website data when closing Firefox" but the sites disappear from the exceptions when i restart FF!

I can't reproduce this issue on 102.0.1. Could you check your setting in the "History" section of about:preferences#privacy? You might have Firefox set to clear this data on shutdown. Try if unchecking "Clear history when Firefox closes" fixes your issue. See https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox#w_how-do-i-make-firefox-clear-my-history-automatically
If you still run into issues after that, please file a new bug and link it here and I can take a closer look. When filing a bug, please include your data from about:support.

thank you for your answer. This helped me. Nevertheless i'd like to keep the settings this way (image link because i cannot attach it here).

https://i.imgur.com/DEqHXY2.png

https://i.imgur.com/52STtAh.png

(In reply to qaj1shi from comment #16)

(In reply to Paul Zühlcke [:pbz] from comment #15)

(In reply to qaj1shi from comment #14)

i have the same problem!
Now after the latest update 102.0.1 the tick stays in "Delete cookies and website data when closing Firefox" but the sites disappear from the exceptions when i restart FF!

I can't reproduce this issue on 102.0.1. Could you check your setting in the "History" section of about:preferences#privacy? You might have Firefox set to clear this data on shutdown. Try if unchecking "Clear history when Firefox closes" fixes your issue. See https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox#w_how-do-i-make-firefox-clear-my-history-automatically
If you still run into issues after that, please file a new bug and link it here and I can take a closer look. When filing a bug, please include your data from about:support.

thank you for your answer. This helped me. Nevertheless i'd like to keep the settings this way (image link because i cannot attach it here).

https://i.imgur.com/DEqHXY2.png

https://i.imgur.com/52STtAh.png

Glad that this fixes the issue. There is Bug 1658094 for site preferences also clearing exceptions.

(In reply to Paul Zühlcke [:pbz] from comment #3)

This is caused by a partial backout from 102. We backed out Bug 1681498 but failed to back out Bug 1681495, which updates the checkbox code.
This is the partial backout: https://bugzilla.mozilla.org/show_bug.cgi?id=1681495#c11

The issue is fixed in 103, because that version contains both patches.

Duplicate bug 1777981 suggests that Firefox 103 is affected. Or maybe that is a different issue. Is 103 actually affected?

This bug is still on for Firefox version 102.0-1 - Fedora 36. Now I don't know if 102.0.1esr is the same as Fedora 36's 102.0-1. If it is not, then please ignore this comment
Installed Packages
firefox.x86_64 102.0-1.fc36 @updates

I hope we will get a fix for this one soon.
It's really annoying to having to double check that Delete cookies and site data when Firefox is closed is checked and Clear history when Firefox closes is unchecked each time I'm either restarting or shutting the computer/firefox down.

Closing this as fixed since there are no further affected versions.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

This bug is present again in Firefox 105 on Windows.

Version 105.0.3 (64-Bit)

The checkbox for "Delete cookies and site data when Firefox is closed" rechecks itself automatically after a restart of the browser even though set to "off" manually.

In addition, the selector History - Firefox will "Remember History" changes back to "Use custom settings for history" without user intervention after a restart of the browser.

This is a very annoying bug...

Hi Joerg! This is unexpected. I can't reproduce this issue on Windows 10 with Firefox 105.0.3.

The migration should only run if the network.cookie.lifetimePolicy is set. Do you somehow set that pref, e.g. via user.js? Does the issue occur every time you start Firefox, or did it only happen once?

To better investigate the issue it would be helpful if you could create a new bug and link it here. Please also provide your data from about:support there for troubleshooting.

Thanks!

Flags: needinfo?(joerg)

QA was also unable to reproduce the issue mentioned in Comment 24.

Like Paul mentioned above (I've hit a mid-air collision. Paul was faster :D) more information should help greatly (about:support data, if a user.js is somehow set or if there are some policies active/displayed inside the about:policies page). Thanks!

^ nvm, it's still there for migrations: https://searchfox.org/mozilla-central/search?q=lifetimePolicy&path=&case=false&regexp=false. sorry for the noise

Flags: needinfo?(joerg)
You need to log in before you can comment on or make changes to this bug.