Firefox-esr after update Failed to read config file

Hi all,
I updated my librem 5 2 days ago and there was an update for firefox-esr.
After this update I got an error when starting Firefox:

Failed to open config file

I saw that it was a security update on the way so I was waiting for this and hope that it would fix it.
Today I updated with the latest security update, but still the same problem at start, a popup saying that Firefox fails to read config.
I tried to reconfigure:

dpkg re-configure firefox-esr
dpkg re-configure firefox-esr-mobile-config

But still the same problem.
I tried to reinstall firefox:

apt remove firefox-esr
apt purge firefox-esr
apt remove firefox-esr-mobile-config
apt install firefox-esr
apt install firefox-esr-mobile-config

But still the same problem.
I tried to run firefox med --jsconsole to get errors and this is what I find:

NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import] mobile-config-autoconfig.js:8
NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIAppStartup.secondsSinceLastOSRestart]
    _collectStartupConditionsTelemetry resource:///modules/BrowserGlue.sys.mjs:1830
    BG__onFirstWindowLoaded resource:///modules/BrowserGlue.sys.mjs:1901
    BG_observe resource:///modules/BrowserGlue.sys.mjs:1126
    _delayedStartup chrome://browser/content/browser-init.js:616
BrowserGlue.sys.mjs:1839:15
CustomizableUI: TypeError: aNode is null -- resource:///modules/CustomizableUI.sys.mjs:1724 2 CustomizableUI.sys.mjs:2768
CustomizableUI: TypeError: aNode is null -- resource:///modules/CustomizableUI.sys.mjs:1724 2 CustomizableUI.sys.mjs:2768

I tried to comment out line 8 in mobile-config-autoconfig.js but the problem seems to be further down the stack.

I would appreciate some input as I feel kind of stuck!
Many thanks in advance!

3 Likes

uninstall firefox-esr
delete the usr/lib/firefox-esr folder
reinstall firefox-esr

2 Likes

Just guessing but … start Firefox from the command line using a different profile - or anything equivalent to that (with a view to seeing whether the problem associates with your Firefox profile).

3 Likes

I had already done this when I read your post. Nice clean install and no error on start. If course, it wiped user0/Emma’s awesome mobile-friendly-firefox mod. I went to the Codeberg site and downloaded 3.0.0, but it says: “It is required to install & launch Firefox… before running this install script.” Dunno why it is failing.

1 Like

You can use these instructions to install the Firefox ESR 128 track:

I have started Firefox today for the first time after all the updates. It greeted me with a pop-up declaring as follows.

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

Here is a screenshot of that dialogue window.

Знімок екрана з 2024-10-12 12-51-40

After clicking “OK”, it just proceeds with starting Firefox, which appears ordinary. Is it safe to just use it as is? Is it reasonable to expect that it will fix itself over time? The warning message is unhelpful. I rarely use Firefox and did not customize it in any way, so I am inclined to believe that there is a bug in the Firefox ESR update instead of an issue in the Librem 5 Byzantium setup.

$ uname -a
Linux pureos 6.6.0-1-librem5 #1 SMP PREEMPT Sun Jul  7 20:23:17 EDT 2024 aarch64 GNU/Linux
$ firefox --version
Mozilla Firefox 128.3.1esr
2 Likes

I can’t remember if PureOS for Librem 5 has the mobile-config automatically installed, but it was installed on mine. Removing it made the warning go away.

To do that you can run sudo apt remove firefox-esr-mobile-config

Make sure that all the dashes are in there, because if you use a space in there at the wrong spot then you might tell it to remove Firefox instead.

1 Like

I’m pretty sure that that package is installed by default.

Removing it also fixed the problem for me. I guess that’s only a temporary solution though.

1 Like

Unless the quite outdated firefox-esr-mobile-config is updated in PureOS Byzantium, removing it is the permanent solution.

You can always install postmarketOS’ mobile-config-firefox instead, which is maintained to work with current Firefox (ESR).

6 Likes

Can confirm that removing this got rid of the dialog box on startup and I’m using User0’s customization…all good.

3 Likes

I fixed it by installing the package generated by the pipeline of the pending merge request of v4 of firefox-esr-mobile-config (Document and release 4.2.0-1pureos1~byz (!6) · Merge requests · Librem5 / debs / firefox-esr-mobile-config · GitLab)

wget https://source.puri.sm/Librem5/debs/firefox-esr-mobile-config/-/jobs/429326/artifacts/raw/debian/output/firefox-esr-mobile-config_4.2.0-1pureos1~byz+librem5ci86029.b7a9841_all.deb
sudo apt install ./firefox-esr-mobile-config_4.2.0-1pureos1~byz+librem5ci86029.b7a9841_all.deb
4 Likes

Thanks!

Also, since I wanted a more recent versions of the package, I figured out that downloading the deb from debian sid (unstable) works fine!

2 Likes

For the record, here’s how I just successfully upgraded firefox-esr-mobile-config to v4.2.0 from Crimson.

  1. Remove Emma’s customizations:

    sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" firefox-esr-mobile-config
    
  2. Set up Crimson package sources to allow only firefox-esr-mobile-config and no other packages:

    sudo tee /etc/apt/preferences.d/90_block_crimson.pref << 'EOF'
    Package: firefox-esr-mobile-config
    Pin: release a=crimson
    Pin-Priority: 1001
    
    Package: *
    Pin: release a=crimson
    Pin-Priority: -1
    EOF
    
  3. Add Crimson sources:

    for type in deb deb-src; do
      printf "${type} %s %s %s\n" \
        'https://repo.pureos.net/pureos' crimson main
    done \
      | sudo tee /etc/apt/sources.list.d/crimson.list
    
  4. Confirm that sources have been configured correctly:

    $ sudo apt update && apt search firefox-esr-mobile-config
    […]
    1 package can be upgraded. Run 'apt list --upgradable' to see it.
    Sorting... Done
    Full Text Search... Done
    firefox-esr-mobile-config/crimson 4.2.0-1pureos1 all [upgradable from: 3.0.0-1pureos1]
    Default mobile-friendly configuration for Firefox ESR
    
  5. Upgrade firefox-esr-mobile-config to the Crimson version, 4.2.0:

    sudo apt full-upgrade --autoremove
    
  6. Restart Firefox.

2 Likes

Hello,
thank you very much for this help to use firefox-esr-mobile-config in deb, so I tried without success to install it by hand from git to use it under librewolf (by copying files, but all parameters of do not work), but I do not know how to compile the script for librewolf).

Does anyone know how to do it? Using librewolf in flatpak, it goes rather well without the script, but the Librem 5 is a little too slow when it uses librewolf in flatpak, so I thought to try in AppImage, but I can’t make the script to make it work in full, Does anyone know how to use it on librewolf?

In truth I don’t even know how to compile it with make, because there is no indication on the page

https://source.puri.sm/Librem5/debs/firefox-esr-mobile-config/
https://pkgs.postmarketos.org/package/master/postmarketos/riscv64/mobile-config-firefox-librewolf

1 Like

Hello again,
I do a up, because I’m always interested if someone has a solution to implement this setting on librewolf in AppImage.

Thank you!!

1 Like

Is that for Byzantium, and does one figure out how to get all of FF off the L5 then figure out how to install “deb from debian”?

My FF went stupid after the downdate too. It loads, it just has to go through a long wait after clicking on the first error, before getting it’s next error but loads after clicking the 2nd error. It works, though a bit cranky at times.

If fixing it until the next update requires a lot of linux/PureOS command knowledge (more than the duops need) and language (what a lot of people speak around here) - then I’ll just stick to playing 2048.

~s

1 Like

You just download the “.deb” file from the link I shared (the download link will be under the word “all” in the table) and I guess double click it from the File manager, or sudo apt install it from the shell. In case that’s not clear enough, there are plenty of guides, you’re welcome to search “how to install a .deb file”. Also, this will only install a configuration which makes Firefox work more smoothly in the Librem5. If you’re looking for something else this topic is not about that, so perhaps it would be better to start a new one.

1 Like

I get it. You’re not here to teach or preach. You just shared your expertise and I was glad that you did. Sort of :face_with_spiral_eyes:

~s

1 Like

Right, that’s for Byzantium.

2 Likes