Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

mozilla.cfg not being applied in 60.0.2 version

  • 16 پاسخ
  • 1 has this problem
  • 12 views
  • آخرین پاسخ توسّط Krishna234

more options

We are migrating mozilla 59.0.1 to 60.0.2.

But i am not able to install with my customization files.. below are the files

mozilla.cfg

// Any comment. You must start the file with a comment!

// 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 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","true");

// Set default homepage - users can change // Requires a complex preference defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://google.com");

// Disable the internal PDF viewer 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;


// This will add missing certs from defaults/profile const {classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); var profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile); var certDBFile = profileDir.clone(); certDBFile.append("cert9.db")

// If cert9.db isn't there, it's a new profile if (!certDBFile.exists()) {

   var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile);
   defaultProfileDir.append("defaults");
   defaultProfileDir.append("profile");
   try {
       copyDir(defaultProfileDir, profileDir);
   } catch (e) {
       Components.utils.reportError(e);
   }

}else { //if cert9.db is less than 140kb, its a new one without the bank cert copy this one over if(certDBFile.fileSize<140000 ){ var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try {

       copyDir(defaultProfileDir, profileDir);

} catch (e) {

       Components.utils.reportError(e);

} }

}

function copyDir(aOriginal, aDestination) {

   var enumerator = aOriginal.directoryEntries;
   while (enumerator.hasMoreElements()) {
       var file = enumerator.getNext().QueryInterface(Components.interfaces.nsIFile);
       if (file.isDirectory()) {
           var subdir = aDestination.clone();
           subdir.append(file.leafName);
           try {
               subdir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
               copyDir(file, subdir);
           } catch (e) {
               Components.utils.reportError(e);
           }
       } else {
           try {
               file.copyTo(aDestination, null);
           } catch (e) {
               Components.utils.reportError(e);
           }
       }
   }

}

autoconfig.js

// Any comment. You must start the file with a comment! pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);

override.ini

[XRE] EnableProfileMigrator=false

with these files i am able to install 59 version without any issues.... But not able to install 60.0.2 version..

any suggestions?

We are migrating mozilla 59.0.1 to 60.0.2. But i am not able to install with my customization files.. below are the files mozilla.cfg // Any comment. You must start the file with a comment! // 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 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","true"); // Set default homepage - users can change // Requires a complex preference defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://google.com"); // Disable the internal PDF viewer 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; // This will add missing certs from defaults/profile const {classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); var profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile); var certDBFile = profileDir.clone(); certDBFile.append("cert9.db") // If cert9.db isn't there, it's a new profile if (!certDBFile.exists()) { var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try { copyDir(defaultProfileDir, profileDir); } catch (e) { Components.utils.reportError(e); } }else { //if cert9.db is less than 140kb, its a new one without the bank cert copy this one over if(certDBFile.fileSize<140000 ){ var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try { copyDir(defaultProfileDir, profileDir); } catch (e) { Components.utils.reportError(e); } } } function copyDir(aOriginal, aDestination) { var enumerator = aOriginal.directoryEntries; while (enumerator.hasMoreElements()) { var file = enumerator.getNext().QueryInterface(Components.interfaces.nsIFile); if (file.isDirectory()) { var subdir = aDestination.clone(); subdir.append(file.leafName); try { subdir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY); copyDir(file, subdir); } catch (e) { Components.utils.reportError(e); } } else { try { file.copyTo(aDestination, null); } catch (e) { Components.utils.reportError(e); } } } } autoconfig.js // Any comment. You must start the file with a comment! pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); override.ini [XRE] EnableProfileMigrator=false with these files i am able to install 59 version without any issues.... But not able to install 60.0.2 version.. any suggestions?

Chosen solution

Yes, the top of the CFG file.

Read this answer in context 👍 1

All Replies (16)

more options

Krishna234 said

We are migrating mozilla 59.0.1 to 60.0.2. But i am not able to install with my customization files.. below are the files
    • shortened for reply ***
with these files i am able to install 59 version without any issues.... But not able to install 60.0.2 version.. any suggestions?

With any new Browser update they also update their security on how Addons/Extensions and custom files are allowed to install. That is probably the biggest reason your custom files will not work since it is doesn't comply with the new Browser security updates. And since this is a FF End user help forum they can't help you with your customized files here. The only time FF End user forum can help is if the problem is FF itself but what your asking for help on isn't a FF issue since the files where written by yourself for FF.

more options

Hi Krishna234, are you using the new Enterprise features of Firefox 60 ESR? You may want to migrate because in Firefox 62+, the components/utilities code is expected to stop working. But pref() and lockpref() should still work.

For now, I don't know how you can determine why the file isn't loading or isn't being applied, as the case may be. Perhaps there is some kind of logging you can enable which will record issues encountered during startup.

more options

Jscher, Thanks for your response. Yes i am using Firefox 60.0.2 ESR for installation. No idea on why application is not reading mozilla.cfg file.

more options

Westend, Thanks for the info on how FF support works. I am not saying the issue with FF. My question is any one can help me with FF 60.0.2 enterprise customized deployment.

more options

WestEnd said

And since this is a FF End user help forum they can't help you with your customized files here. The only time FF End user forum can help is if the problem is FF itself but what your asking for help on isn't a FF issue since the files where written by yourself for FF.

Just because you do not understand this does not mean somebody else could not help so please do not say nobody here can help with this.

more options

jscher2000,,

I am able to solve my issue with .cfg . But now i am able to browse any website says. "Your connection is not secure"

Any suggestion on how to insert my organization certificates in to firefox?

more options

you can refer to https://wiki.mozilla.org/CA:AddRootToFirefox which lists a couple of ways to handle this.

more options

Krishna234 said

But now i am able to browse any website says. "Your connection is not secure" Any suggestion on how to insert my organization certificates in to firefox?

If you need a quick and dirty solution, you can set Firefox to trust the contents of the Windows certificate stored (shared by Microsoft browsers and by Chrome). That is this preference:

security.enterprise_roots.enabled => true

more options

philipp or jscher2000,

I am able to insert my certificates in my machine. I think so they are storing in my profile under C:\Users\*\AppData\Roaming\Mozilla\Firefox\Profile\abc\scert9.db fileit works as expected.


i have tried to login as test user and tried to login. Still i am seeing "Your connection is not secure" ... Later i have copied Cert9.db and Key4.db files to test user profile and after launch it worked as expected..


any alternative option to copy this files to all users ?

I have tried to use this

// If cert9.db isn't there, it's a new profile if (!certDBFile.exists()) {

   var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile);
   defaultProfileDir.append("defaults");
   defaultProfileDir.append("profile");
   try {
       copyDir(defaultProfileDir, profileDir);
   } catch (e) {
       Components.utils.reportError(e);
   }

}else { //if cert9.db is less than 140kb, its a new one without the bank cert copy this one over if(certDBFile.fileSize<140000 ){ var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try {

       copyDir(defaultProfileDir, profileDir);

} catch (e) {

       Components.utils.reportError(e);

} }

}

function copyDir(aOriginal, aDestination) {

   var enumerator = aOriginal.directoryEntries;
   while (enumerator.hasMoreElements()) {
       var file = enumerator.getNext().QueryInterface(Components.interfaces.nsIFile);
       if (file.isDirectory()) {
           var subdir = aDestination.clone();
           subdir.append(file.leafName);
           try {
               subdir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
               copyDir(file, subdir);
           } catch (e) {
               Components.utils.reportError(e);
           }
       } else {
           try {
               file.copyTo(aDestination, null);
           } catch (e) {
               Components.utils.reportError(e);
           }
       }
   }

}


it looks like it is not working!


Any suggestions?

more options

Can you define not working? Is it not copying or is something failing?

more options

mkaply,

when i add this script to .cfg file ... my application does not read my .cfg file and no changes are made for me or users..

If i remove these form the .cfg file... Then my application read the my.cfg file and make required customization to my application for all users.

more options

Can you check the browser console to see if there is an error there?

more options

Actually I think I just discovered this problem in a separate bug.

The line:

const {classes: Cc, interfaces: Ci, utils: Cu} = Components;

Must be at the TOP of the file before everything else (but after the first line)

// First line const {classes: Cc, interfaces: Ci, utils: Cu} = Components;

If it is later in the file, it causes other code not to execute.

more options

You mean on the top of .cfg file?

more options

Chosen Solution

Yes, the top of the CFG file.

more options

Thanks mkaply, jscher2000 and philipp

My issue is resolved. Now my users are able to launch the application with customized options.