Firefox devtools broken with custom home-manager configuration

I configured firefox to my likings. Specifically, I have set a couple settings, installed extensions and have a custom userChrome.css styles, all configured through home-manager.

The configuration as of writing the post can be viewed here.

The devtools work, initially. After some time tweaking options and such, they get broken. When I open devtools (either page devtools with Ctrl+Shift+I or browser devtools for tweaking browser styles), all I get is a blank screen. In fact, with page devtools, I can’t even close them with the same shortcut. There are nothing in logs, as far as I’ve looked, and I have no idea what caused the problem. They break spontaneously, and I cannot track the exact moment after which they broke.
The problem can be fixed (sorta) by completely removing the firefox profile with rm -rf ~/.mozilla/, but the same cycle repeats after some time using a browser.
I started firefox in safe mode, without any extensions, the devtools are still broken. I tried clearing only the website cache, that didn’t help.
The worst thing here is that I have no idea why the problem shows up, and in fact, I don’t even know when it shows up exactly. All I see is a blank devtools when I try to open them.

P.S. Otherwise, the browser works flawlessly. The only thing broken so far is the devtools.



On the first screenshot I have opened devtools with Ctrl+Shift+I, on the second one I tried opening a browser console with Ctrl+Shift+J.

I appreciate any help.

I would try checking whether it’s one of the configuration options you’ve set. I would binary search them by commenting out half and so on.

Quick update on this. First off, no, that’s not my options directly.
The specific file that causes the problem is places.sqlite inside the profile. I couldn’t find any issues about this on home-manager repository. Although I was contacted by a person that had the exact same issue - when you manage your Firefox options and extentions through HM, it borks your places.sqlite file, which in turn breaks devtools and many other browser aspects.
Even though I know the specific file that causes the problem now, I’m still not sure of the proper fix. I suspect the issue is somewhere in the home manager internally, and I can’t really do anything on my side to fix it. Except turn off history saving :smiley:

I manage some Firefox extensions via home-manager. Is there an issue filed, please?

I’m also affected by this, closing Firefox & deleting places.sqlite fixed the issue for me (luckily my browsing history is synced to account)

find ~/.mozilla/firefox -name 'places.sqlite*' -delete
1 Like

aaand… it happened again, but I’m pretty sure I didn’t rebuild NixOS or HM

As mentioned above, I’d also suggest filing an issue with HM if one already doesn’t exist.

Heya everyone, sorry for not replying here.
I’m not using NixOS anymore, so I’m not actually able to reproduce the bug, if it still exists at all.
So I definitely won’t be filing an issue, sorry.

My reply was to kdn since they were the one who newly reported the issue :slight_smile:
Same goes for anyone else who encounters this.

1 Like

Hi all, just realized this issue is the exact same as what I was experiencing. Thought it was an extension issue since I installed new extensions as I migrated my Firefox config to Nix!

Made an issue: bug: firefox: places.sqlite in profile getting corrupted · Issue #6083 · nix-community/home-manager · GitHub

2 Likes

Hey @ryan77627, do you remember which extension was creating this problem?