Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Learn More

Issue implementing a lock file in 56.0.2 64 bit

  • 7 svar
  • 1 har detta problem
  • 26 visningar
  • Senaste svar av reteer

more options

I am trying to lock down some preferences in about:config in Mozilla 56.0.2 64 bit. I created a Mozilla.cfg file, saved it as ANSI coded and placed it in the Mozilla installation directory. I then created a local-settings.js file and placed it in the defaults/pref subfolder. The .cfg file is as follows: // lockPref("security.default_personal_cert", 0);

The local-settings.js file is as follows:

pref("general.config.obscure_value", 0); pref("general.config,filename", "mozilla.cfg");

After saving the files I close Mozilla and reopen to the following pop-up error:

AutoConfig Alert

Netscape.cfg/AutoConfig failed. Please contact sys admin: [Exception... "Component returned failure code:0x8000ffff (NS_ERROR_UNEXPECTED) [ns1PrefBranch.SetIntPref}" ns result: "0x8000ffff (NS_ERROR_UNEXPECTED) " location : "JS frame ::prefcall.js :: defaultPref :: line 58" data: no]

Firefox will still open despite the error and the applicable preference has been locked in about:config. How do I get rid of this error?

I am trying to lock down some preferences in about:config in Mozilla 56.0.2 64 bit. I created a Mozilla.cfg file, saved it as ANSI coded and placed it in the Mozilla installation directory. I then created a local-settings.js file and placed it in the defaults/pref subfolder. The .cfg file is as follows: // lockPref("security.default_personal_cert", 0); The local-settings.js file is as follows: pref("general.config.obscure_value", 0); pref("general.config,filename", "mozilla.cfg"); After saving the files I close Mozilla and reopen to the following pop-up error: AutoConfig Alert Netscape.cfg/AutoConfig failed. Please contact sys admin: [Exception... "Component returned failure code:0x8000ffff (NS_ERROR_UNEXPECTED) [ns1PrefBranch.SetIntPref}" ns result: "0x8000ffff (NS_ERROR_UNEXPECTED) " location : "JS frame ::prefcall.js :: defaultPref :: line 58" data: no] Firefox will still open despite the error and the applicable preference has been locked in about:config. How do I get rid of this error?

Vald lösning

Maybe you could re-copy/paste that to be sure, since it seems to have typos in it. Also, I don't know where your file is setting an integer preference if you changed it to a string?

https://developer.mozilla.org/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPrefBranch#setIntPref()

Läs svaret i sitt sammanhang 👍 0

Alla svar (7)

more options

So, the interesting aspect of this is this going to work in Firefox 57 Final released tomorrow on the Mozilla servers as full version and updates or can get now https://fileforum.betanews.com/detail/Mozilla-Firefox-for-Windows/1032985422/1 So is this going to be a waste of time trying to get it to work with 56.0.2

Please let us know if this solved your issue or if need further assistance.

more options

reteer said

The .cfg file is as follows:
//
lockPref("security.default_personal_cert", 0);

When I look up security.default_personal_cert it is a string preference with two possible values:

  • "Ask Every Time" (default)
  • "Select Automatically"

What is the zero supposed to do?

To watch what happens in about:config (or prefs.js) you can toggle the preference on the Options/Preferences page:

  • Windows: "3-bar" menu button (or Tools menu) > Options
  • Mac: "3-bar" menu button (or Firefox menu) > Preferences
  • Linux: "3-bar" menu button (or Edit menu) > Preferences
  • Any system: type or paste about:preferences into the address bar and press Enter/Return to load it

Firefox 56-58: In the search box at the top of the page on the right side, type cert and Firefox should filter to the Certificates part of the page where you see two radio buttons for this setting.

Firefox 38-55: In the left column, click Advanced. Then on the right side, make the "Certificates" mini-tab active. I assume after that it's similar to Firefox 56+.

more options

The issue is not the setting for the preference, that has been set to "Ask Every Time" and is good. The problem is when I lock this particular preference down with the .cfg file and the local-settings.js files, it gives me the error when I reopen Firefox. I need to know how if there is a way to get rid of the error.

more options

What error do you get now?

more options

I get the same error as I posted originally.

AutoConfig Alert

Netscape.cfg/AutoConfig failed. Please contact sys admin: [Exception... "Component returned failure code:0x8000ffff (NS_ERROR_UNEXPECTED) [ns1PrefBranch.SetIntPref}" ns result: "0x8000ffff (NS_ERROR_UNEXPECTED) " location : "JS frame ::prefcall.js :: defaultPref :: line 58" data: no]

Despite the error this does lock down the configuration, but I need to get rid of this error.

more options

Vald lösning

Maybe you could re-copy/paste that to be sure, since it seems to have typos in it. Also, I don't know where your file is setting an integer preference if you changed it to a string?

https://developer.mozilla.org/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPrefBranch#setIntPref()

more options

the integer preference is the problem. I replaced the zero with one of the preference options which like you said is supposed to be a string, and no error! sorry just inexperience here. thanks for the info!