Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Issue implementing a lock file in 56.0.2 64 bit

  • 7 个回答
  • 1 人有此问题
  • 9 次查看
  • 最后回复者为 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?

被采纳的解决方案

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()

定位到答案原位置 👍 0

所有回复 (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

选择的解决方案

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!