Firefox Snap update breaks dark themes

Bug #2033988 reported by Little Girl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
New
Undecided
Unassigned

Bug Description

* Operating System: Kubuntu 22.04
* KDE Plasma Version: 5.24.7
* KDE Frameworks Version: 5.92.0
* Qt Version: 5.15.3

I would expect to be able to have full access to my bookmarks and the contents of the application menu regardless of the theme I am using.

That was the case until I allowed the Firefox Snap to update. I closed Firefox to allow it to update itself when I got the Snap notification in the bottom right corner. I then ended up with this version:

Firefox 117.0 (64-bit)
Mozilla Firefox Snap for Ubuntu
canonical-002 - 1.0

The current version breaks my dark theme so that I cannot see my bookmarks or settings. The bookmark icons are visible, but the text is invisible on the dark background. Hovering over the bookmarks displays their tooltips and the bookmarks can be successfully clicked to open their pages. The application menu (that you get to by clicking the hamburger icon in the top right corner of Firefox) has no tooltips. You can still click on its entries, but you'd have to know which one you're clicking somehow or you're taking your chances.

This appears to be a theme issue. I was using a dark (magenta) theme when the update occurred. When I switch to a light (pastel) theme, the entries in the application menu are visible and the text inside of toolbar bookmark folders is visible. However, text is still *not* visible in the bookmark manager. Interestingly, the bookmark manager is not honoring my current light (pastel) theme even after a restart of Firefox. Instead, the bookmark manager is still displaying with my dark (magenta) theme. This means that thorough searches of the bookmarks and manipulation of the bookmark contents is not currently possible.

Some additional notes:

* I tried replicating the issue in a virtual machine and wasn't able to, so I suspect something went wrong with the update on this machine.

* I tried several dark and light themes and all of them exhibited the behavior described above.

* Closing Firefox, deleting everything in the ~/snap/firefox/common/.cache/ directory, and reopening Firefox has no effect on the issue.

* Revision 3068 is the currently-broken revision I'm using and revision 3026 was my last-known-good revision, so something broke in or during the update to revision 3026.

* Reverting to the previous revision with the sudo snap revert --revision=3026 firefox command does not affect the issue.

* The issue does not exist If I log in to Kubuntu as a different user, even when switching between light and dark Firefox themes.

I've attached the output of the snap list --all command and also these five screenshots to show that toolbar bookmark text is only visible when using a light theme, that bookmark manager text is never visible, that the current theme is not honored in the bookmark manager, and that the application menu text is only visible when using a light theme.

Revision history for this message
Little Girl (littlergirl) wrote :
Revision history for this message
Little Girl (littlergirl) wrote (last edit ):
Revision history for this message
Little Girl (littlergirl) wrote :
Revision history for this message
Little Girl (littlergirl) wrote :
Revision history for this message
Little Girl (littlergirl) wrote :
Revision history for this message
Little Girl (littlergirl) wrote :
summary: - Firefox Snap update breaks dark theme
+ Firefox Snap update breaks dark themes
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Little Girl (littlergirl) wrote :

TEMPORARY WORK-AROUND:

It was suggested to me that perhaps creating a new Firefox profile would solve the issue. I tried that and it didn't, so this isn't a profile issue.

Although the issue disappears when I create a new *Kubuntu* user, that's not a solution, since creating new users when something goes wrong would cause a lot of work in copying everything over and getting everything set up and customized for that new user just the way you like it each time. I can't imagine possibly needing to do that any time there's a Firefox Snap update. Besides, nothing changed in my Kubuntu configuration to suddenly cause this issue. What happened to cause the issue was me choosing to allow the Firefox Snap to update, which changed something that causes Firefox to misbehave.

For the time being, I have a clumsy two-part work-around that at least gives me access to all the features in Firefox:

1. I *must* use a light Firefox theme so that I can see the contents of the application menu and the contents of the toolbar folders.

2. That doesn't, however, make it so that I can see the contents of the bookmark manager. To do that, I must *also* edit the ~/.config/gtk-3.0/gtk.css file and set the *window* identifier's *background-color* property value to *inherit*.

The *window* identifier's *background-color* property value cannot, however, be left that way on my machine because the Claws Mail and Geany and Zim programs have some errors in their code that cause Claws Mail and Geany to have some black artifacting and Zim to have transparent artifacting that shows what's behind the window through the program.

As a result, that property cannot remain that way when I'm not actively managing my Firefox bookmarks. It can't just be disabled either, though, because that causes the Firefox Snap's tooltips to be black text on a black background, making them impossible to read, so, for instance, you can't hover over a link and see where it will take you. Instead, its value must be changed to a color lighter than black.

It's not a solution, but at least it's a work-around. The way my Firefox currently runs, I'm forced to always use a light theme (see above) despite my preference for a dark theme, and I must edit the gtk.css file every time before and after managing my bookmarks (see above). This is far from ideal and wasn't necessary before updating to Firefox 117.0 and is still necessary in Firefox 117.0.1. I'm providing this information, though, in case anyone else runs into this issue and wants to be able to see the contents of their menu folders and to manage their bookmarks.

Revision history for this message
Little Girl (littlergirl) wrote (last edit ):

EVEN BETTER WORK-AROUND:
It seems that the Firefox Snap team made a change to the shortcut that Firefox uses and it's the environment they've chosen that's causing the issue. They seem to be assuming that everyone is using Unity. Since this is a KDE machine, that environment doesn't work.

This is the default command inside the Firefox shortcut:
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u

If I replace that command with this, the issue mostly goes away:
env GTK_THEME=Breeze /snap/bin/firefox %u

That only works if you use the shortcut that contains that command to launch Firefox. If you launch Firefox by clicking a link in email or anywhere else, for example, the original issue is back. Also, although this mostly works, something causes it to occasionally happen while Firefox is open. When that happens, closing and restarting Firefox "fixes" it again.

This is not a perfect work-around, but it's better than the one above and at least works most of the time.

Note: If you use a desktop theme other than Breeze, you would replace Breeze in that last line with your theme's name.

Revision history for this message
Little Girl (littlergirl) wrote :

The issue persists in Firefox 118.0.2 (64-bit).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.