搜索 | 用户支持

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

Learn More

Failure to read configuration file because of enable_sandbox.

  • 7 个回答
  • 1 人有此问题
  • 10 次查看
  • 最后回复者为 robert_phan

more options

I was trying to set a local file as a new tab, and followed a guide online. I put the autoconfig.js and the firefox.cfg files all in the right place, but it didn't work. When closed and reopened the browser, it said "Failed to read the configuration file. Please contact your system administrator." I figured out that the very last line:

pref("general.config.sandbox_enabled", false);

was causing it to say that. How do I fix this?

I was trying to set a local file as a new tab, and followed a guide online. I put the autoconfig.js and the firefox.cfg files all in the right place, but it didn't work. When closed and reopened the browser, it said "Failed to read the configuration file. Please contact your system administrator." I figured out that the very last line: pref("general.config.sandbox_enabled", false); was causing it to say that. How do I fix this?

所有回复 (7)

more options

You can check the Browser Console for more detail.

The line to disable the sandbox needs to be in the autoconfig.js file in the defaults\pref folder and is mandatory if you have included JavaScript code in autoconfig.cfg. Note that autoconfig.js needs to use Unix line endings (LF and not CR/LF).

// autoconfig.js needs to start with a comment line
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

more options

Thank you for the response. The error message no longer shows up. Unfortunately, it still doesn't work. I followed this [guide] right here. The browser console says "extension is undefined" and "this.window.gBrowserInit is undefined".

由robert_phan于修改

more options

robert_phan said

Thank you for the response. The error message no longer shows up. Unfortunately, it still doesn't work. I followed this [guide] right here. The browser console says "extension is undefined" and "this.window.gBrowserInit is undefined".

I don't see this.window.gBrowserInit in the other thread. Do you have other code in your .cfg file?

more options

jscher2000 said

robert_phan said

Thank you for the response. The error message no longer shows up. Unfortunately, it still doesn't work. I followed this [guide] right here. The browser console says "extension is undefined" and "this.window.gBrowserInit is undefined".

I don't see this.window.gBrowserInit in the other thread. Do you have other code in your .cfg file?

I don't think so. This is the code in my cfg file:

// var {classes:Cc,interfaces:Ci,utils:Cu} = Components; /* set new tab page */ try { Cu.import("resource:///modules/AboutNewTab.jsm"); var newTabURL = (My file); AboutNewTab.newTabURL = newTabURL; } catch(e){Cu.reportError(e);} // report errors in the Browser Console

It doesn't work. In the browser console, it said that an extension and this.window.gBrowserInit was undefined.

more options

Oh, I see. It doesn't sound like those messages are related to your Autoconfig script.

Any difference if you set the new tab URL to a website instead of the local file? For example:

var newTabURL = 'https://support.mozilla.org/';

more options

What file or URL do you use for the new tab page ?

You can open the file in a Firefox tab to get the correct URL.

more options

Thank you for the tips! I've figured out the problems on my own though, and it's because I missed a semicolon lol.