Closed Bug 2056857 Opened 2 months ago Closed 2 months ago

[Regression] in 153.0: Cannot open History sidebar (ctrl-H) when "Show Sidebar" is disabled in the settings

Categories

(Firefox :: Sidebar, defect, P1)

Firefox 153
defect
Points:
2

Tracking

()

VERIFIED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 154+ verified
firefox153 + verified
firefox154 + verified
firefox155 + verified

People

(Reporter: lloydsensei+bugzilla, Assigned: sfoster)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-sidebar])

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0

Steps to reproduce:

Settings > Tabs and browsing > Uncheck "Show Sidebar"
Ctrl-H

Actual results:

Nothing

Expected results:

History sidebar should have opened (but without the sidebar itself, which is disabled)

The Bugbug bot thinks this bug should belong to the 'Firefox::Sidebar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Sidebar

Can't reproduce on 153 release, beta or nightly.

Can you reproduce on a clean profile from the steps here? Does this happen 100% of the time, or does the problem go away and then come back? If you open the browser console (open with ctrl-shift-j), then try to open the sidebar a few times, do any new errors appear there ?

Flags: needinfo?(lloydsensei+bugzilla)
See Also: → 2056976, 2057015

Hello Gijs.
(Sorry for the lack of information in the original report, I did not expect it to be non-reproducible. I just now tried to reproduce it on another computer without success, even reverting to a clean profile on 152.0.6 and upgrading did not make the bug appear)
Thank you, I didn't know about the browser console, that's exactly what I needed to make a better bug report.

I cannot test with a clean profile because it's locked by policy, so I will try (tomorrow) the next best thing, removing the data and starting fresh. I expect it to work, because just like Bob in Bug 2056976, I also have tried with all extensions disabled (Troubleshoot mode) and ctrl-H did not function then.

Tomorrow, I will test with the browser console open:

  • Ctrl-B
  • Multiple Ctrl-B
  • Ctrl-H
  • Multiple Ctrl-H
  • Click on the "show taskbars" button
  • Multiple clicks on the "show taskbars" button
    And report back on what I can see.

Thank you for your support, and sorry for the wait.

Duplicate of this bug: 2056976
Duplicate of this bug: 2057015
Attached image browser console.png โ€”

Browser console while performing the following actions:
42 Ctrl-B
69 Ctrl-H
A few clicks on "Show sidebar (Alt+Ctrl+Z)"

Flags: needinfo?(lloydsensei+bugzilla)

Funny test I did:

  1. Install Firefox developer edition
  2. Notice that, out of the box, it has the same issue as my profile. (same errors as the previous message despite being a brand new profile I guess)

I'll now do what I mentioned a few messages ago: backup my profile, delete everything and start a new session.

Huh, surprisingly, the problem is the same even after uninstalling Firefox completely, removing the %appdata%\Mozilla and %localappdata%\Mozilla folders and starting a brand new browser!
I traced it down to the policies that are applied by my company. I'll disable them one by one and let you know which one is causing this.

Success, I traced it down to a single policy:
Preferences: { "network.http.http3.enable": { "Value": false, "Status": "default" } }
This policy breaks the sidebar when disabled in the settings.
Over to you for the explanation as to why this happens.

PS: for people coming here because they have the same bug, you can see which policies are active in about:policies and for Windows, in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox)

This policy breaks the sidebar when disabled in the settings.
To be more clear, I meant to say that this policy prevents the sidebar from opening when Show sidebar is unchecked in Tabs and browsing, which results in sidebar.visibility = hide-sidebar in about:config (the default is sidebar.visibility = always-show)

To add a little more.

I do not have the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox. I could not find "network.http.http3.enable" in about:policies.

However, when Show sidebar is checked in Tabs annd browsing, ctrl-B does work.

Additionally, in distribution/policies.json if I remove "PasswordManagerEnabled": false, or "PrimaryPassword": false, ctrl-B works without Show sidebar checked.

@Bob policies can be added in different ways, I should have mentioned that.
I now see that if I have ONLY the "Preferences" policy, the bug is gone, so it's a combination of policies which causes this. I'm trying to find which.

Strangely, now it's when I remove PasswordManagerEnabled that the bug is gone and it's no longer Preferences which blocks the sidebar.
When I start from a completely new profile, it works.
I add the policy PasswordManagerEnabled:false and restart the browser, the bug appears.

I'm not sure if this is a definitive analysis but we know it's policy-related now.

I'm assigning S3, though I'm not sure "restart the browser" is really a good workaround and there's a case to be made for S2 here.
I'll get a bandaid patch on here to fix the more reproducible issue and which is low-risk enough to uplift. That part traces most directly back to bug 1999812.

There will still an underlying issue that will need more investigation and likely a more involved patch that should be a follow-up. That's either regressed or only partly fixed by Bug 2034633.

Assignee: nobody → sfoster
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Points: --- → 2
Ever confirmed: true
Keywords: regression
Priority: -- → P1
Regressed by: 1999812
Whiteboard: [fidefe-sidebar]

(I'm taking about restarting the browser because that's how policies are changed. The problem is not about wether or not we restart the browser, but about which policies are set/enabled)
This patch will just hide the error, I don't think it will help much.
The cpmMenuItem should always exist. The error doesn't break anything so I'd vote against this change

(In reply to Camusensei from comment #16)

This patch will just hide the error, I don't think it will help much.
The cpmMenuItem should always exist.

Any of these elements can get removed if their visible property goes false, which can happen if one of the associated preferences changes value, or the window toggles between regular / smart window.

The error doesn't break anything so I'd vote against this change

The error has been shown to leave the sidebar unusable in some circumstances until the next restart. And if the browser starts up with both sidebar.revamp and browser.contextual-password-manager.enabled false, the sidebar will not work at all due to an exception being thrown during its initialization . The patch addresses this symptom, but you are right that its not a complete fix.

I see, sorry. I thought the sidebar which I was trying to open when the sidebar.visibility was "hide-sidebar" was still the same object (cpmMenuItem).
Is the PasswordManagerEnabled:false related to browser.contextual-password-manager.enabled? That would explain why cpmMenuItem becomes null when it's used with sidebar.visibility = hide-sidebar.

(In reply to Camusensei from comment #18)

Is the PasswordManagerEnabled:false related to browser.contextual-password-manager.enabled? That would explain why cpmMenuItem becomes null when it's used with sidebar.visibility = hide-sidebar.

Yes, setting PasswordManagerEnabled to false will lock and disable browser.contextual-password-manager.enabled.

Nominating for tracking back to ESR 153

[Tracking Requested - why for this release]: Especially for profiles managed by a policy where browser.contextual-password-manager.enabled defaults to false, this bug can cause the Bookmarks, History and other sidebar(s) to become inoperable.

Pushed by sfoster@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1bf85251e737 https://hg.mozilla.org/integration/autoland/rev/fee833d3a87e Ensure sidebar-switcher-megalist element exists before hiding it. r=Gijs,sclements
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

I'll put in uplift requests once I've checked the patch applies cleanly to beta and release branches. In the meantime it would be great to have QA verify the patch.

STR:

  • Set sidebar.revamp = false
  • Set browser.contextual-password-manager.enabled = false
  • cmd+Q to relaunch
    open browser console (cmd+shift+J)
  • Use ctrl+B or View > Sidebar > Bookmarks menu to open the bookmarks sidebar

ER:

  • The bookmarks sidebar opens, there are no new exceptions in the browser console

AR:

  • The bookmarks sidebar fails to open
  • In the browser console there's an exception like: Uncaught TypeError: can't access property "hidden", cpmMenuItem is null

If you have a way to test with policies, the other STR is to set "PasswordManagerEnabled": false. This has the same effect of disabling the browser.contextual-password-manager.enabled pref which is the root cause.

Flags: qe-verify+

The patch landed in nightly and beta is affected, along with ESR.
:sfoster, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(sfoster)

I'm not sure if that helps, but I have tested the nightly build and can confirm the bug is fixed.

Reproduced the issue on Firefox 153.0 on macOS 26.6 and Windows 11 by following the STR from Comment 23.

This is fixed on Firefox 155.0a1 (2026-07-31) on macOS 26.6, Windows 11 and Ubuntu 26.04. This was verified using the same repro STR from Comment 23 and by Policy method as well.

QA Contact: csasca

Could you request uplift to beta and release please? Thanks

  • Add a new marionette test to verify with different pref values at startup

Original Revision: https://phabricator.services.mozilla.com/D314156

Attachment #9620613 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: When both the "show sidebars" (sidebar.revamp) is disabled adn the PasswordManagerEnabled policy or browser.contextual-password-manager.enabled pref are disabled, its not possible to open sidebars (e.g. Bookmarks, History.)
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Manual QE not strictly necessary, the automated test seems to provide good coverage. But the steps in https://bugzilla.mozilla.org/show_bug.cgi?id=2056857#c23 are known to reproduce and verify the fix
  • Risk associated with taking this patch: low
  • Explanation of risk level: The patch just adds a missing guard. No new logic or impact on surrounding functionality.
  • String changes made/needed?: None
  • Is Android affected?: no
  • Add a new marionette test to verify with different pref values at startup

Original Revision: https://phabricator.services.mozilla.com/D314156

Attachment #9620614 - Flags: approval-mozilla-esr153?

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: When both the "show sidebars" (sidebar.revamp) is disabled adn the PasswordManagerEnabled policy or browser.contextual-password-manager.enabled pref are disabled, its not possible to open sidebars (e.g. Bookmarks, History.)
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Manual QE not strictly necessary, the automated test seems to provide good coverage. But the steps in https://bugzilla.mozilla.org/show_bug.cgi?id=2056857#c23 are known to reproduce and verify the fix
  • Risk associated with taking this patch: low
  • Explanation of risk level: The patch just adds a missing guard. No new logic or impact on surrounding functionality.
  • String changes made/needed?: None
  • Is Android affected?: no

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: When both the "show sidebars" (sidebar.revamp) is disabled adn the PasswordManagerEnabled policy or browser.contextual-password-manager.enabled pref are disabled, its not possible to open sidebars (e.g. Bookmarks, History.)
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Manual QE not strictly necessary, the automated test seems to provide good coverage. But the steps in https://bugzilla.mozilla.org/show_bug.cgi?id=2056857#c23 are known to reproduce and verify the fix
  • Risk associated with taking this patch: low
  • Explanation of risk level: The patch just adds a missing guard. No new logic or impact on surrounding functionality.
  • String changes made/needed?: None
  • Is Android affected?: no
Attachment #9620615 - Flags: approval-mozilla-release?
  • Add a new marionette test to verify with different pref values at startup

Original Revision: https://phabricator.services.mozilla.com/D314156

Flags: needinfo?(sfoster)
Attachment #9620613 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9620615 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attachment #9620614 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+

Verified the fix on Firefox 154.0b6, 153.0.3, 153.1.0esr (treeherder builds) on macOS 26.6, Windows 11 and Ubuntu 26.04. This was verified using the same repro steps from Comment 23 and by Policy method.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Whiteboard: [qa-ver-done-c155/b154]
Duplicate of this bug: 2059556
Duplicate of this bug: 2060495
Duplicate of this bug: 2063971
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: