Closed Bug 2010302 Opened 10 months ago Closed 5 months ago

Title Bar Disappearing on launch due to PreXULSkeletonUI being enabled incorrectly.

Categories

(Core :: Widget: Win32, defect, P3)

Firefox 147
defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox152 --- fixed
firefox153 --- fixed

People

(Reporter: spamtrap, Assigned: gstoll)

References

Details

Attachments

(8 files, 2 external files, 1 obsolete file)

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

Steps to reproduce:

On my computer checking "Delete cookies and site data when Firefox is closed" causes the title bar to disappear the next time that Firefox is opened.

Actual results:

Title bar disappeared.

Expected results:

Title bar doesn't disappear.

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

Component: Untriaged → Widget: Win32
Product: Firefox → Core

I don't know why this was moved to a Win32 section - I run Win64, and Firefox is installed for Win64.

(In reply to Dale H. Cook from comment #2)

I don't know why this was moved to a Win32 section - I run Win64, and Firefox is installed for Win64.

The component is called Win32 because the Windows API used to be called the Win32 API (see the top of https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-api-list for an explanation). While the name in Bugzilla implies 32-bit, it is actually the correct component for Windows-specific bugs.

(In reply to Stephen A Pohl [:spohl] from comment #3)

(In reply to Dale H. Cook from comment #2)

I don't know why this was moved to a Win32 section - I run Win64, and Firefox is installed for Win64.

The component is called Win32 because the Windows API used to be called the Win32 API (see the top of https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-api-list for an explanation). While the name in Bugzilla implies 32-bit, it is actually the correct component for Windows-specific bugs.

Thanks - that makes sense. As long as you are up-to-date you are doing better than Microsoft.

Hm, I wasn't able to reproduce this with Fx 147.

Just so I'm clear, your steps to reproduce this are:

  • Make sure that the "Title Bar" option is checked under Customize Toolbar (so that Firefox has a separate titlebar)
  • In the Settings page, check "Delete cookies and site data when Firefox is closed"
  • Restart Firefox
    and now the separate titlebar won't be showing?

Have you noticed this for a while or is this new behavior? If it's new-ish, could you try using mozregression to narrow down when this behavior started?

Severity: -- → S3
Flags: needinfo?(spamtrap)

People have been complaining about the title bar being missing since Fx 145 (including me) in the Community. Checking the Title Bar option apparently does not stick for some people.

Flags: needinfo?(spamtrap)

OK. A few more questions:

  • When this happens, if you go back to Customize Toolbar, is the "Title Bar" unchecked now? And if so, does checking it fix the problem?
  • Does setting the preference "widget.windows.windowsappsdk.enabled" to false and restarting Firefox change anything?
Flags: needinfo?(spamtrap)

The title bar box stays checked, even when the title bar is missing.

Flags: needinfo?(spamtrap)

Setting the preference "widget.windows.windowsappsdk.enabled" to false and restarting Firefox does not help.

The only thing I have found which cures the disappearing title bar is running Firefox in private browsing mode. I do not want to do that because that makes it more difficult to log into some sites which I frequent.

Duplicate of this bug: 2011095
Duplicate of this bug: 2010552
Duplicate of this bug: 2010732

Whether or not this is a duplicate of bug 2010552, I hope the additional information I supplied there leads to a solution, as it remains broken in FF 147.0.1. I'm not persuaded all the testing conditions were what they should be. It would be good to dispel my suspicion that settings for the Windows taskbar might be a factor, for one thing.

Duplicate of this bug: 2006021

Or is 2006021 a duplicate of 2010302? (2006021 is marked as closed, yet the defect remains as of FF 147.0.3, at least for we unfortunate few.)

2006021 is open again. It's not resolved.

No longer duplicate of this bug: 2006021
Duplicate of this bug: 2006021

3 days ago I've commented on bug https://bugzilla.mozilla.org/show_bug.cgi?id=2006021#c12 that the problem is gone. Unfortunately, that bug has been closed so I'm writing here that the problem reappeared once again on v147.0.3 - still no title bar on 1st run. I have to move the window to another monitor and back to have title bar reappear.

(In reply to Marooned from comment #18)

3 days ago I've commented on bug https://bugzilla.mozilla.org/show_bug.cgi?id=2006021#c12 that the problem is gone. Unfortunately, that bug has been closed so I'm writing here that the problem reappeared once again on v147.0.3 - still no title bar on 1st run. I have to move the window to another monitor and back to have title bar reappear.

Having no second monitor to switch to, I've simply been relying on the F11-toggle trick; does that not work for you?
I tried starting in Troubleshoot Mode as you described elsewhere but it didn't solve the problem.

It would still be helpful, I think, if someone could check whether having one's Windows taskbar locked at the bottom (as I do) is a factor, as well as try to determine whether the FF title bar is truly absent or just hiding above the top of the screen.

as well as try to determine whether the FF title bar is truly absent or just hiding above the top of the screen.

You can simply check for yourself: Hit F11 twice. If the title bar is visible then, it isn't off the screen.

(In reply to Axel from comment #20)

as well as try to determine whether the FF title bar is truly absent or just hiding above the top of the screen.

You can simply check for yourself: Hit F11 twice. If the title bar is visible then, it isn't off the screen.

I don't see how that would offer any conclusive evidence to settle the question. Whether the title bar is truly (not just visibly) absent or present but being pushed off the top of the screen by too tall a window, the second F11 press might conceivably correct whatever the underlying condition may be. Since the F11-toggle works, at least for me, clearly it's not returning FF to its original state. The only way to get to the bottom of this, I think, would be running FF in debug mode and making note of all the values of relevant variables both before the first F11 press and after the second, then comparing them in search of differences. (That or just staring at the code real hard.) But to do that, of course, it would first be necessary to reproduce the bug, which FF developers evidently haven't had much luck at.

I don't see how that would offer any conclusive evidence to settle the question.

The answer simply is: Since the window viewport is restored after pressing F11 twice, if the title bar is visible then, it cannot have been off screen before. Otherwise it again would not be visible.

(In reply to Axel from comment #22)

I don't see how that would offer any conclusive evidence to settle the question.

The answer simply is: Since the window viewport is restored after pressing F11 twice, if the title bar is visible then, it cannot have been off screen before. Otherwise it again would not be visible.

So are you saying this implies the title bar was truly absent initially? Since we can agree toggling F11 results in a different window state after the 2nd press, why is it any more -- or less -- likely that the title bar is being added to the window vs. the window's height/position is being changed? In either case, the action of two F11-presses is obviously not symmetrical, the restoration not perfect; some error in the initial state is being corrected, but we still don't know what it is. Your argument seems to rely on F11's functioning reliably to alternate between two states, but that obviously isn't the case, since the title bar wasn't initially visible (whether present or not). Perhaps you know the code underlying FF's F11-handling better than I do and can thereby rule out the off-screen title bar scenario, but it still seems possible to me.
Or, to express what I'm getting at in code:

let state = 2; // a "corrupt" initial value
function toggleState(newState) {
    // newState expected to be either 0 or 1.
    state = newState ? 0 : 1;
    return state;
}
console.log(toggleState(state)); // 0
console.log(toggleState(state)); // 1

Same function, called with same argument, fails to return initial value (2) after two calls.
Mainly, though, I remain curious whether this bug reproducibly happens when one's Windows taskbar is locked at at screen bottom.

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

Steps to reproduce:

Opened Firefox

Actual results:

Title bar and min/max/close buttons missing

Expected results:

Should see title bar and buttons. Problem persisted through update from 146 to 147b

Simona Badau, Desktop QA

Comment 1 • 2 months ago

Are you still able to reproduce this issue? Could you check whether the problem still occurs when starting Firefox in Troubleshoot Mode -Troubleshoot Mode disables add-ons, extensions, themes, hardware acceleration, and some JavaScript features to help rule out possible causes.
More details: here

If the issue does not occur in Troubleshoot Mode, could you try disabling your add-ons one by one to identify which add-on is causing the problem?

I enabled Troubleshoot mode. Title bar was present when FF restarted. I closed and opened FF. I disabled all add-ons/theme manually. I restarted FF. Title bar was missing. I enabled add-ons/theme one by one and restarted each time. Title bar missing every time. So the only time I got a proper opening with the title bar present was when I restarted in Troubleshoot mode.

Greg Stoll :gstoll

Comment 3 • 2 months ago

What version of Firefox are you using? I suspect this is bug 2002986, which should be fixed in 147.0b3 and above.

It started in 146 and persists in 147b5

BugBot [:suhaib / :marco/ :calixte]

Comment 5 • 1 month ago

The severity field is not set for this bug.
:gstoll, could you have a look please?

I just updated to 147 and the Title Bar is still missing upon opening. Minimizing then maximizing brings it back.

Running last version of Windows 10 Pro on a desktop PC.

Greg Stoll :gstoll

Comment 8 • 1 month ago

Would it be possible to record a video of what you see? (the initial problem and then minimize/maximize to solve it)

Also, does setting the pref "widget.windows.windowsappsdk.enabled" false and restarting Firefox still show the issue?

pref "widget.windows.windowsappsdk.enabled" false = no change upon restart

Attached video 2026-01-10-00-55-23.mp4 —

FF auto-updated to v148.0b9. The title bar was present. Closed FF and the title bar was missing. Subsequent openings show no title bar.

Marooned

Comment 12 • 6 days ago

Just FYI:
I have v147.0.3 and the title bar was missing for me (I had to move the window to another monitor or restore/maximize to make title bar visible).
However, after restarting in Troubleshoot Mode as suggested here and then restarted it again in regular mode, the problem is gone for me. The title bar is visible all the time now.
Thanks Ryan for pointing me to this bug.

Axel

Comment 13 • 6 days ago

A temporary workaround for this bug is to press F11 twice after Firefox is launched. But that's cumbersome.

Axel

Comment 14 • 6 days ago

after restarting in Troubleshoot Mode as suggested here and then restarted it again in regular mode, the problem is gone for me. The title bar is visible all the time now.

Works for me, too.

One very strange observation, though: After I used this trick in my host OS, Firefox in all my VMware VMs is running flawlessly, too. How can this be?

What's the reasoning for this?

The problem still persists for me. The only time I see the title bar is during troubleshoot mode.

Axel

Comment 16 • 3 days ago

Tried today on another machine of mine; this time Windows 11. Trick doesn't work here. Still no title bar.

David Parks [:handyman]

Updated • 3 days ago
Status: NEW → RESOLVED
Closed: 3 days ago
Duplicate of bug: 2010302
Resolution: --- → DUPLICATE

Let me try to repro this...

Flags: needinfo?(emilio)

So, I can't repro this either, but some of the dupes seem to imply there's some sort of profile dependency (i.e., it works on a new profile).

Can someone that can reproduce the issue:

  • Go to about:support.
  • Click Copy text to clipboard
  • Attach it to the bug.

Also, I have a theory. Can someone that reproduce the bug open the browser toolbox and run the following in the console tab:

Services.xulStore.hasValue(location.href, "main-window", "customtitlebar")

If it returns true, also run Services.xulStore.getValue(location.href, "main-window", "customtitlebar").

Flags: needinfo?(emilio)

» Services.xulStore.hasValue(location.href, "main-window", "customtitlebar")
←false

Well, there goes my theory then ;)

Attached file FF config.zip —

Here's my FF configuration.

Ok, another hypothesis: Can you go to the registry (start menu, type regedit), and go to HKEY_CURRENT_USER\Software\Mozilla\Firefox\PreXULSkeletonUISettings? If so, can you paste the values?

No tabs in titlebar should disable the skeleton UI but maybe that's not happening?

This would explain why it doesn't happen in troubleshoot mode.

Attached file PreXULSkeletonUISettings.zip (obsolete) —

Here we go … Here's my PreXULSkeletonUISettings export.

I'm sure you know how to open a .reg file safely, don't you?

D'oh … wrong machine. Here's the right RegEdit export now.

Attachment #9545698 - Attachment is obsolete: true

Ok, so it is enabled:

"C:\Program Files\Mozilla Firefox\firefox.exe|Enabled"=dword:00000001

That looks wrong, it shouldn't be enabled if you don't draw tabs to the titlebar.

If you change that to 0, I bet it gets fixed, could you confirm that? But now the issue is how we get into that state, and why we're not fixing it up...

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: Title Bar Disappearing → Title Bar Disappearing on launch due to PreXULSkeletonUI being enabled incorrectly.
Attached image Firefox RegEdit.png —

I don't think that setting it to 0x0 will help.

Firefox actually is setting it to 0x1 on every restart. Additionally, on my installation with FF working flawlessly, this setting is set to 0x1, too. See image attached.

Attached file about:config —
  • Go to about:support.
  • Click Copy text to clipboard
  • Attach it to the bug.

See attachment.

Also, I have a theory. Can someone that reproduce the bug open the browser toolbox and run the following in the console tab:

Services.xulStore.hasValue(location.href, "main-window", "customtitlebar")

Services.xulStore.hasValue(location.href, "main-window", "customtitlebar")
Uncaught ReferenceError: Services is not defined
<anonymous> debugger eval code:1
debugger eval code:1:1
Services.xulStore.hasValue(location.href, "main-window", "customtitlebar")…
Uncaught SyntaxError: unexpected token: identifier

Maybe I did this incorrectly.

(In reply to Emilio Cobos Álvarez [:emilio] from comment #47)

See attachment.

(In reply to Emilio Cobos Álvarez [:emilio] from comment #51)

If you change that to 0, I bet it gets fixed, could you confirm that? But now the issue is how we get into that state, and why we're not fixing it up...

It works, but starting Firefox resets it to 1.

C:\Program Files (x86)\Firefox Nightly\firefox.exe|Enabled was also set to 1. I changed it to 0 by mistake (I'm not using Nightly). This changed (or reset?) the Firefox Home Content.

Attached image Untitled.png —
Duplicate of this bug: 2018423
No longer duplicate of this bug: 2018423
Duplicate of this bug: 2019741

FWIW: No change in my experience under FF 148.0.

I can also confirm this is happening on Firefox version 148.0 on my desktop running Windows 10 Pro.
However, I'm NOT see this problem on my laptop running Windows 11 Pro.

Today I've opened FF 147.0.4 - no title bar. Checked "about" popup, click to download a new 148 version and then restart FF. Title bar was present after restart.

(In reply to Marooned from comment #63)

Today I've opened FF 147.0.4 - no title bar. Checked "about" popup, click to download a new 148 version and then restart FF. Title bar was present after restart.

If your experience is like mine, the automatic restart after an update opens FF in the Restored state, complete with title bar, regardless of whether it was Maximized before the update or set (via one's shortcut) to open Maximized. (Maximized is how I prefer it.) However, subsequent restarts in the Maximized state are still missing the title for me in 148.0. Did you try closing FF and restarting in Maximized?

(In reply to Marooned from comment #63)

... click to download a new 148 version and then restart FF. Title bar was present after restart.

In which version of Windows? I still have the problem in 148 under Win10 Pro.

(In reply to Dale H. Cook from comment #65)

(In reply to Marooned from comment #63)

... click to download a new 148 version and then restart FF. Title bar was present after restart.

In which version of Windows? I still have the problem in 148 under Win10 Pro.

Windows 10 Home ver. 10.0.19045 -- with the taskbar locked at the bottom. A few other details are available here: https://connect.mozilla.org/t5/discussions/firefox-147-0-title-bar-not-initially-visible-when-running/td-p/116012

Any Home version of Windows is, in many repects, different than any Pro version. Paul and I are both seeing this in Win10 Pro.

(In reply to Dale H. Cook from comment #65)

(In reply to Marooned from comment #63)

... click to download a new 148 version and then restart FF. Title bar was present after restart.

In which version of Windows? I still have the problem in 148 under Win10 Pro.

Windows 10 Home, 22H2

(In reply to ecm from comment #64)

(In reply to Marooned from comment #63)

Today I've opened FF 147.0.4 - no title bar. Checked "about" popup, click to download a new 148 version and then restart FF. Title bar was present after restart.

If your experience is like mine, the automatic restart after an update opens FF in the Restored state, complete with title bar, regardless of whether it was Maximized before the update or set (via one's shortcut) to open Maximized. (Maximized is how I prefer it.) However, subsequent restarts in the Maximized state are still missing the title for me in 148.0. Did you try closing FF and restarting in Maximized?

Sorry for double post - I forgot I can't edit here.
FF always starts maximized for me. I don't recall it started in the restored state.

(In reply to Marooned from comment #69)

FF always starts maximized for me. I don't recall it started in the restored state.

Hmm, somehow your FF installation seems to have a better "memory" than mine when updating.

Duplicate of this bug: 2025154

Still occurring in FF 148.0.2.

In the Firefox support, it was reported that it was solved by removing the following entries in the registry for HKEY_CURRENT_USER\Software\Mozilla\Firefox\PreXULSkeletonUISettings:

...|Maximized
...|Height
...|Width
...|ScreenX
...|ScreenY

(In reply to Sören Hentzschel from comment #73)

This solution works for me (except that the keys are not called Maximized, etc., but C:\Program Files\Mozilla Firefox\firefox.exe|Maximized, etc.).

(In reply to Yves Bellefeuille from comment #74)

This solution works for me.

It works for me as well.

Depends on: 2025935

I followed Sören's advice about modifying the registry and the title bar is now present when I open FF. However, as soon as I modified the registry I no longer get search suggestions despite those settings being enabled (they've always been enabled). No suggestions in the URL bar and no suggestions in the Search bar. How can the title bar registry tweaks affect search suggestions?

Please ignore the second half of the previous post. It seems the update to 149 set browser.urlbar.maxRichResults to 0. The default is 10.

It seems the update to 149 set browser.urlbar.maxRichResults to 0.

No, that’s definitely not something the update to Firefox 149 did. You can see in the code that the value hasn’t changed. There must be another reason why the value changed for you.

For a test, I just removed Height and Width on one of my machines, and that worked.

So, I guess it's just Height that needs to be removed for the title bar to re-appear.

I wonder if these registry values are all obsolete and if the parent key PreXULSkeletonUISettings could be deleted.

No, that’s definitely not something the update to Firefox 149 did. You can see in the code that the value hasn’t changed. There must be another reason why the value changed for you.

When FF for Windows recently updated to 149 the search bar changed dramatically. Search engine icons were gone from the search suggestions. Instead, the search icons moved to a drop-down menu that stays with whatever search engine was selected until it's reset manually. The search suggestions themselves were also gone. Looks to me like there's a new UI for search engines and search suggestions that appeared after updating to 149.

This is not related at all. Please stay on topic so that the focus doesn't shift away from the issue being discussed here.

(In reply to Axel from comment #79)

For a test, I just removed Height and Width on one of my machines, and that worked.

So, I guess it's just Height that needs to be removed for the title bar to re-appear.

I just tried removing Height only and restarting. It "worked" in the sense that the title bar is present at startup, but on the other hand FF didn't come up in the Maximized state as I'd specified in both my shortcut and via FF Settings, so I'd have to call the experiment a failure. (The same effect occurs when FF restarts after an update -- yes, the title bar is visible but the window is in the Restored state, not what I want.)

Interesting … 👀 Yet, this observation isn't "title bar" related, though 😉

It looks like this registry key and all the values therein are obsolete remains of previous versions' layout that seem to have higher priority than settings from the current version that are stored in C:\Users\{me}\AppData\Roaming\Mozilla\Firefox\Profiles\{me}.default-release\xulstore.json. So, would it make sense to remove the PreXULSkeletonUISettings key completely in the Windows Registry?

(In reply to Axel from comment #83)

Interesting … 👀 Yet, this observation isn't "title bar" related, though 😉

Well, yes and no: removing the Height key does bring back the title bar, though at the expense of opening Maximized.

C:\Users\{me}\AppData\Roaming\Mozilla\Firefox\Profiles\{me}.default-release\xulstore.json.

Are you sure that's right? For one thing my %APPDATA% does not point to C:\Users\{me}\AppData\Roaming (I moved it to a spot on my D: drive); for another, I have no %APPDATA%\Mozilla\Firefox\Profiles\{me}.default-release directory -- my xulstore.json is instead located under %APPDATA%\Mozilla\Firefox\Profiles\{pseudorandom_alphanumerics}.default. (I assume {me} refers to the active Windows user profile.)

I'd like to think FF doesn't rely on hard-coded C:\Users paths (though I've seen evidence the Crash Reporter does...).

I set the C:\Program Files\Mozilla Firefox\firefox.exe|Height key to 0 and it remains that way, but the title bar keeps disappearing.

(In reply to skgus14724 from comment #85)

I set the C:\Program Files\Mozilla Firefox\firefox.exe|Height key to 0 and it remains that way, but the title bar keeps disappearing.

May one assume C:\Program Files\Mozilla Firefox is where you have Firefox installed? (This is not true in my case.) Also, are you expecting Firefox to open Maximized and does it, after the edit?

(In reply to ecm from comment #86)

(In reply to skgus14724 from comment #85)

I set the C:\Program Files\Mozilla Firefox\firefox.exe|Height key to 0 and it remains that way, but the title bar keeps disappearing.

May one assume C:\Program Files\Mozilla Firefox is where you have Firefox installed? (This is not true in my case.) Also, are you expecting Firefox to open Maximized and does it, after the edit?

Oops, silly me.
I read comment #73 a bit later. It seems working fine for now.

I read comment #73 a bit later. It seems working fine for now.

So in the end did you delete the {path to FF}\Firefox.exe|Height key (only) or set its value to zero? And that resulted in getting the title bar even when staring in Maximized, right?

So in the end did you delete the {path to FF}\Firefox.exe|Height key (only) or set its value to zero? And that resulted in getting the title bar even when staring in Maximized, right?

I deleted all 5 keys, and yes.

OS: Windows 10 Pro (64-bit)
Firefox version: 149.0.2

When I open Firefox for the first time, the title bar is missing.
So I click on the F11 key TWICE and then the title bar appears.
Occasionally when I do this the Menu Bar is missing.
I then right click in the space just above where the URL address is and select Menu Bar. And it appears.

So, adding logging to the PreXULSkeletonUI-setting code (https://bugzilla.mozilla.org/show_bug.cgi?id=2025935) didn't lead to any insights on the problem or its solution?

I'm using currently Firefox v150.0.1 and I still can't see the title bar upon the first run of the browser. I have to move it to another monitor or restore/maximize its size for the title bar to reappear.

I should mention that deleting the five PreXULSkeletonUISettings Registry keys listed above (https://bugzilla.mozilla.org/show_bug.cgi?id=2010302#c73) did not work for me -- except in that FF opened in the Restored state, complete with title bar, contrary to both my desktop shortcut "Run" value and my FF Settings value, both specifying Maximized ... so this remains a nonsolution now in v150.0.1.

:ecm - the PreXULSkeletonUI logging hasn't made it to Release yet (and I've been busy with some other stuff), so I haven't been asking people about it.

But if you're running Nightly or Beta and are having this problem, you can try it out by:

  • Open a command window and navigate to "c:\program files\mozilla firefox" (or wherever your Firefox is installed)
  • Run "set MOZ_LOG=PreXULSkeletonUI:5"
  • Run "firefox.exe 2> %TEMP%\moz-log.txt" (or a location of your choice)
  • After Firefox launches, you can just quit

Then %TEMP%\moz-log.txt should have the PreXULSkeletonUI logging. You can post it here or email me at gstoll@mozilla.com if you're more comfortable with that.

(In reply to Greg Stoll :gstoll from comment #94)

:ecm - the PreXULSkeletonUI logging hasn't made it to Release yet (and I've been busy with some other stuff), so I haven't been asking people about it.

Ah, for some reason I assumed the logging would see only in-house debugging use, not be part of a release. Any idea whether it'll be in v151?

But if you're running Nightly or Beta and are having this problem, you can try it out by:

Alas, I'm not.

  • Run "firefox.exe 2> %TEMP%\moz-log.txt" (or a location of your choice)

Just wondering -- that "2" is a command-line argument to Firefox? If so, what does it mean?

Then %TEMP%\moz-log.txt should have the PreXULSkeletonUI logging. You can post it here or email me at gstoll@mozilla.com if you're more comfortable with that.

I look forward to doing so in due course.

(In reply to ecm from comment #95)

Run "firefox.exe 2> %TEMP%\moz-log.txt" (or a location of your choice)

Just wondering -- that "2" is a command-line argument to Firefox? If so, what does it mean?

2> is to redirect stderr, but I didn't know it worked in Windows.

:ecm - yes, the logging will be in Firefox 151. (and Yves is correct about the 2> redirecting stderr; the logging I added writes to stderr and not through the usual logging mechanism because it has to run so early at startup)

(In reply to Greg Stoll :gstoll from comment #97)

:ecm - yes, the logging will be in Firefox 151. (and Yves is correct about the 2> redirecting stderr; the logging I added writes to stderr and not through the usual logging mechanism because it has to run so early at startup)

So now that I'm running v151.0, I can try the procedure you described and show you the resulting log. Just to be clear, though, should I (on Windows) include the 2 in the command line, or would that be just for Linux?

Yes, please include the 2 in the command line for Windows, thanks!

(In reply to Greg Stoll :gstoll from comment #99)

Yes, please include the 2 in the command line for Windows, thanks!

Okay, I followed the procedure and, contrary to expectations (mine, anyhow), the result was a zero-byte file.

(In reply to Greg Stoll :gstoll from comment #99)

Now what? I could try the logging process again but I doubt anything relevant changed in 151.0.1, right?

No, I don't expect anything would have changed in 151.0.1 (or 151.0.2).

Hmm. Are you sure you set the environment variable MOZ_LOG to "PreXULSkeletonUI:5"? You can run the command "set" from the command prompt to print out the environment variables. I'm looking at the added logging in bug 2025935 and it sure seems like there should be something in that file...

(In reply to Greg Stoll :gstoll from comment #102)

Hmm. Are you sure you set the environment variable MOZ_LOG to "PreXULSkeletonUI:5"? You can run the command "set" from the command prompt to print out the environment variables. I'm looking at the added logging in bug 2025935 and it sure seems like there should be something in that file...

Yes, I'm quite confident I set it correctly, having copy/pasted the line into the command prompt (although I admittedly did not do a SET afterward to double-check; I tried it just now and it was there as expected).

However, it just occurred to me that by following the suggestion in Comment 73 and deleting the various Registry entries (to no success), maybe I'm left with nothing for your code to log? Must I go back and add all those keys?

No, there should be some logs even if there are no registry keys present (see for example this line)

If you launch firefox.exe the way you've been launching it, then navigate to "about:logging", what shows up under "Currently enabled log modules:"?

Flags: needinfo?(ecm_moz)

(In reply to Greg Stoll :gstoll from comment #104)

If you launch firefox.exe the way you've been launching it, then navigate to "about:logging", what shows up under "Currently enabled log modules:"?

"None".

Flags: needinfo?(ecm_moz)

OK, that's a sign that Firefox isn't picking up the environment settings (it should say "PreXULSkeletonUI:5").

What I did to get this to happen was:

  • open a command prompt
  • set MOZ_LOG=PreXULSkeletonUI:5
  • cd to firefox's directory
  • firefox.exe 2> %TEMP%\moz-log.txt (or whatever location you want)

Can you try exactly those steps and see if that helps? Environment settings on Windows can be a bit finicky; if you don't use the same command prompt it may not take effect immediately, etc.

Flags: needinfo?(ecm_moz)

(In reply to Greg Stoll :gstoll from comment #106)

OK, that's a sign that Firefox isn't picking up the environment settings (it should say "PreXULSkeletonUI:5").

What I did to get this to happen was:

  • open a command prompt
  • set MOZ_LOG=PreXULSkeletonUI:5
  • cd to firefox's directory
  • firefox.exe 2> %TEMP%\moz-log.txt (or whatever location you want)

Can you try exactly those steps and see if that helps? Environment settings on Windows can be a bit finicky; if you don't use the same command prompt it may not take effect immediately, etc.

Here's how I did it originally:

  • Opened an command prompt at D:\E\Firefox (where I've installed FF) via my Open command prompt here as Administrator context-menu item from File Explorer (very helpful!)
  • Entered set MOZ_LOG=PreXULSkeletonUI:5
  • Ran firefox.exe 2> %TEMP%\moz-log.txt

Essentially the same process, I'd say.

This time, though, I did it exactly as you stated above, opening my command prompt via a Taskbar shortcut; it's still Administrative, BTW. The result was the same: a zero-byte file.
In about:logging, I still have Currently enabled log modules: None while the experiment is running and afterward. Is the Logging output setting pertinent here? Mine is using Logging to the Firefox Profiler.

Flags: needinfo?(ecm_moz)

Oh, that's interesting. I know that if Firefox is launched with Administrator privileges we try to drop those privileges (because we don't need them, and dropping privileges is good for security); maybe that messes with the environment somehow? Can you try following those steps again but from a "regular" command prompt that isn't launched as Administrator?

(the Logging output setting isn't pertinent here; the PreXULSkeletonUI logging that happens early in startup always logs directly to stderr, since the logging system hasn't been fully initialized yet)

Flags: needinfo?(ecm_moz)

(In reply to Greg Stoll :gstoll from comment #108)

Can you try following those steps again but from a "regular" command prompt that isn't launched as Administrator?

Okay, I can do that ... however, my standard user account has administrative privileges (livin' dangerously, I suppose), so would that defeat the purpose of the exercise?

Flags: needinfo?(ecm_moz)

(In reply to Greg Stoll :gstoll from comment #108)

So I went ahead and tried again by entering CMD.EXE in the Windows Run dialog and had better results. While FF was running, I checked in about:logging and found:

Currently enabled log modules:
PreXULSkeletonUI:5
None

Then, after closing FF (which came as a surprise), I found my zero-byte moz-log.txt file had gained content, which I'll now convey as an attachment (moz-log.zip).

Thanks - I know it took a lot of trial and error but this was very helpful!

Looking at the log seems to indicate that we set the registry key correctly, but then it gets set incorrectly because we get the wrong value for the "browser.tabs.inTitlebar" pref. This seems to be happening because after launch we run a background task, which uses a default profile.

I think the fix should be simple; just avoid writing this registry key if we're running a background task.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED

The log from a user indicates that the registry key gets set correctly, and then
a background task runs and sets it incorrectly. (since background tasks use a defaultish
profile) So just move SetupSkeletonUIPrefs() into the section that doesn't run in a
background task, like we already do with some other prefs-related stuff.

(In reply to Greg Stoll :gstoll from comment #113)

The log from a user indicates that the registry key gets set correctly, and then
a background task runs and sets it incorrectly. (since background tasks use a defaultish
profile) So just move SetupSkeletonUIPrefs() into the section that doesn't run in a
background task, like we already do with some other prefs-related stuff.

Good to hear the belated log proved so useful! A few questions:

  1. Is your diagnosis consistent with the fact that the problem began ~v145? Something relevant changed back then?
  2. Does this mean that the handful of Registry keys I (and a few others) deleted need to be restored?
  3. Does your theory account for my current behavior -- that FF opens in the Restored state (complete with title bar, 'of course') despite (a) my Windows shortcut's "Run: Maximized" setting, (b) "Title Bar" being checked under FF's "Customize toolbar" settings, and (c) having closed FF in the Maximized state (i.e., session memory)?

(In reply to ecm from comment #114)

Good to hear the belated log proved so useful! A few questions:

  1. Is your diagnosis consistent with the fact that the problem began ~v145? Something relevant changed back then?

It doesn't look like this code changed back then, but it seems like any change to when background tasks run could have caused this. A quick look at the background tasks code didn't turn up anything obvious, so I'm not sure.

  1. Does this mean that the handful of Registry keys I (and a few others) deleted need to be restored?

It's probably a good idea to restore these, yes.

  1. Does your theory account for my current behavior -- that FF opens in the Restored state (complete with title bar, 'of course') despite (a) my Windows shortcut's "Run: Maximized" setting, (b) "Title Bar" being checked under FF's "Customize toolbar" settings, and (c) having closed FF in the Maximized state (i.e., session memory)?

Yes; the issue is that if the registry key is set to True, we will use the PreXULSkeletonUI, and that will make the title bar not work correctly.

(In reply to Greg Stoll :gstoll from comment #115)

  1. Does this mean that the handful of Registry keys I (and a few others) deleted need to be restored?

It's probably a good idea to restore these, yes.

Might there be existing code to check for these keys and, if they're absent, add them with default values? And if not, would that be something good to include?

(By the way, I presume that your investigations found the PreXULSkeletonUISettings keys are not obsolete, contrary to the speculation in Comment #79.)

See Also: → 2044319

(In reply to ecm from comment #116)

(In reply to Greg Stoll :gstoll from comment #115)

  1. Does this mean that the handful of Registry keys I (and a few others) deleted need to be restored?

It's probably a good idea to restore these, yes.

Might there be existing code to check for these keys and, if they're absent, add them with default values? And if not, would that be something good to include?

I think these values should get written back to the registry on a successful launch, although I haven't totally traced the code for this.

(By the way, I presume that your investigations found the PreXULSkeletonUISettings keys are not obsolete, contrary to the speculation in Comment #79.)

Yes, these keys are still definitely used.

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: longstanding annoying issue for users with tabs not in the toolbar on Windows.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: small change to not set registry keys in a background task
  • String changes made/needed?: no
  • Is Android affected?: no
Attachment #9592555 - Flags: approval-mozilla-beta?

The log from a user indicates that the registry key gets set correctly, and then
a background task runs and sets it incorrectly. (since background tasks use a defaultish
profile) So just move SetupSkeletonUIPrefs() into the section that doesn't run in a
background task, like we already do with some other prefs-related stuff.

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

See Also: → 2039256

(In reply to Greg Stoll :gstoll from comment #117)

I think these values should get written back to the registry on a successful launch, although I haven't totally traced the code for this.

What would constitute "a successful launch"? Since deleting the Registry keys in question I've launched FF many times and the keys remain absent, so if any of my launches qualified as successful then the keys are not being written back.

(It may be worth noting, however, that I have another complete set of keys present in PreXULSkeletonUISettings for my Tor browser installation on a USB drive [which usually isn't even plugged in], so maybe this is a relevant factor?)

Also, in 2044319 you mentioned the case of users with two (or more) profiles; please note I have only one.

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Regressions: 2044514
Attachment #9592555 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

(In reply to ecm from comment #121)

(In reply to Greg Stoll :gstoll from comment #117)

I think these values should get written back to the registry on a successful launch, although I haven't totally traced the code for this.

What would constitute "a successful launch"? Since deleting the Registry keys in question I've launched FF many times and the keys remain absent, so if any of my launches qualified as successful then the keys are not being written back.

Hmm, OK, maybe I'm wrong about that. We may not be resilient to some of the keys being gone but not all of them. It's probably best to restore them, then, if that's not too much trouble.

(It may be worth noting, however, that I have another complete set of keys present in PreXULSkeletonUISettings for my Tor browser installation on a USB drive [which usually isn't even plugged in], so maybe this is a relevant factor?)

Hmm, these sound separate; if you're using different channels (i.e. Nightly vs. Release) the registry key path will be different.

Duplicate of this bug: 2039256

Firefox 152 is out today and I'd love to get confirmation that this issue is fixed for y'all!

Once you have the update, all you should need to do is ensure that the "Title Bar" option is still checked under Customize Toolbar (so that Firefox has a separate titlebar) and then restart. Hopefully the title bar will remain visible for all future launches.

Apparently you need permission to comment on a closed bug, but I heard via email from one user that this problem does seem to be fixed in Firefox 152. Thanks all!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: