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

搜索 | 用户支持

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

详细了解

probleme firefox config cfg

more options

Hello,

We have a problem with version 78.0.2 ESR,

We apply a firefox configuration strategy with a cfg in the firefox folder & since the last firefox version opens with an error message "failure to read the configuration file. Please contact your system administrator."


with the version 68.10.0 ESR The message does not appear do you have an idea?

Hello, We have a problem with version 78.0.2 ESR, We apply a firefox configuration strategy with a cfg in the firefox folder & since the last firefox version opens with an error message "failure to read the configuration file. Please contact your system administrator." with the version 68.10.0 ESR The message does not appear do you have an idea?
已附加屏幕截图

被采纳的解决方案

This issue is that Services.perms.add no longer works.

You'll need to use:

     Services.perms.addFromPrincipal(
       Services.scriptSecurityManager.createContentPrincipalFromOrigin("http://sriglx"),
       "popup", 1
     );

There's no need do a newURL anymore.

I would suggest you look into using our policy code to do this. It's much easier.

https://github.com/mozilla/policy-templates#popupblocking

定位到答案原位置 👍 0

所有回复 (8)

more options

Hello,

We have a problem with version 78.0.2 ESR,

We apply a firefox configuration strategy with a cfg in the firefox folder & since the last firefox version opens with an error message "failure to read the configuration file. Please contact your system administrator."


when we click on ok firefox launches,but the error message will be annoying for users.


with the version 68.10.0 ESR The message does not appear do you have an idea? Thank you

由aurelien.huteau于修改

more options

HI aurelien.huteau

I've asked a Firefox developer to take a look!

Cheers!

...Roland

more options

Hi aurelien.huteau

The developer asked what the error if any is in the javascript console [1]

Cheers!

...Roland

[1] You can open the Browser Console in one of two ways:

  1. from the menu: select "Browser Console" from the Web Developer submenu in the Firefox Menu (or Tools
  2. from the keyboard: press Ctrl+Shift+J (or Cmd+Shift+J on a Mac).
more options

This means that you use an autoconfig.cfg file and that Firefox notices errors in this file. This autoconfig file is run a privileged JavaScript and error throw an exception.

Are there specific errors reported in the Browser Console related to this autoconfig.cfg file ?

(EDIT: noticed that Roland suggested the same while I was typing my response)

由cor-el于修改

more options

Hello, Sorry for the delay I was on vacation.

here is a screenshoot of the problem encountered with version 78.0.2

as well as a copy paste of our chp.cfg


Thank you for your responses reactive =)

chp.cfg:

//Firefox Default Settings

// Désactive la vérification de la comptabilité des extensions clearPref("extensions.lastAppVersion");

// Désactive l'affichage de 'Connaître vos droits' au premier lancement pref("browser.rights.3.shown", true);

// Ne montre pas les nouvelles fonctionnalités à chaque mise à jour pref("browser.startup.homepage_override.mstone","ignore");

// Modifie la page d'accueil pref("browser.startup.homepage", "http://typo3.chprod.fr");

// Désactive la vérification des plugins lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url");

// Désactive la popup navigateur par défaut lockPref("browser.shell.checkDefaultBrowser", false);

// Désactive le rapport de santé lockPref("datareporting.healthreport.service.enabled", false);

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

// Désactive le rapport de crashs lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

// supprimer la popup d'import de la configuration pref("profile.migration_behavior", 0);

// Désactive le message cette connexion n'est pas sécuriséé pref("security.insecure_field_warning.contextual.enabled", false);

// configure le proxy // type : 0=pas de proxy, 1=manuel, 2=autoconf par url, 4=autodetect, 5=system pref("network.proxy.type", 4); // proxy : pref("network.proxy.backup.ftp", "servproxy.chprod.fr"); pref("network.proxy.backup.ftp_port", 8080); pref("network.proxy.backup.gopher", "servproxy.chprod.fr"); pref("network.proxy.backup.gopher_port", 8080); pref("network.proxy.backup.socks", "servproxy.chprod.fr"); pref("network.proxy.backup.socks_port", 8080); pref("network.proxy.backup.ssl", "servproxy.chprod.fr"); pref("network.proxy.backup.ssl_port", 8080); pref("network.proxy.ftp", "servproxy.chprod.fr"); pref("network.proxy.ftp_port", 8080); pref("network.proxy.gopher", "servproxy.chprod.fr"); pref("network.proxy.gopher_port", 8080); pref("network.proxy.http", "servproxy.chprod.fr"); pref("network.proxy.http_port", 8080); pref("network.proxy.no_proxies_on", "10.0.0.0/8,sri,srvintra1x,srvintra1,10.1.11.108"); pref("network.proxy.share_proxy_settings", true); pref("network.proxy.socks", "servproxy.chprod.fr"); pref("network.proxy.socks_port", 8080); pref("network.proxy.ssl", "servproxy.chprod.fr"); pref("network.proxy.ssl_port", 8080);


pref("privacy.sanitize.migrateFx3Prefs", true); pref("toolkit.telemetry.prompted", 2); pref("toolkit.telemetry.rejected", true); pref("urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/newkey", 1258295937);

// autorisation des popups pour certains sites : Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://10.1.148.170", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://kaliweb", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://servsql2", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://sriglx", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://typo3.chprod.fr", null, null); Services.perms.add(uri, "popup", 1);

more options

Hello, Sorry for the delay I was on vacation.

here is a screenshoot of the problem encountered with version 78.0.2

as well as a copy paste of our chp.cfg


Thank you for your responses reactive =)

chp.cfg:

//Firefox Default Settings

// Désactive la vérification de la comptabilité des extensions clearPref("extensions.lastAppVersion");

// Désactive l'affichage de 'Connaître vos droits' au premier lancement pref("browser.rights.3.shown", true);

// Ne montre pas les nouvelles fonctionnalités à chaque mise à jour pref("browser.startup.homepage_override.mstone","ignore");

// Modifie la page d'accueil pref("browser.startup.homepage", "http://typo3.chprod.fr");

// Désactive la vérification des plugins lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url");

// Désactive la popup navigateur par défaut lockPref("browser.shell.checkDefaultBrowser", false);

// Désactive le rapport de santé lockPref("datareporting.healthreport.service.enabled", false);

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

// Désactive le rapport de crashs lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

// supprimer la popup d'import de la configuration pref("profile.migration_behavior", 0);

// Désactive le message cette connexion n'est pas sécuriséé pref("security.insecure_field_warning.contextual.enabled", false);

// configure le proxy // type : 0=pas de proxy, 1=manuel, 2=autoconf par url, 4=autodetect, 5=system pref("network.proxy.type", 4); // proxy : pref("network.proxy.backup.ftp", "servproxy.chprod.fr"); pref("network.proxy.backup.ftp_port", 8080); pref("network.proxy.backup.gopher", "servproxy.chprod.fr"); pref("network.proxy.backup.gopher_port", 8080); pref("network.proxy.backup.socks", "servproxy.chprod.fr"); pref("network.proxy.backup.socks_port", 8080); pref("network.proxy.backup.ssl", "servproxy.chprod.fr"); pref("network.proxy.backup.ssl_port", 8080); pref("network.proxy.ftp", "servproxy.chprod.fr"); pref("network.proxy.ftp_port", 8080); pref("network.proxy.gopher", "servproxy.chprod.fr"); pref("network.proxy.gopher_port", 8080); pref("network.proxy.http", "servproxy.chprod.fr"); pref("network.proxy.http_port", 8080); pref("network.proxy.no_proxies_on", "10.0.0.0/8,sri,srvintra1x,srvintra1,10.1.11.108"); pref("network.proxy.share_proxy_settings", true); pref("network.proxy.socks", "servproxy.chprod.fr"); pref("network.proxy.socks_port", 8080); pref("network.proxy.ssl", "servproxy.chprod.fr"); pref("network.proxy.ssl_port", 8080);


pref("privacy.sanitize.migrateFx3Prefs", true); pref("toolkit.telemetry.prompted", 2); pref("toolkit.telemetry.rejected", true); pref("urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/newkey", 1258295937);

// autorisation des popups pour certains sites : Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://10.1.148.170", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://kaliweb", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://servsql2", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://sriglx", null, null); Services.perms.add(uri, "popup", 1); var uri = Services.io.newURI("http://typo3.chprod.fr", null, null); Services.perms.add(uri, "popup", 1);

more options

选择的解决方案

This issue is that Services.perms.add no longer works.

You'll need to use:

     Services.perms.addFromPrincipal(
       Services.scriptSecurityManager.createContentPrincipalFromOrigin("http://sriglx"),
       "popup", 1
     );

There's no need do a newURL anymore.

I would suggest you look into using our policy code to do this. It's much easier.

https://github.com/mozilla/policy-templates#popupblocking

more options

Hello,

Thank you very much problem solved.


Aurelien Huteau