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

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

Configuration Error: Failed to read the configuration file. Autoconfig.js mozilla.cfg

  • 12 antwoorde
  • 2 hierdie probleem
  • 3 views
  • Laaste antwoord deur cor-el

more options

I'm the I.T. person for a public school. We have over 300 Mac computers, all running 10.6.8 with Firefox v40.0.3. When attempting to implement enterprise management to, for example, set a home page for all of our Mac computers (as described here: https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment) I get "Configuration Error: Failed to read the configuration file. Please contact your system administrator."

The autoconfig.js is: pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);

The Mozilla.cfg is: pref("browser.startup.homepage", "data:text/plain,http://www.waikoloaschool.org");

These two files are stored within FIREFOX.APP (./Applications) in: ./Applications/Firefox/Contents/Resources/defaults/pref/

Troubleshooting Notes: 1) If I comment out (temporarily remove) line 1 in autoconfig.js, the error goes away. 2) No matter what I do, I cannot get the Mozilla.cfg file to successfully implement the home page, even if I get the error to stop appearing (as in step 1 above). 3) With autoconfig.js as shown above (no lines temporarily removed) and Mozilla.cfg lines commented out (temporarily removed), the error still appears indicating that Mozilla.cfg does not contain any syntax errors. 4) I have tried placing these 2 files elsewhere but the home page is not set. Elsewhere includes: ./Applications/Firefox/Contents/Resources/browser/ 5) The Firefox Enterprise instructions say to put files in "browser/defaults/preferences" but that path does not exist.

I'm the I.T. person for a public school. We have over 300 Mac computers, all running 10.6.8 with Firefox v40.0.3. When attempting to implement enterprise management to, for example, set a home page for all of our Mac computers (as described here: https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment) I get "Configuration Error: Failed to read the configuration file. Please contact your system administrator." The autoconfig.js is: pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); The Mozilla.cfg is: pref("browser.startup.homepage", "data:text/plain,http://www.waikoloaschool.org"); These two files are stored within FIREFOX.APP (./Applications) in: ./Applications/Firefox/Contents/Resources/defaults/pref/ Troubleshooting Notes: 1) If I comment out (temporarily remove) line 1 in autoconfig.js, the error goes away. 2) No matter what I do, I cannot get the Mozilla.cfg file to successfully implement the home page, even if I get the error to stop appearing (as in step 1 above). 3) With autoconfig.js as shown above (no lines temporarily removed) and Mozilla.cfg lines commented out (temporarily removed), the error still appears indicating that Mozilla.cfg does not contain any syntax errors. 4) I have tried placing these 2 files elsewhere but the home page is not set. Elsewhere includes: ./Applications/Firefox/Contents/Resources/browser/ 5) The Firefox Enterprise instructions say to put files in "browser/defaults/preferences" but that path does not exist.

All Replies (12)

more options

The mozilla.cfg file needs to start with a comment line (//) because this line is skipped for security reasons. You only need to use the data version if you set the default of the pref via defaultPref() and not for a pref()

//
pref("browser.startup.homepage", "http://www.waikoloaschool.org");

Also make sure that the file is a plain text file and doesn't have a hidden .txt file extension, so check the properties to be sure.

Gewysig op deur cor-el

more options

Thank you for your support and quick reply. I did as suggested, but the error continues. I did the following: 1) Copied and pasted your text above in my mozilla.cfg file, replacing all pre-existing content with your content, making sure the first line is a comment line. 2) Using COMMAND+INFO, verified that there was no hidden ".txt" file extension.

more options

It works for me with the above posted text.

Make sure that the file name is mozilla.cfg with a lower case 'm'. The mozilla.cfg file needs to be in the Firefox application folder where the other files (firefox startup script) are located and not in the defaults/pref folder where the channel-prefs.js file is located. Only the local-settings.js file that specifies to use the mozilla.cfg should be in the defaults\pref folder.


data:text/plain;charset=utf-8;base64,Ly8KcHJlZigiYnJvd3Nlci5zdGFydHVwLmhvbWVwYWdlIiwgImh0dHA6Ly93d3cud2Fpa29sb2FzY2hvb2wub3JnIik7

Gewysig op deur cor-el

more options

Thank you for your support. The mozilla.cfg file is lower case wherever used, with the exception of this forum because spellcheck keeps changing it to upper case. When you say, "The mozilla.cfg file needs to be in the Firefox application folder where the other files (firefox startup script) are located..." could you provide exact details (full path and filename) because there is no Firefox application folder in Mac, just the Firefox.app file which, if I select Show Package Contents" then shows (see attached) various folders. Please specify exactly where I place mozilla.cfg. Thank you.

more options

There is no mention of "local-settings.js" here: https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment Only autoconfig.js

more options

I assume that would be in Firefox.app/Contents/MacOS/

These functions can be used in the mozilla.cfg file:

defaultPref();	// set new default value
pref();		// set pref, allow changes in current session
lockPref();	// lock pref, disallow changes
more options

I get the same results if I use local-settings.js. I get the same results no matter where I put mozilla.cfg. What OS X version are you running? What Firefox version are you running?

more options

Still not working... using your mozilla.cfg (no hidden ".txt" file extension, all lower case) in Firefox.app/Contents/MacOS/ and using either your script in "local-settings.js" or in "autoconfig.js" put into folder ./Applications/Firefox/Contents/Resources/defaults/pref/ .

more options

I see this text in the article that you posted above.

Due to Apple's stricter approach to software signing, as of about version 35 or so configuration files should now be placed relative to /Applications/Firefox.app/Contents/Resources (so mozilla.cfg should go there, and autoconfig.js under /Applications/Firefox.app/Contents/Resources/defaults/pref.)

The mozilla.cfg file needs to be in /Applications/Firefox.app/Contents/Resources The local-settings.js file needs to be in /Applications/Firefox.app/Contents/Resources/defaults/pref

more options

Thank you!!! A miracle has occurred. It is now working! I had forgot to mention that I had read and tried that (but with autoconfig.js, not local-settings.js), as you suggested in the post immediately above, but what I had not done is remove the hidden ".txt" file extension. So, for others needing this solution, to recap (for Firefox v40 and Mac OS X 10.6.8) : 1) "mozilla.cfg" must be lower case 2) Remove the hidden ".txt" file extension from "mozilla.cfg" by using "Get Info" 3) Change the name of autoconfig.js to local-settings.js, although either file name works 4) Put local-settings.js in /Applications/Firefox.app/Contents/Resources/defaults/pref 5) Put mozilla.cfg file in /Applications/Firefox.app/Contents/Resources 6) local-settings.js must be: // local-settings.js pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); 7) mozilla.cfg must be (with comment line as first line): // pref("browser.startup.homepage", "http://www.waikoloaschool.org");

more options

Where can I find a complete list of all mozilla.cfg functions/options?

Gewysig op deur kchristian2015

more options

You're welcome.

I hadn't read the MDN article the first time (yeah, I should have), so I had missed the specific information about Mac that I hadn't seen before. Glad to read that you got it running.