Skip to content

firefox: UI renders no text #546204

Closed
Closed

Description

@drzero42

Nixpkgs version

  • Stable (26.05)

Describe the bug

After a routine nixos-26.05 update, Firefox renders no text in its chrome UI —
tab titles, toolbar, and menus are blank — while web page content renders
text normally. Thunderbird (which seems to share the Firefox wrapper) is affected the
same way: menus, folder pane, and dialog text are blank.

I'm on KDE Plasma 6 (Wayland).

Steps to reproduce

  1. On KDE Plasma (Wayland), nixos-26.05, update nixpkgs to a revision that
    includes the recent firefox/wrapper changes.
  2. Launch Firefox (or Thunderbird).
  3. Observe: chrome/UI text is blank; web page content still shows text.

Expected behaviour

Firefox and Thunderbird should render text correctly without having to setup environment variables.

Screenshots

No response

Relevant log output

Additional context

What I found

  • firefox-unwrapped is byte-identical across the working and broken revisions;
    only the wrapper differs.
  • In the working build, the Firefox wrapper adds gsettings-desktop-schemas
    and gtk3 gsettings-schemas to XDG_DATA_DIRS. In the broken build, those
    entries are gone from the wrapper.
  • My Plasma session does not provide those schemas on XDG_DATA_DIRS otherwise,
    so on this setup they only ever reached the app via the wrapper.
  • Manually adding those two schema directories back to XDG_DATA_DIRS when
    launching the broken build makes the UI text render correctly again (tested
    for both Firefox and Thunderbird).

I noticed the commit firefox/wrapper: enable strictDeps
(#540042, backported in #545437) landed in the update window that introduced
this for me. I'm not certain it's the cause, but it seemed possibly related
since it changes how the wrapper's dependencies are handled.

Workaround

Providing the schemas at the session level restores the text. On NixOS:

environment.sessionVariables.XDG_DATA_DIRS = [
  "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
  "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
];

AI disclosure

AI help was used in troubleshooting and creating a workaround, but a real human (me) is filing this issue.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.18.40, NixOS, 26.05 (Yarara), 26.05.20260725.f7a2e42
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.8
  • nixpkgs: /nix/store/xsgr0jkfd5115cvzvh5lqzjnv0bjvwwq-source

Notify maintainers

@booxter @mweinelt


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    on Jul 27, 2026
  2. DocBrown101 commented on Jul 27, 2026

    @DocBrown101
    Contributor

    I can confirm that!

    KDE Plasma 6 (Wayland)

  3. udaykurien commented on Jul 27, 2026

    @udaykurien

    I confirm this. I've observed this after the latest update (26.05.20260724.597283a → 26.05.20260725.f7a2e42).

    • On Hyprland, Firefox and Librewolf (run in normal mode) are missing text in the address bar. Firefox's hamburger menu doesn't show anything when clicked.
    • Firefox run is safe mode is fine.
    • Firefox's own refresh (removes add-ons etc) doesn't help.
    • Firefox works without noticeable issues on the same system with XFCE.
  4. jdannenberg commented on Jul 27, 2026

    @jdannenberg
    Contributor

    I can confirm the issue.

    Firefox run is safe mode is fine.

    I can't confirm that. safe mode does not work for me.

    I can confirm that the commit before #545437 (I'm also on nixos-26.05) works, so adding an overlay for firefox and firefox-unwrapped to a3b975b22c917516129ccdae0d50336ba6cfbf41 works.

    nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/a3b975b22c917516129ccdae0d50336ba6cfbf41.tar.gz -p firefox
    works not (edit) for me. EDIT: This only works if overlay is in place, being on nixos-26.05 and trying this also has text missing.

    Thank you for noticing @drzero42 ; initially I downgraded to 152.0.6 which also worked.

    What also works is MOZ_ENABLE_WAYLAND=0 firefox if that helps.

  5. ryand56 commented on Jul 27, 2026

    @ryand56
    Member

    I can replicate this using Thunderbird on Niri.

  6. jasigal commented on Jul 27, 2026

    @jasigal

    @drzero42 thanks for the quick report, the snippet you provided as a workaround worked for me!

    There seems to be a formatting issue after the snippet, I don't think the @'s to the maintainers worked as they're in a markdown block.

  7. drzero42 commented on Jul 27, 2026

    @drzero42
    Author

    @drzero42 thanks for the quick report, the snippet you provided as a workaround worked for me!

    There seems to be a formatting issue after the snipped, I don't think the @'s to the maintainers worked as they're in a markdown block.

    Yeah, I missing ending the code block. Fixed it now :)

  8. nixos-discourse commented on Jul 27, 2026

    @nixos-discourse
  9. booxter commented on Jul 27, 2026

    @booxter
    Contributor
  10. added a commit that references this issue on Jul 27, 2026
    bffe6b0
  11. emptyynes commented on Jul 27, 2026

    @emptyynes

    Having the same issue on KDE, safe mode not fixing, but running MOZ_ENABLE_WAYLAND=0 firefox makes it work fine

  12. self-assigned this
    on Jul 27, 2026
  13. ARitz-Cracker commented on Jul 27, 2026

    @ARitz-Cracker

    can confirm this workaround works

    	environment.sessionVariables.XDG_DATA_DIRS = [
    		"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
    		"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
    	];
    
  14. sakuumomo commented on Jul 28, 2026

    @sakuumomo

    Confirmed on my machine.

  15. ncaq commented on Jul 28, 2026

    @ncaq
    Contributor

    My workaround.

    { pkgs, ... }:
    {
      xdg.portal = {
        enable = true;
        extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
        config.common.default = [ "gtk" ];
      };
    }
  16. 1 remaining item

  17. AchmadFathoni commented on Jul 28, 2026

    @AchmadFathoni
    Contributor

    Just curious, can a test catch this kind of regression?

  18. booxter commented on Jul 28, 2026

    @booxter
    Contributor

    @AchmadFathoni Good question. In theory yes.

    We have some NixOS tests for Firefox that OCR the screen - those would probably fail in this scenario because OCR check would expect particular text on the screen - which, as I understood, was not shown at all. The problem is, those tests are all X11 based - which was not affected here. We could probably expand the test suite to cover both Wayland and X11. Someone gotta do the work.

  19. added a commit that references this issue on Jul 29, 2026
    0531496
  20. isti115 commented on Jul 30, 2026

    @isti115
    Contributor

    @ARitz-Cracker Please forgive my limited / surface level understanding of this, but shouldn't something like the following work as well in a shell.nix file?

    { pkgs ? import <nixpkgs> {} }:
    pkgs.mkShell {
      nativeBuildInputs = [ pkgs.firefox ];
      XDG_DATA_DIRS = pkgs.lib.makeSearchPath "share" [ pkgs.gsettings-desktop-schemas pkgs.gtk3 ];
    }

    Interestingly enough the environmental variable doesn't seem to change at all using the above, which I can work around by setting it in a shellHook instead, but that doesn't solve the original issue of the missing text for me either.

    { pkgs ? import <nixpkgs> {} }:
    pkgs.mkShell {
      nativeBuildInputs = [ pkgs.firefox ];
      shellHook = ''
        export XDG_DATA_DIRS="\
        ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:\
        ${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:\
        $XDG_DATA_DIRS"
      '';
    }
  21. vacy commented on Jul 30, 2026

    @vacy
    Contributor

    Two venues to fix this:

    * [firefox/wrapper: inject gsettings schema paths into XDG_DATA_DIRS #546288](https://github.com/NixOS/nixpkgs/pull/546288) (release-26.05, more targeted, not a backport)
    
    * [[Backport staging-26.05] wrapGAppsHook: prepare for structuredAttrs #546281](https://github.com/NixOS/nixpkgs/pull/546281) (staging, backport)
    

    #546288 just arrived on my system and its resolved.

  22. booxter commented on Jul 30, 2026

    @booxter
    Contributor

    @vacy Thanks for confirming it resolved the issue! I will close it now. If there are still some issues with the latest version, consider creating a new bug report.

  23. obadz commented on Jul 30, 2026

    @obadz
    Contributor

    Just to flag that I experienced Firefox crashes on Xorg/i3 (not the UI defects mentioned by others) with this bug. Many "file upload" web features triggered an irrecoverable crash, for instance right click->File Upload on Google Drive triggered the below window.

    Image

    I have confirmed this was fixed by bffe6b0

  24. ARitz-Cracker commented on Jul 30, 2026

    @ARitz-Cracker

    @isti115

    @ARitz-Cracker Please forgive my limited / surface level understanding of this, but shouldn't something like the following work as well in a shell.nix file?
    [...]

    Looking at the function docs and its source, seems like all the makeSearchPath function does is

    1. remove any null entries in the array
    2. append /, plus the first arg (in your case "share") with everything in the second arg
      • This transforms [ pkgs.gsettings-desktop-schemas pkgs.gtk3 ] to [ "${pkgs.gsettings-desktop-schemas}/share" "${pkgs.gtk3}/share" ]
    3. join everything in the array with ":"
      • Resulting in "${pkgs.gsettings-desktop-schemas}/share:${pkgs.gtk3}/share"

    So your first example, you're effectively doing XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share:${pkgs.gtk3}/share" which clearly isn't the same thing.

  25. n0099 commented on Jul 30, 2026

    @n0099
    Contributor

    https://noogle.dev/f/lib/makeSearchPath/

    nixpkgs/lib/strings.nix

    Lines 534 to 569 in 6e90d09

    /**
    Construct a Unix-style, colon-separated search path consisting of
    the given `subDir` appended to each of the given paths.
    # Inputs
    `subDir`
    : Directory name to append
    `paths`
    : List of base paths
    # Type
    ```
    makeSearchPath :: String -> [String] -> String
    ```
    # Examples
    :::{.example}
    ## `lib.strings.makeSearchPath` usage example
    ```nix
    makeSearchPath "bin" ["/root" "/usr" "/usr/local"]
    => "/root/bin:/usr/bin:/usr/local/bin"
    makeSearchPath "bin" [""]
    => "/bin"
    ```
    :::
    */
    makeSearchPath =
    subDir: paths:
    concatStringsSep ":" (
    concatMap (path: if path != null then [ (path + "/" + subDir) ] else [ ]) paths
    );

  26. isti115 commented on Jul 30, 2026

    @isti115
    Contributor

    @ARitz-Cracker @n0099 Thank you very much for the responses! Yes, I get that, but with the first example the content of the paths wasn't the issue, as I didn't even get as far as modifying the environmental variable. If I renamed it to something else (e.g. XDG_DAATAA_DIRS), it was visible in the created shell, but with the original name the override had no effect, seemingly as if it was overridden by an even higher level override. In my second example above with the shellHook I have used the correct paths and they appeared in env, but when I launched Firefox, the text from the browser's UI elements was still missing.

    PS. Is it fine if I ask such follow-up questions in the thread of this closed issue, or should we move this into a discussion / onto the discourse forum?

  27. booxter commented on Jul 30, 2026

    @booxter
    Contributor

    Please move this discussion somewhere else, a lot of people are subscribed and don't need to see these notifications.

  28. locked and limited conversation to collaborators on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

0.kind: bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions