为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

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

详细了解

using autoconfig.js, but code below "//Disable crash reporter" stops Firefox 63 from processing the rest of the autoconfig file

  • 2 个回答
  • 1 人有此问题
  • 3 次查看
  • 最后回复者为 loaderladdy

more options

FF 63 is deployed in our organisation, and we use the autoconfig logic to configure preferences. Since FF 63 autoconfig.js which calls "mozilla.cfg" has stopped processing code following on from the section under the comment "// Disable crash reporter"

The segment of code that appears to cause the issue is as follows: "Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;" If I comment it out then the code below this is processed successfully. You'll also see in the text of "mozilla.cfg" that I commented out the section altogether and moved it to the section starting... "// ************ Crash reporter code moved as it..." i.e I moved the code to disable Crash Reporter to the end of the file so it executed last. I'm pretty sure the code deosn't execute as it just appears to cause Firefox to 'stall' until it starts.

Last bit of evidence, In the Browser Console one of the messages is as follows: "ReferenceError: Components is not defined[Learn More] firefox.cfg:57:1"

Any ideas on how to fix this please? our organisation policy is not to submit crash reports to stop data leakage, hence why we want crash reporter disabled.

Thanks in advance,

Pete


The full text of the file "mozill.cfg" is as follows:

//************** Service Provider configuration ************** // Disable updater lockPref("app.update.enabled", false); // make absolutely sure it is really off lockPref("app.update.auto", false); lockPref("app.update.mode", 0); lockPref("app.update.service.enabled", false);

// Disable Add-ons compatibility checking // Removed but placeholder kept (customer) clearPref("extensions.lastAppVersion");

// Don't show 'know your rights' on first run pref("browser.rights.3.shown", true);

// Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone","ignore");

// Disable the internal PDF viewer // Removed but placeholder kept (customer) pref("pdfjs.disabled", true);

// Disable the flash to javascript converter pref("shumway.disabled", true);

// Don't ask to install the Flash plugin pref("plugins.notifyMissingFlash", false);

//Disable plugin checking lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url");

// Disable health reporter lockPref("datareporting.healthreport.service.enabled", false);

// Disable all data upload (Telemetry and FHR) lockPref("datareporting.policy.dataSubmissionEnabled", false);

// Disable crash reporter // lockPref("toolkit.crashreporter.enabled", false); // Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

// *************** Service Provider Customisations ****************** // Set default homepage - users can change lockPref("browser.startup.homepage", "about:home|http://internal.urls/"); lockPref("browser.shell.checkDefaultBrowser", false);

// Set NTLM Negotiaton Options lockPref("network.negotiate-auth.allow-non-fqdn", true); lockPref("network.negotiate-auth.trusted-uris",".various.urls"); lockPref("network.automatic-ntlm-auth.allow-non-fqdn", true); lockPref("network.automatic-ntlm-auth.trusted-uris", ".various.urls");

// Set use of shared certificate repo lockPref("security.enterprise_roots.enabled", true);

// ************ Crash reporter code moved as it appears to be stopping the Service Provider Customisations from running, whic breaks Firefox *************** // Disable crash reporter lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

FF 63 is deployed in our organisation, and we use the autoconfig logic to configure preferences. Since FF 63 autoconfig.js which calls "mozilla.cfg" has stopped processing code following on from the section under the comment "// Disable crash reporter" The segment of code that appears to cause the issue is as follows: "Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;" If I comment it out then the code below this is processed successfully. You'll also see in the text of "mozilla.cfg" that I commented out the section altogether and moved it to the section starting... "// ************ Crash reporter code moved as it..." i.e I moved the code to disable Crash Reporter to the end of the file so it executed last. I'm pretty sure the code deosn't execute as it just appears to cause Firefox to 'stall' until it starts. Last bit of evidence, In the Browser Console one of the messages is as follows: "ReferenceError: Components is not defined[Learn More] firefox.cfg:57:1" Any ideas on how to fix this please? our organisation policy is not to submit crash reports to stop data leakage, hence why we want crash reporter disabled. Thanks in advance, Pete The full text of the file "mozill.cfg" is as follows: //************** Service Provider configuration ************** // Disable updater lockPref("app.update.enabled", false); // make absolutely sure it is really off lockPref("app.update.auto", false); lockPref("app.update.mode", 0); lockPref("app.update.service.enabled", false); // Disable Add-ons compatibility checking // Removed but placeholder kept (customer) clearPref("extensions.lastAppVersion"); // Don't show 'know your rights' on first run pref("browser.rights.3.shown", true); // Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone","ignore"); // Disable the internal PDF viewer // Removed but placeholder kept (customer) pref("pdfjs.disabled", true); // Disable the flash to javascript converter pref("shumway.disabled", true); // Don't ask to install the Flash plugin pref("plugins.notifyMissingFlash", false); //Disable plugin checking lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url"); // Disable health reporter lockPref("datareporting.healthreport.service.enabled", false); // Disable all data upload (Telemetry and FHR) lockPref("datareporting.policy.dataSubmissionEnabled", false); // Disable crash reporter // lockPref("toolkit.crashreporter.enabled", false); // Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false; // *************** Service Provider Customisations ****************** // Set default homepage - users can change lockPref("browser.startup.homepage", "about:home|http://internal.urls/"); lockPref("browser.shell.checkDefaultBrowser", false); // Set NTLM Negotiaton Options lockPref("network.negotiate-auth.allow-non-fqdn", true); lockPref("network.negotiate-auth.trusted-uris",".various.urls"); lockPref("network.automatic-ntlm-auth.allow-non-fqdn", true); lockPref("network.automatic-ntlm-auth.trusted-uris", ".various.urls"); // Set use of shared certificate repo lockPref("security.enterprise_roots.enabled", true); // ************ Crash reporter code moved as it appears to be stopping the Service Provider Customisations from running, whic breaks Firefox *************** // Disable crash reporter lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

由loaderladdy于修改

所有回复 (2)

more options

Firefox 63 runs autoconfig.cfg in a sandbox and you can no longer run privileged JavaScript code. "Autoconfig is sandboxed by default":

This is still possible in ESR versions.

For current Firefox releases there is a pref that you can set to false in the autoconfig.js file that specifies to use autoconfig.cfg.

  • pref("general.config.sandbox_enabled", false);
  • Bug 1479857 - Add a preference (default off) for autoconfig sanboxing for first release [general.config.sandbox_enabled]
more options

Thanks for the info @cor-el.

I understand what to. Do with the autoconfig.js file now, i.e. add the line “ pref(“general.config.sandbox_enabled”, false); “ to it.

To disable the Firebox Crash Report I need to take which action?

This means I don’t have to worry about what happens with the sand boxing of autoconfig in future as I’ll already be using the desired default configuration.