Closed Bug 1831259 Opened 2 years ago Closed 1 years ago

The Forms and Autofill section and Always use private browsing mode Restart Firefox box were shown twice sometimes in the Privacy & Security Settings page

Categories

(Firefox :: Settings UI, defect, P3)

Firefox 114
defect

Tracking

()

VERIFIED FIXED
116 Branch
Tracking Status
firefox116 --- verified
firefox117 --- verified

People

(Reporter: matt.fagnani, Assigned: Gijs)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0

Steps to reproduce:

I started Firefox 114.0a1 20230503214103 on Wayland in Plasma 5.27.4 in a Fedora 38 KD Plasma installation. I selected the Edit > Settings in the menu bar. I selected the Privacy & Security page in Settings. The Forms and Autofill section had Autofill addresses and Autofill credit cards disabled. My profile normally had Always use private browsing mode selected. I clicked on Always use private browsing mode. I clicked on Restart Nightly Now in the Restart Firefox box showing Nightly must restart to disable this feature. I repeated the steps above many times to enable or disable Always use private browsing mode.

Actual results:

The Forms and Autofill section and Always use private browsing mode Restart Firefox box were shown twice sometimes in the Privacy & Security Settings page. The Forms and Autofill section was duplicated about 20% of the times I looked at the Privacy & Security Settings page. When the Forms and Autofill section was shown twice, the Always use private browsing mode Restart Firefox box was always shown again after clicking Restart Nightly Now. I'm attaching a recording of this problem. I've seen this problem occasionally in Firefox Nightly builds from the last few weeks at least.

Expected results:

The Forms and Autofill section and Always use private browsing mode Restart Firefox box should have been shown once in the Privacy & Security Settings page.

Component: Untriaged → Settings UI

I can't reproduce on a quick few attempts, but I can see how this could potentially happen. It's because pane initialization is async and I guess it's possible for it to be called twice, while the first initialization is still pending... That seems bad and I can at least fix that and then see if that resolves the issue for you.

Assignee: nobody → gijskruitbosch+bugs
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3

This should fix the issue experienced by the reporter. It also pushes the
re-entrancy guard into the the 'init' method we define on gCategoryInits
objects, and removes the asynchronicity which was only there for fluent's sake.

Instead of blocking the insertion on fluent, which meant that for the in-page
find functionality we do N initializations and fluent passes, we make each of
the 2 consumers responsible for checking translation has completed. This means
find in page now just has 1 fluent pass, instead of N passes for N categories.
This should speed up the find in page initialization, and means initialization
of a category is now sync instead of async.

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/db1ae5bf8516 prevent initialization re-entrancy for preference panes, r=mconley
Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/af6ffefb5572 prevent initialization re-entrancy for preference panes, r=mconley

Backed out for causing bc failures in browser_aboutPrefs_fc_check_cantApply.js

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_check_cantApply.js | The panel's link should have non-empty textContent, got "" - "" == true - got "", expected true (operator ==)
Flags: needinfo?(gijskruitbosch+bugs)
Depends on: 1835559

The change in bug 1835561 broke the patch by surfacing the racy issue that was already on file in bug 1835559, so this now has to wait for that bug to land.

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c34f2e337a31 prevent initialization re-entrancy for preference panes, r=mconley
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Regressions: 1836325
Regressions: 1836332

I've asked for this to be backed out of Nightly given the 2 regressions that have just been filed and where we are in the cycle.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 115 Branch → ---
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #9334196 - Attachment description: Bug 1831259 - prevent initialization re-entrancy for preference panes, r?#settings-reviewers → Bug 1831259 - prevent initialization re-entrancy for preference panes, r=mconley
Flags: needinfo?(gijskruitbosch+bugs)
Regressions: 1834567
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f0bb54e03054 prevent initialization re-entrancy for preference panes, r=mconley
Status: REOPENED → RESOLVED
Closed: 1 years ago1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1838549
Flags: qe-verify+
Regressions: 1842547

I cannot reproduce this issue either on my (Ubuntu) systems.
Matt Fagnani, does this issue still occur on your system in the latest Nightly and or latest Beta builds?
Help to verify this issue would be greatly appreciated.

Flags: needinfo?(matt.fagnani)

(In reply to Daniel Bodea [:danibodea] from comment #14)

I cannot reproduce this issue either on my (Ubuntu) systems.
Matt Fagnani, does this issue still occur on your system in the latest Nightly and or latest Beta builds?
Help to verify this issue would be greatly appreciated.

I haven't seen this problem in Nightly builds since the patch was merged in 116.0a1 20230607033033. I did see the problem once with 115.0 though. Thanks.

Flags: needinfo?(matt.fagnani)

That is expected considering that the fix has only been pushed into branch 116 and went into branch 117 since then.
Thank you for the help!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1869827
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: