Bug 442406 - Cannot read MCD configuration file
Cannot read MCD configuration file
Product: Fedora
Classification: Fedora
Component: xulrunner (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Gecko Maintainer
Fedora Extras Quality Assurance
: 471430 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-04-14 13:58 EDT by Orion Poplawski
Modified: 2009-03-03 20:00 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-15 11:52:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Add extra PR_LOGing to MCD (6.02 KB, patch)
2008-04-14 17:33 EDT, Christopher Aillon
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Mozilla Foundation 427927 None None None Never
Mozilla Foundation 429141 None None None Never

  None (edit)
Description Orion Poplawski 2008-04-14 13:58:06 EDT
Description of problem:

Previously I could add:

pref("general.config.filename", "firefox.cfg");

to /usr/lib/firefox-<ver>/greprefs/all.js and it would read 

Now with xulrunner, I added:

pref("general.config.filename", "mozilla.cfg");

to /usr/lib/xulrunner-1.9pre/greprefs/all.js

and put mozilla.cfg in both /usr/lib/xulrunner-1.9pre and /usr/lib/firefox-3.0b5
to no avail.  I get:

"Failed to read the configuration file. Please contact your system administrator."

running firefox under strace -f I don't see any attempts to find a file named
"mozilla.cfg" anywhere.

Version-Release number of selected component (if applicable):
Comment 1 Christopher Aillon 2008-04-14 14:59:37 EDT
Does about:config list the correct value for your pref?

You can debug further with:

  export NSPR_LOG_FILE=mcd.log

prior to starting the browser.  In either case, there are zero customizations we
are doing here, and an upstream bug should be filed if this turns out to be a bug.
Comment 2 Orion Poplawski 2008-04-14 15:24:49 EDT
Can't do about:config as browser does not start.

-1207834928[8ce9a00]: general.config.filename = mozilla.cfg

Isn't it something of a customization that we run firexfox as a xulrunner app?

This seems related: https://bugzilla.mozilla.org/show_bug.cgi?id=427927

but not the same symptoms - no error dialogue box.

If I download firefox for linux from mozilla.com and do the customization, I
don't get the error dialogue.  about:config show the proper value for
general.config.filename.  But the customization doesn't work, like the above bug
indicates.  But this issue seems to be a Fedora issue.
Comment 3 Christopher Aillon 2008-04-14 17:32:00 EDT
I'm 100% confident that this is not a Fedora specific bug.  In fact, the fact
that even the binaries distributed by upstream won't load the files makes it
seem that MCD is completely busted upstream and we're just hitting a slightly
different symptom of the same problem.  But we can try to debug it further
before we send upstream...

The error message you are seeing at startup is coming from

readConfigFile() is returning an failure code for some reason.  Think you could
use gdb to step inside readConfigFile() to help figure out what specifically is
failing?  It is obviously somewhere after
since that is getting PR_LOG'ed for you.

I'll also attach a patch you can add locally to your xulrunner spec and rebuild
with which will add extra PR_LOG calls to help pinpoint where it's failing.
Comment 4 Christopher Aillon 2008-04-14 17:33:45 EDT
Created attachment 302395 [details]
Add extra PR_LOGing to MCD

This will put more info in the log which should help figure out exactly what's

Can you create a build with this and see what additional output you can get
from the log?
Comment 5 Orion Poplawski 2008-04-14 18:20:04 EDT
Running through gdb I see that it is failing evaluating prefcalls.js in
NS_NewLocalFileInputStream() at rv = in->Init(file, ioFlags, perm, bahaviorFlags);

gdb is not working too well though, get lots of "Could not find the frame base
for" messages.   I'll try to build with your patch.
Comment 6 Christopher Aillon 2008-04-15 00:02:52 EDT
Curious.  That likely means that it can't open() prefcalls.js.  strace might
shed some light.
Comment 7 Orion Poplawski 2008-04-15 10:29:19 EDT
It's looking for /usr/lib/firefox-3.0b5/defaults/autoconfig/prefcalls.js, but
it's at /usr/lib/xulrunner-1.9pre/defaults/autoconfig/prefcalls.js.
Comment 8 Christopher Aillon 2008-04-15 10:45:39 EDT
Lovely.  And if you create links to where it expects it (both prefcalls.js and
platforms.js might need it) and place your file in the same location, does it work?
Comment 9 Orion Poplawski 2008-04-15 11:01:14 EDT
I put a link to ../../xulrunner-1.9pre/defaults/autoconfig in
/usr/lib/firefox-3.0b5/defaults and it comes up.  Now just the upstream bug to
deal with.  Thanks.
Comment 10 Christopher Aillon 2008-04-15 11:52:51 EDT
This specific problem of looking in the wrong directory has been forwarded
upstream at https://bugzilla.mozilla.org/show_bug.cgi?id=429141
Comment 11 Orion Poplawski 2008-04-23 13:18:19 EDT
Looks like upstream 427927 has been fixed.  Hopefully this can make it into F9
as well.
Comment 12 Matěj Cepl 2008-11-15 20:12:39 EST
*** Bug 471430 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.