Hi Antoine, thanks for the report! Can I ask for a bit more information?
Which Firefox version are you seeing these issues with? Is it on Firefox release, beta/developer, nightly? And on which operating system? (If you happen to be using Linux, can you check the version number? Some Linux distributions pack old versions of Firefox.)
Does this happen on specific pages (especially public pages that we can check out)?
Does this happen when you do something specific in the Inspector? For instance, selecting a specific HTML element in the HTML view (top part in your screenshot), or selecting a specific element with the “Pick an element” button.
Thanks for your answer! Sorry for the obvious info missing.
I use Firefox release, 72.0.1-1 on Arch Linux.
It only happens after some interaction / actions. It always displays the rules the first time. For now I’ve only seen it happen on the website I’m working on
Let me try to narrow this down.
EDIT: it’s not always fixed by refreshing the page. Closing the inspector fixes it.
Oh, interesting, I’ve heard of livereload-related problems in the past, on this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1014459
Sadly it was closed at the time because it didn’t seem to happen anymore.
But there seems definitely something weird going on with the Rules panel and the way livereload re-injects styles into the page.
I installed the extension and livereload and tried to reproduce. So far I couldn’t, but I could see a first problem whereby the rules panel doesn’t update to show the new style as they get reloaded. You need to select a new node and go back to the previous node to see them.
That might be a first lead to investigate.
Ideally yes, I’d split in more files, spend some time refactoring stuff, but that’s not the main focus right now.
Reality is messy!
(side note: I’m coming from 5+ years of Chrome development experience and progressively switching to FF. Chrome(ium)'s dev tools handled that website without any problem).
I have news: it definitely happens w/o Live-reload, so I think we can treat this as a general issue and not a plugin/add-on triggered issue.
How I can reproduce:
Load my page with the huge CSS file
Inspect an element, see that the rules work
Change the CSS, reload the page in FF (Ctrl+R, caching is disabled by the inspector being opened). The CSS change doesn’t need to affect the selected element.
See the the rules don’t work anymore. If it still works, the next refresh won’t, it seems (even if the change is applied visually).
If you wait a few secs, the next refresh fixes it.
I have the same problem. The mentioned solutions work sometimes, sometimes not.
When working on a site, and after each page refresh the rules are empty and you need to close the developer tools, sometimes more than once until it works, sometimes you need to restart Firefox, it is really a nightmare and extremely time consuming.
I really think of changing the browser because of this although I liked Firefox in the past.
Using Firefox Developer Edition.
TrinitySu
Same problem too. Only happens when inspecting a specific website I’m developing. Other websites works fine.
Please fix Mozilla, Firefox dev tools is so much better than Chrome!
We know where we crash, but we still don’t have consistent steps to reproduce. So in case anyone has a public website where they can reproduce the issue, consider sharing it on the bug. Thanks.
Edit: well, we just managed to reproduce and find consistent STRs! The issue seems to be triggered by editing a stylesheet which gets loaded via @import.
I’m still seeing this issue on Firefox Dev 94. I’m using Vite + Vue3/Nuxt3. I suspect something with Vite’s hot reload is breaking things. Vite works a little differently from Webpack and uses “Hot Module Replacement”. I’m seeing this error developing on localhost.
As mentioned above, it would randomly start working again after refreshing several minutes later. This bug happens pretty much constantly with the tech stack I’m using. Another thread mentioned deleting cookies helped, I don’t have any cookies on localhost, so this doesn’t fix for me. Neither does opening a private window which I also saw mentioned.
I’ve noticed it happen when I stopped “npm run dev” and restarted it immediately after, Nuxt will automatically re-attach itself; however, dev tools are now bugged out. Opening a new tab strangely does not fix the issue. Starting the dev server on a different port also does not fix the issue. However, navigating to one of the pages in my localhost site, and then navigating back to the homepage partially fixed it. I still have an element that isn’t working at all. Very strange.
I’m seeing this in the Firefox Desktop remote debugging console when I select an element in the inspector:
The fix we landed in https://bugzilla.mozilla.org/show_bug.cgi?id=1699648 resolved a cache issue for stylesheets loaded via @import. So most likely we have a similar problem for your scenario, where DevTools retrieve an outdated version of your stylesheet.
Can you share how your stylesheet is loaded here? By any chance, is your project open source, or could you extract a small test case we could use to reproduce the bug?
Thanks! (will file a bug once we get some more information)