Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

mozilla.cfg file to lock preferences.

more options

Hi there!

I recently created a mozilla.cfg file to lock the firefox preferences related to changing the homepage:

The contents of mozilla.cfg is as follows:

//

lockPref("browser.startup.page", 1);

lockPref("browser.startup.homepage", "http://www.google.com.au/firefox"); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

This works great! My homepage is locked, as is the buttons to change the homepage via bookmarks etc.

However whenever I start firefox I get this message:


Netscape.cfg/AutoConfig failed. Please contact your system administrator.

Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: prefcalls.js :: defaultPref :: line 91"  data: no]

But my preferences are locked and firefox works fine otherwise.

Before when I just locked the homepage itself (so you can't type out a new one, but you could use the buttons such as "use current page" to change the homepage) it worked without any error message. Now that I have added those last 3 lines into mozilla.cfg I get that error message on startup. But everything works exactly as I wanted.

What is the error message about, how do I fix it or how do I supress the message so it doesn't appear whever I start up.

Thanks for your time!

Hi there! I recently created a mozilla.cfg file to lock the firefox preferences related to changing the homepage: The contents of mozilla.cfg is as follows: // lockPref("browser.startup.page", 1); lockPref("browser.startup.homepage", "http://www.google.com.au/firefox"); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); This works great! My homepage is locked, as is the buttons to change the homepage via bookmarks etc. However whenever I start firefox I get this message: Netscape.cfg/AutoConfig failed. Please contact your system administrator. Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: prefcalls.js :: defaultPref :: line 91" data: no] But my preferences are locked and firefox works fine otherwise. Before when I just locked the homepage itself (so you can't type out a new one, but you could use the buttons such as "use current page" to change the homepage) it worked without any error message. Now that I have added those last 3 lines into mozilla.cfg I get that error message on startup. But everything works exactly as I wanted. What is the error message about, how do I fix it or how do I supress the message so it doesn't appear whever I start up. Thanks for your time!

Modified by Anionz

Chosen solution

I have determined that it is due to the line:

lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

In my about:config this is listed as a string whereas the other two are listed as boolean?

Solved! I reset this entry in about:config, on restarting Firefox it was deleted and I could add it in again as a boolean entry. Now it all workes great!

Read this answer in context 👍 0

All Replies (2)

more options

Chosen Solution

I have determined that it is due to the line:

lockPref("pref.browser.homepage.disable_button.bookmark_page", true);

In my about:config this is listed as a string whereas the other two are listed as boolean?

Solved! I reset this entry in about:config, on restarting Firefox it was deleted and I could add it in again as a boolean entry. Now it all workes great!

Modified by Anionz

more options

lockPref("toolkit.telemetry.prompted", true) is a possible source of this error, too. Tested with FF 9.0.1, the parameter seems to be no more boolean, but integer.

Modified by pfostentreffer