Closed Bug 1534282 Opened 5 years ago Closed 5 years ago

Browser customization state is lost/broken on restart when browser.uiCustomization.state preference is stored in user.js (e.g. losing position of add-on icons)

Categories

(Firefox :: Toolbars and Customization, defect)

65 Branch
Desktop
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: signupemail, Unassigned)

Details

Attachments

(2 files)

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

Steps to reproduce:

Added extension 'Https Everywhere' (via the Firefox addOn page).
Used 'customize' to move the resulting icon - the icon that appears next to my URL bar.
Restarted Firefox.

Actual results:

The icon had returned to its previous position.

Expected results:

The icon should stay where it is put.

The developer of the AddOn suspects that the problem is at your end (https://github.com/EFForg/https-everywhere/issues/17567#issuecomment-471564015).

OS: Unspecified → Windows 8.1
Hardware: Unspecified → Desktop

Also: the problem affects Windows but not Linux - at least on my computers.

Product: Firefox → WebExtensions
Component: Untriaged → Toolbars and Customization
Product: WebExtensions → Firefox

Something's broken with the storage of button positions, by the sound of it.

Can you go to about:config, search for browser.uiCustomization.state, and copy-paste the value as a comment here, both at startup (when the position is wrong) and after you customize the button (and the position is correct) ?

Also, when you customize the button, and when closing customize mode, do any errors appear in the browser (not regular web) console (ctrl-shift-j to open it)?

Flags: needinfo?(signupemail)

browser.uiCustomization values

'at startup (when the position is wrong)'

{"placements":{"widget-overflow-fixed-list":["bookmarks-menu-button","sidebar-button"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","ublock0_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","umatrix_raymondhill_net-browser-action","cookieautodelete_kennydo_com-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","add-ons-button","preferences-button","savepage-we_dw-dev-browser-action","zoompage-item","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","downloads-button","zoom-controls","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action","https-everywhere_eff_org-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","tabmix-tabs-closebutton"],"PersonalToolbar":["personal-bookmarks"]},"seen":["pocket-button","webcompat-reporter-button","developer-button","webide-button","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","action-button--jid1-5fs7itlscuazbgwrjetpack-toggle","cookieautodelete_kennydo_com-browser-action","ublock0_raymondhill_net-browser-action","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","screenshots_mozilla_org-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","savepage-we_dw-dev-browser-action","umatrix_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","cookie-manager_robwu_nl-browser-action","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","287dcf75-bec6-4eec-b4f6-71948a2eea29-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","feed-button","https-everywhere_eff_org-browser-action"],"dirtyAreaCache":["PersonalToolbar","nav-bar","TabsToolbar","toolbar-menubar","PanelUI-contents","addon-bar","widget-overflow-fixed-list"],"currentVersion":15,"newElementCount":21}

'after you customize the button (and the position is correct)'

{"placements":{"widget-overflow-fixed-list":["bookmarks-menu-button","sidebar-button"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","ublock0_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","umatrix_raymondhill_net-browser-action","cookieautodelete_kennydo_com-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","canvasblocker_kkapsner_de-browser-action","https-everywhere_eff_org-browser-action","_testpilot-containers-browser-action","add-ons-button","preferences-button","savepage-we_dw-dev-browser-action","zoompage-item","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","downloads-button","zoom-controls","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","tabmix-tabs-closebutton"],"PersonalToolbar":["personal-bookmarks"]},"seen":["pocket-button","webcompat-reporter-button","developer-button","webide-button","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","action-button--jid1-5fs7itlscuazbgwrjetpack-toggle","cookieautodelete_kennydo_com-browser-action","ublock0_raymondhill_net-browser-action","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","screenshots_mozilla_org-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","savepage-we_dw-dev-browser-action","umatrix_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","cookie-manager_robwu_nl-browser-action","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","287dcf75-bec6-4eec-b4f6-71948a2eea29-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","feed-button","https-everywhere_eff_org-browser-action"],"dirtyAreaCache":["PersonalToolbar","nav-bar","TabsToolbar","toolbar-menubar","PanelUI-contents","addon-bar","widget-overflow-fixed-list"],"currentVersion":15,"newElementCount":22}

Flags: needinfo?(signupemail)

(In reply to :Gijs (he/him) from comment #2)

Something's broken with the storage of button positions, by the sound of it.

Can you go to about:config, search for browser.uiCustomization.state, and copy-paste the value as a comment here, both at startup (when the position is wrong) and after you customize the button (and the position is correct) ?

From the values you posted, the position got updated successfully. When you then exit customize mode and close Firefox, and before restarting it, if you open the prefs.js file in your profile (you can get to this from about:support, click the button next to "Profile Folder"), what does the line for browser.uiCustomization.value look like?

While you're there, is there a chrome folder in your profile directory, and if so, what files are in it?

Also, when you customize the button, and when closing customize mode, do any errors appear in the browser (not regular web) console (ctrl-shift-j to open it)?

Please also answer this question. :-)

Flags: needinfo?(signupemail)

There is no browser.uiCustomization.value value in my prefs.js file.

However, I discover that I have two Firefox profiles, and that one of them seems pretty vanilla. When I switched to that vanilla profile, installed HTTPSEverywhere, moved the latter's icon between two default icons, and restarted Firefox, then the icon stayed where it was put.

So it seems I can fix the problem by making an new profile. I would rather not do that, though. For I have many customisations and I had to create a new profile already not so long ago.

Also, even in the vanilla profile's prefs.js, there is no browser.uiCustomization.value - not even after adding HTTPSEverywhere and restarting Firefox (restarting Firefox with that same profile).

Flags: needinfo?(signupemail)

While you're there, is there a chrome folder in your profile directory, and if so, what files are in it?

Yes. It contains a file called userChrome.css, contents as follows.

/*
userChrome.css
File location on Windows
C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\<profileName>\chrome\userChrome.css
Ensure file name does not get a .txt appended to it.
*/

.tabbrowser-tab[visuallyselected="true"] {
    font-weight: bold !important;
}

Also, when you customize the button, and when closing customize mode, do any errors appear in the browser (not regular web) console (ctrl-shift-j to open it)?

I do not think so, but the following errors appear in that console (the one that appears upon ctrl-shift-j) before I enter and exist the customisation mode:

1552672633579 addons.xpi-utils WARN addMetadata: Add-on {b9aa91db-385d-4c69-8a2f-96790aa9405b} is invalid: Error: File c:\program files (x86)\copernic\desktopsearch\firefoxconnector does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:557:11) JS Stack trace: loadManifest@XPIInstall.jsm:557:11
awaitPromise@XPIProvider.jsm:188:3
syncLoadManifestFromFile@XPIInstall.jsm:620:10
addMetadata@XPIDatabase.jsm:2334:21
processFileChanges@XPIDatabase.jsm:2686:21
checkForChanges@XPIProvider.jsm:2581:34
startup@XPIProvider.jsm:2159:25
callProvider@AddonManager.jsm:203:12
_startProvider@AddonManager.jsm:652:5
startup@AddonManager.jsm:805:9
startup@AddonManager.jsm:2775:5
observe@addonManager.js:66:9
1552672633579 addons.xpi-utils WARN Not uninstalling invalid item because it is a proxy file
1552672633961 addons.webextension.jid1-MnnxcxisBPnSXQ@jetpack WARN Loading extension 'jid1-MnnxcxisBPnSXQ@jetpack': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
1552672633961 addons.webextension.jid1-MnnxcxisBPnSXQ@jetpack WARN Loading extension 'jid1-MnnxcxisBPnSXQ@jetpack': Reading manifest: Error processing update_url: An unexpected property was found in the WebExtension manifest.
1552672633988 addons.webextension.{287dcf75-bec6-4eec-b4f6-71948a2eea29} WARN Loading extension '{287dcf75-bec6-4eec-b4f6-71948a2eea29}': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
uncaught exception: 2147746065 SessionStore.jsm:1177:9
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. dnt.js:52
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. fingerprinting.js:316
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. socialwidgets.js:457
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xul
SyntaxError: redeclaration of let trackerInfo socialwidgets.js:1:1
this.window.gBrowserInit is undefined
this.window.gBrowserInit is undefined ext-browser.js:996

get activeTab chrome://browser/content/parent/ext-browser.js:996 candidates chrome://extensions/content/parent/ext-tabs-base.js:1878 InterpretGeneratorResume self-hosted:1255 next self-hosted:1210 query chrome://extensions/content/parent/ext-tabs-base.js:1897 next self-hosted:1210 from self-hosted:599 query chrome://browser/content/parent/ext-tabs.js:787 InterpretGeneratorResume self-hosted:1255 next self-hosted:1210 query self-hosted:974 result resource://gre/modules/ExtensionParent.jsm:947 withPendingBrowser resource://gre/modules/ExtensionParent.jsm:601 next self-hosted:1210 result resource://gre/modules/ExtensionParent.jsm:946 withTiming resource://gre/modules/ExtensionParent.jsm:913 next self-hosted:1210 call resource://gre/modules/ExtensionParent.jsm:945 next self-hosted:1210

(In reply to signupemail from comment #5)

There is no browser.uiCustomization.value value in my prefs.js file.

Sorry, I meant browser.uiCustomization.state - I got confused because of the first line of comment #3. Note I'm basically trying to work out if we incorrectly modify the state when Firefox restarts, or fail to save it at when Firefox closes, hence wanting to know what the value is if you open prefs.js after you fix the position of the button and then close Firefox.

As you noted, this isn't easy to reproduce (that is, it worked for you on another vanilla profile, and it works for you on Linux, and it works for me on a clean profile, too), but I'd like to get to the bottom of what's broken here so we can make sure Firefox works even in whatever state your profile is in. Might take a few more rounds of gathering info so we can work out exactly why it's broken in your regular profile...

Flags: needinfo?(signupemail)

gijs: thanks for the correction and for your desire to fix this problem.

My prefs.js, at the time you specified (namely, 'after you fix the position of the button and then close Firefox'), contains this:

user_pref("browser.uiCustomization.state", "{"placements":{"widget-overflow-fixed-list":["bookmarks-menu-button","sidebar-button"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","ublock0_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","umatrix_raymondhill_net-browser-action","cookieautodelete_kennydo_com-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","canvasblocker_kkapsner_de-browser-action","https-everywhere_eff_org-browser-action","_testpilot-containers-browser-action","add-ons-button","preferences-button","savepage-we_dw-dev-browser-action","zoompage-item","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","downloads-button","zoom-controls","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","tabmix-tabs-closebutton"],"PersonalToolbar":["personal-bookmarks"]},"seen":["pocket-button","webcompat-reporter-button","developer-button","webide-button","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","action-button--jid1-5fs7itlscuazbgwrjetpack-toggle","cookieautodelete_kennydo_com-browser-action","ublock0_raymondhill_net-browser-action","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","screenshots_mozilla_org-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","savepage-we_dw-dev-browser-action","umatrix_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","cookie-manager_robwu_nl-browser-action","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","287dcf75-bec6-4eec-b4f6-71948a2eea29-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","feed-button","https-everywhere_eff_org-browser-action"],"dirtyAreaCache":["PersonalToolbar","nav-bar","TabsToolbar","toolbar-menubar","PanelUI-contents","addon-bar","widget-overflow-fixed-list"],"currentVersion":15,"newElementCount":22}");

Flags: needinfo?(signupemail)

(In reply to signupemail from comment #8)

Thanks for the pref.js values. So far the data is still looking correct, which is odd since that's not what you're seeing. Can you provide some more information?

Make sure the browser is customized as you want. Now, can you go to about:config and set the browser.uiCustomization.debug pref to true, then restart? After startup, open the Browser Console (Ctrl-Shift-J) and copy/paste the output here.

Also, can you share the details of your about:support page? You can use the "Copy Text to clipboard" option, then on this bug you can click on "Attach file" and paste the contents of about:support in the textarea.

Flags: needinfo?(signupemail)

Console output: see attached.

'About:support' - see other attachment.

Flags: needinfo?(signupemail)
Attached file console output
Attachment #9051735 - Attachment mime type: application/octet-stream → text/plain
Attached file about-support info

Can you check the user.js file in your profile directory, and if it contains any browser.uiCustomization.state value as well? (the about:support data says there is such a file; there's not normally).

The confusing thing here is that the data you quoted in comment #8 has:

[
   "back-button",
   "forward-button",
   "stop-reload-button",
   "urlbar-container",
   "ublock0-button",
   "action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies",
   "_69ef9498-0139-43e4-97b8-942982ac9158_-browser-action",
   "_b3e677f4-1150-4387-8629-da738260a48e_-browser-action",
   "_a6a5b521-62f8-48c1-ad86-702fd9f0e2c8_-browser-action",
   "ublock0_raymondhill_net-browser-action",
   "jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action",
   "https-everywhere-eff-bill_eff_org-browser-action",
   "action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps",
   "umatrix_raymondhill_net-browser-action",
   "cookieautodelete_kennydo_com-browser-action",
   "jid1-mnnxcxisbpnsxq_jetpack-browser-action",
   "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action",
   "jid1-bofifl9vbdl2zq_jetpack-browser-action",
   "canvasblocker_kkapsner_de-browser-action",
   "https-everywhere_eff_org-browser-action",
   "_testpilot-containers-browser-action",
   "add-ons-button",
   "preferences-button",
   "savepage-we_dw-dev-browser-action",
   "zoompage-item",
   "action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton",
   "action-button--keybinderfailcl-keybinderoolbarutton",
   "zoompage-we_dw-dev-browser-action",
   "toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button",
   "downloads-button",
   "zoom-controls",
   "_f8d53f75-97ee-4c26-8972-c59c76e62186_-browser-action",
   "jid1-zadieub7xozojw_jetpack-browser-action",
   "artur_dubovoy_gmail_com-browser-action",
   "_d7dbba27-6af6-484c-a84e-9c59c458f0df_-browser-action",
   "_5f8d31ba-47fb-4b70-bf8d-d2113f6da22f_-browser-action",
   "_beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22_-browser-action",
   "bookmarksorganizer_agenedia_com-browser-action"
]

as the list of items in the main toolbar. As you can see, the "https-everywhere_eff_org-browser-action" (ignore the "https-everywhere-eff-bill" thing) is in the right place, before the add-ons button, preferences button, etc.

When Firefox next starts up, it is supposed to read data from there, and yet somehow the log you posted contains:

CustomizableUI: State saved as: {... 

"nav-bar":

[
   "back-button",
   "forward-button",
   "stop-reload-button",
   "urlbar-container",
   "ublock0-button",
   "action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies",
   "_69ef9498-0139-43e4-97b8-942982ac9158_-browser-action",
   "_b3e677f4-1150-4387-8629-da738260a48e_-browser-action",
   "_a6a5b521-62f8-48c1-ad86-702fd9f0e2c8_-browser-action",
   "ublock0_raymondhill_net-browser-action",
   "jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action",
   "https-everywhere-eff-bill_eff_org-browser-action",
   "action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps",
   "umatrix_raymondhill_net-browser-action",
   "cookieautodelete_kennydo_com-browser-action",
   "jid1-mnnxcxisbpnsxq_jetpack-browser-action",
   "_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action",
   "jid1-bofifl9vbdl2zq_jetpack-browser-action",
   "canvasblocker_kkapsner_de-browser-action",
   "_testpilot-containers-browser-action",
   "add-ons-button",
   "preferences-button",
   "savepage-we_dw-dev-browser-action",
   "zoompage-item",
   "action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton",
   "action-button--keybinderfailcl-keybinderoolbarutton",
   "zoompage-we_dw-dev-browser-action",
   "toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button",
   "downloads-button",
   "zoom-controls",
   "_f8d53f75-97ee-4c26-8972-c59c76e62186_-browser-action",
   "jid1-zadieub7xozojw_jetpack-browser-action",
   "artur_dubovoy_gmail_com-browser-action",
   "_d7dbba27-6af6-484c-a84e-9c59c458f0df_-browser-action",
   "_5f8d31ba-47fb-4b70-bf8d-d2113f6da22f_-browser-action",
   "_beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22_-browser-action",
   "bookmarksorganizer_agenedia_com-browser-action"
]
...}

If you compare these lists, you will notice that the https-everywhere_eff_org-browser-action item is missing completely in the second list (again, ignore the "bill" item... which is for an old add-on you no longer have installed).

Likewise, the item is missing from the "seen" list (which is a list of all the non-default widgets the customization component has ever seen before, in case you uninstall and reinstall an add-on). It gets added during the course of startup, just like it gets added to the navbar, and saved successfully (again, per comment #8).

This doesn't make much sense to me; we load the state at this point and that's what is being saved and repeated in the log here. So somehow, between the point where you checked prefs.js in comment #8, and when we read the pref, its value has changed. The only culprit I can think of is user.js ... unless you're using any other code like userChrome.css to run custom javascript on startup?

Flags: needinfo?(signupemail)

Thank you for your work.

Here is the relevant bit of my user.js.

user_pref("browser.uiCustomization.state", "{"placements":{"widget-overflow-fixed-list":["bookmarks-menu-button","sidebar-button"],"PersonalToolbar":["personal-bookmarks"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","ublock0_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","umatrix_raymondhill_net-browser-action","cookieautodelete_kennydo_com-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","add-ons-button","preferences-button","savepage-we_dw-dev-browser-action","zoompage-item","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","downloads-button","zoom-controls","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","tabmix-tabs-closebutton"]},"seen":["pocket-button","webcompat-reporter-button","developer-button","webide-button","ublock0-button","action-button--jid0-9xfbwuwnvpx4wwsfbwmcm4jj69ejetpack-self-destructing-cookies","action-button--jid1-5fs7itlscuazbgwrjetpack-toggle","cookieautodelete_kennydo_com-browser-action","ublock0_raymondhill_net-browser-action","action-button--b9db16a4-6edc-47ec-a1f4-b86292ed211d-vdh-tbbutton","https-everywhere-eff-bill_eff_org-browser-action","action-button--jid0-ofwt2zcakhhkfl7kp4ljnjetpack-smarthttps","69ef9498-0139-43e4-97b8-942982ac9158-browser-action","b3e677f4-1150-4387-8629-da738260a48e-browser-action","jid1-mnnxcxisbpnsxq-eff_jetpack-browser-action","action-button--keybinderfailcl-keybinderoolbarutton","zoompage-we_dw-dev-browser-action","toggle-button--jid1-zadieub7xozojwjetpack-ddg-toolbar-button","screenshots_mozilla_org-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","a6a5b521-62f8-48c1-ad86-702fd9f0e2c8-browser-action","savepage-we_dw-dev-browser-action","umatrix_raymondhill_net-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","cookie-manager_robwu_nl-browser-action","f8d53f75-97ee-4c26-8972-c59c76e62186-browser-action","287dcf75-bec6-4eec-b4f6-71948a2eea29-browser-action","jid1-zadieub7xozojw_jetpack-browser-action","artur_dubovoy_gmail_com-browser-action","d7dbba27-6af6-484c-a84e-9c59c458f0df-browser-action","5f8d31ba-47fb-4b70-bf8d-d2113f6da22f-browser-action","beb1b1c0-32b9-47d8-bbd1-f65bed4e7c22-browser-action","bookmarksorganizer_agenedia_com-browser-action","canvasblocker_kkapsner_de-browser-action","_testpilot-containers-browser-action","73a6fe31-595d-460b-a920-fcc0f8843232-browser-action"],"dirtyAreaCache":["PersonalToolbar","nav-bar","TabsToolbar","toolbar-menubar","PanelUI-contents","addon-bar","widget-overflow-fixed-list"],"currentVersion":14,"newElementCount":21}");

MyuserChrome.css:

/*
userChrome.css
File location on Windows
C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\<profileName>\chrome\userChrome.css
Ensure file name does not get a .txt appended to it.
*/

.tabbrowser-tab[visuallyselected="true"] {
font-weight: bold !important;
}

Flags: needinfo?(signupemail)

(again, ignore the "bill" item... which is for an old add-on you no longer have installed).

Hold on, is the old add-on in question an older version of . . Https Everywhere? If so, don't I have good reason to remove that text from my files?

OK, so this is happening because of the line in user.js . If you close Firefox, remove the browser.uiCustomization.state line(s) from user.js, and customize the button then, it'll stay where you put it when you next restart.

Why did you modify user.js, and why include this line? This is what's breaking customization; effectively all the changes in prefs.js are overwritten by the user.js content every time you start Firefox. This will happen for all the preferences, not just this one, and will probably break other things, too, for any other preferences you store in there.

Flags: needinfo?(signupemail)
Summary: AddOn 'Https Everywhere': icon does not stay where it is put → Browser customization state is lost/broken on restart when browser.uiCustomization.state preference is stored in user.js (e.g. losing position of add-on icons)

(In reply to signupemail from comment #15)

(again, ignore the "bill" item... which is for an old add-on you no longer have installed).

Hold on, is the old add-on in question an older version of . . Https Everywhere? If so, don't I have good reason to remove that text from my files?

I really don't recommend changing these files manually if you don't know very very well what you're doing. In this case, it's exactly those types of changes that have caused this issue for you.

In theory, you can remove that item from your files; in practice, if you make a mistake it could lose your customization state entirely, or break other things.

If you wanted to clean up some of these items, the easiest way is to use "restore defaults" in customize mode, and then make only the customizations you care about at this point, and then close customize mode. That'll remove any entries for add-ons you no longer use.

The same icon problem affects the addOn KeePassXC-Browser. See this bug report that I filed against that program.

Flags: needinfo?(signupemail)

(In reply to signupemail from comment #18)

The same icon problem affects the addOn KeePassXC-Browser. See this bug report that I filed against that program.

This is not the add-on's fault; it's a result of your profile having these lines in user.js ... Remove those lines and stop editing user.js and the problem will go away.

This isn't a Firefox bug; the "point" of user.js is that it overrides preferences. Using it should be done with the utmost care. There isn't a great way of preventing people from shooting themselves in the foot using it; we can't realistically maintain a list of prefs that can/can't be locked like this. I'd be in favour of getting rid of it altogether but I expect that isn't feasible because of enterprise use.

Anyway, this isn't a bug we can fix as written, so I'm closing it out.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID

@Gljs: thank you for your time, for your diagnosis of the problem and for helping me to fix it.

Why did you modify user.js, and why include this line?

I am unsure how user.js got modified. Possibly it happened some how when porting a Firefox profile. Anyhow, deleting the line pertaining to the toolbar, and deleting the entire contents of the file had no adverse effects.

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

Attachment

General

Creator:
Created:
Updated:
Size: