[GH-ISSUE #1038] menu always empty #3137

Closed
opened 2026-05-22 23:54:13 +01:00 by JakeStanger · 11 comments
Owner

Originally created by @postsolar on GitHub (Jun 8, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1038

Describe the bug

Newly-added menu module pop-up is totally empty.

To reproduce
Steps to reproduce the behavior:

  1. config.json that is just { "start": [ { "type": "menu" } ] }
  2. IRONBAR_LOG=info,ironbar::desktop_file=trace IRONBAR_CONFIG=/tmp/ironbar/config.json ironbar
  3. Click popup
  4. Observe menu is empty

Expected behavior

Menu non-empty

System information:

  • Distro: NixOS
  • Compositor: Hyprland
  • Ironbar version: 199c86d

Configuration

Config
{
  "start": [
    {
      "type": "menu"
    }
  ]
}
Styles

Additional context

Log
2025-06-08T11:22:52.662993Z DEBUG ironbar::desktop_file: 176: resolved 58 files
2025-06-08T11:22:52.663033Z  INFO ironbar: 147: Ironbar version 0.16.1
2025-06-08T11:22:52.663052Z  INFO ironbar: 148: Starting application
2025-06-08T11:22:52.735990Z  WARN GTK: 116: [Gtk] Theme parsing error: gtk.css:59:17: 'hsl' is not a valid color name
2025-06-08T11:22:52.736071Z  WARN GTK: 116: [Gtk] Theme parsing error: gtk.css:59:17: Junk at end of value for background
2025-06-08T11:22:52.745063Z  INFO ironbar::ipc::server: 39: Starting IPC on /run/user/1000/ironbar-ipc.sock
2025-06-08T11:22:52.748019Z  INFO ironbar::bar: 117: Initializing bar 'bar-7' on 'DP-1'
2025-06-08T11:22:58.103698Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/chrome-kajebgjangihfbkjfejcanhanjmmbcfd-Default.desktop
2025-06-08T11:22:58.104188Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.github.hluk.copyq.desktop
2025-06-08T11:22:58.104452Z DEBUG ironbar::desktop_file: 37: loading applications file: /run/current-system/sw/share/applications/blueman-adapters.desktop
2025-06-08T11:22:58.104647Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kitty-open.desktop
2025-06-08T11:22:58.104919Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.fcitx5-config-qt.desktop
2025-06-08T11:22:58.105109Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.github.johnfactotum.Foliate.desktop
2025-06-08T11:22:58.105296Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/nemo-autostart.desktop
2025-06-08T11:22:58.105459Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/firefox.desktop
2025-06-08T11:22:58.105672Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/libinput-gestures.desktop
2025-06-08T11:22:58.105839Z DEBUG ironbar::desktop_file: 37: loading applications file: /nix/store/0yhi7wga9wv378hhdlmvyl07vkab4haj-network-manager-applet-1.36.0/share/applications/nm-applet.desktop
2025-06-08T11:22:58.106037Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.freedesktop.Xwayland.desktop
2025-06-08T11:22:58.106663Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/arch.desktop
2025-06-08T11:22:58.106847Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.Fcitx5.desktop
2025-06-08T11:22:58.107025Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/yazi.desktop
2025-06-08T11:22:58.107161Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/wl-kbptr.desktop
2025-06-08T11:22:58.107280Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/xdg-desktop-portal-gtk.desktop
2025-06-08T11:22:58.107402Z DEBUG ironbar::desktop_file: 37: loading applications file: /run/current-system/sw/share/applications/nixos-manual.desktop
2025-06-08T11:22:58.107529Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kitty.desktop
2025-06-08T11:22:58.107670Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.brave.Browser.desktop
2025-06-08T11:22:58.107900Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/chrome-eikjhbkpemdappjfcmdeeeamdpkgabmk-Default.desktop
2025-06-08T11:22:58.108016Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/lf.desktop
2025-06-08T11:22:58.108134Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.fcitx5-migrator.desktop
2025-06-08T11:22:58.108260Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kcm_fcitx5.desktop

I also tried running the config examples/menu/default.json, same result

Screenshots

This is all I'm seeing when opening menu pop up
Image

Originally created by @postsolar on GitHub (Jun 8, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1038 **Describe the bug** <!-- A clear and concise description of what the bug is. --> Newly-added menu module pop-up is totally empty. **To reproduce** Steps to reproduce the behavior: 1. `config.json` that is just `{ "start": [ { "type": "menu" } ] }` 2. `IRONBAR_LOG=info,ironbar::desktop_file=trace IRONBAR_CONFIG=/tmp/ironbar/config.json ironbar` 3. Click popup 4. Observe menu is empty **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Menu non-empty **System information:** - Distro: NixOS - Compositor: Hyprland - Ironbar version: [199c86d](https://github.com/JakeStanger/ironbar/commit/199c86d9453208b5d5333fb9afb79dde45087114) **Configuration** <!-- Share your bar configuration and stylesheet as applicable: --> <details><summary>Config</summary> ``` { "start": [ { "type": "menu" } ] } ``` </details> <details><summary>Styles</summary> ```css ``` </details> **Additional context** <!-- Add any other context about the problem here. --> <details><summary>Log</summary> ``` 2025-06-08T11:22:52.662993Z DEBUG ironbar::desktop_file: 176: resolved 58 files 2025-06-08T11:22:52.663033Z INFO ironbar: 147: Ironbar version 0.16.1 2025-06-08T11:22:52.663052Z INFO ironbar: 148: Starting application 2025-06-08T11:22:52.735990Z WARN GTK: 116: [Gtk] Theme parsing error: gtk.css:59:17: 'hsl' is not a valid color name 2025-06-08T11:22:52.736071Z WARN GTK: 116: [Gtk] Theme parsing error: gtk.css:59:17: Junk at end of value for background 2025-06-08T11:22:52.745063Z INFO ironbar::ipc::server: 39: Starting IPC on /run/user/1000/ironbar-ipc.sock 2025-06-08T11:22:52.748019Z INFO ironbar::bar: 117: Initializing bar 'bar-7' on 'DP-1' 2025-06-08T11:22:58.103698Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/chrome-kajebgjangihfbkjfejcanhanjmmbcfd-Default.desktop 2025-06-08T11:22:58.104188Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.github.hluk.copyq.desktop 2025-06-08T11:22:58.104452Z DEBUG ironbar::desktop_file: 37: loading applications file: /run/current-system/sw/share/applications/blueman-adapters.desktop 2025-06-08T11:22:58.104647Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kitty-open.desktop 2025-06-08T11:22:58.104919Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.fcitx5-config-qt.desktop 2025-06-08T11:22:58.105109Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.github.johnfactotum.Foliate.desktop 2025-06-08T11:22:58.105296Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/nemo-autostart.desktop 2025-06-08T11:22:58.105459Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/firefox.desktop 2025-06-08T11:22:58.105672Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/libinput-gestures.desktop 2025-06-08T11:22:58.105839Z DEBUG ironbar::desktop_file: 37: loading applications file: /nix/store/0yhi7wga9wv378hhdlmvyl07vkab4haj-network-manager-applet-1.36.0/share/applications/nm-applet.desktop 2025-06-08T11:22:58.106037Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.freedesktop.Xwayland.desktop 2025-06-08T11:22:58.106663Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/arch.desktop 2025-06-08T11:22:58.106847Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.Fcitx5.desktop 2025-06-08T11:22:58.107025Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/yazi.desktop 2025-06-08T11:22:58.107161Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/wl-kbptr.desktop 2025-06-08T11:22:58.107280Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/xdg-desktop-portal-gtk.desktop 2025-06-08T11:22:58.107402Z DEBUG ironbar::desktop_file: 37: loading applications file: /run/current-system/sw/share/applications/nixos-manual.desktop 2025-06-08T11:22:58.107529Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kitty.desktop 2025-06-08T11:22:58.107670Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/com.brave.Browser.desktop 2025-06-08T11:22:58.107900Z DEBUG ironbar::desktop_file: 37: loading applications file: /home/alice/.local/share/applications/chrome-eikjhbkpemdappjfcmdeeeamdpkgabmk-Default.desktop 2025-06-08T11:22:58.108016Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/lf.desktop 2025-06-08T11:22:58.108134Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/org.fcitx.fcitx5-migrator.desktop 2025-06-08T11:22:58.108260Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kcm_fcitx5.desktop ``` </details> I also tried running the config [examples/menu/default.json](https://github.com/JakeStanger/ironbar/blob/199c86d9453208b5d5333fb9afb79dde45087114/examples/menu/default.json), same result **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> This is all I'm seeing when opening menu pop up ![Image](https://github.com/user-attachments/assets/4288eaf0-a5e3-4ae9-a494-99996ddb6b91)
JakeStanger 2026-05-22 23:54:13 +01:00
Author
Owner

@JakeStanger commented on GitHub (Jun 11, 2025):

I'm assuming this has gotta be some weird race condition. If you run ironbar reload it should keep the menu client alive and send another init event so that might kick it into life. Does that work?

The log also suggests this is a single bar on a single monitor - is that right?

<!-- gh-comment-id:2963354428 --> @JakeStanger commented on GitHub (Jun 11, 2025): I'm assuming this has gotta be some weird race condition. If you run `ironbar reload` it should keep the menu client alive and send another init event so that might kick it into life. Does that work? The log also suggests this is a single bar on a single monitor - is that right?
Author
Owner

@postsolar commented on GitHub (Jun 11, 2025):

If you run ironbar reload it should keep the menu client alive and send another init event so that might kick it into life. Does that work?

Nope.

The log also suggests this is a single bar on a single monitor - is that right?

Yes. By the way, was the environment variable which I used for logging (IRONBAR_LOG=info,ironbar::desktop_file=trace) right? I don't recall seeing any debug macros in menu's own modules so I only used desktop_file here.

<!-- gh-comment-id:2963403407 --> @postsolar commented on GitHub (Jun 11, 2025): > If you run ironbar reload it should keep the menu client alive and send another init event so that might kick it into life. Does that work? Nope. > The log also suggests this is a single bar on a single monitor - is that right? Yes. By the way, was the environment variable which I used for logging (`IRONBAR_LOG=info,ironbar::desktop_file=trace`) right? I don't recall seeing any debug macros in `menu`'s own modules so I only used `desktop_file` here.
Author
Owner

@postsolar commented on GitHub (Jun 11, 2025):

Anyways, here's a full log

ironbar_trace.log

<!-- gh-comment-id:2963414296 --> @postsolar commented on GitHub (Jun 11, 2025): Anyways, here's a full log [ironbar_trace.log](https://github.com/user-attachments/files/20694334/ironbar_trace.log)
Author
Owner

@JakeStanger commented on GitHub (Jun 12, 2025):

Cheers. I think the menu module is indeed lacking decent logging at the moment, so yeah that's right for now. I'll see what I can do given the current log, but I may need to go back and add more and get you to try again if I can't get anywhere.

<!-- gh-comment-id:2967422898 --> @JakeStanger commented on GitHub (Jun 12, 2025): Cheers. I think the `menu` module is indeed lacking decent logging at the moment, so yeah that's right for now. I'll see what I can do given the current log, but I may need to go back and add more and get you to try again if I can't get anywhere.
Author
Owner

@JakeStanger commented on GitHub (Jun 12, 2025):

Do you open the menu popup in that full log? It only initialises on first click.

I'm also wondering if NixOS is somehow to blame, having things in weird places. Yet to explore that possibility though.

<!-- gh-comment-id:2967443974 --> @JakeStanger commented on GitHub (Jun 12, 2025): Do you open the menu popup in that full log? It only initialises on first click. I'm also wondering if NixOS is somehow to blame, having things in weird places. Yet to explore that possibility though.
Author
Owner

@postsolar commented on GitHub (Jun 13, 2025):

I'm pretty sure the exact steps were:

  1. Open menu
  2. Close menu
  3. ironbar reload
  4. Open menu
  5. Close menu

Just to be sure here's another log where I do exactly this.

ironbar_trace.log

I'm also wondering if NixOS is somehow to blame

But it looks like desktop_file does find everything it needs, doesn't it?

<!-- gh-comment-id:2969628537 --> @postsolar commented on GitHub (Jun 13, 2025): I'm pretty sure the exact steps were: 1. Open menu 2. Close menu 3. `ironbar reload` 4. Open menu 5. Close menu Just to be sure here's another log where I do exactly this. [ironbar_trace.log](https://github.com/user-attachments/files/20723230/ironbar_trace.log) > I'm also wondering if NixOS is somehow to blame But it looks like `desktop_file` does find everything it needs, doesn't it?
Author
Owner

@postsolar commented on GitHub (Jun 13, 2025):

Though running the same Ironbar binary within an Arch distrobox container I do get it to work.

<!-- gh-comment-id:2969642226 --> @postsolar commented on GitHub (Jun 13, 2025): Though running the same Ironbar binary within an Arch distrobox container I do get it to work.
Author
Owner

@JakeStanger commented on GitHub (Jun 13, 2025):

Hmmm strange. I'm certainly suspicious of Nix but there's no clear reason yet.

What's weird is your first log did show all the files being located at least. The previous two logs have only shown a couple of entries and nothing else:

2025-06-13T08:55:43.754228Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/xdg-desktop-portal-gnome.desktop
2025-06-13T08:55:43.754546Z TRACE ironbar::popup: 156: Resized:  32x32
2025-06-13T08:55:43.755046Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kcm_fcitx5.desktop

It leads me to assume there's an issue with differences in the Nix filesystem structure and files not being in the expected paths that isn't being picked up here for some reason. I'm not sure what would have differed between runs unless you launched it from a different program or had different environment variables or something at the time.

But it looks like desktop_file does find everything it needs, doesn't it?

In the first instance, it finds the files. What isn't clear is whether it correctly parses them - if something's iffy with the parser, it could just throw out the file and ignore it.

<!-- gh-comment-id:2969714150 --> @JakeStanger commented on GitHub (Jun 13, 2025): Hmmm strange. I'm certainly suspicious of Nix but there's no clear reason yet. What's weird is your first log did show all the files being located at least. The previous two logs have only shown a couple of entries and nothing else: ``` 2025-06-13T08:55:43.754228Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/xdg-desktop-portal-gnome.desktop 2025-06-13T08:55:43.754546Z TRACE ironbar::popup: 156: Resized: 32x32 2025-06-13T08:55:43.755046Z DEBUG ironbar::desktop_file: 37: loading applications file: /etc/profiles/per-user/alice/share/applications/kcm_fcitx5.desktop ``` It leads me to assume there's an issue with differences in the Nix filesystem structure and files not being in the expected paths that isn't being picked up here for some reason. I'm not sure what would have differed between runs unless you launched it from a different program or had different environment variables or *something* at the time. > But it looks like desktop_file does find everything it needs, doesn't it? In the first instance, it finds the files. What isn't clear is whether it correctly parses them - if something's iffy with the parser, it could just throw out the file and ignore it.
Author
Owner

@Brisingr05 commented on GitHub (Jun 13, 2025):

Using the same config and command, I can kinda reproduce this. The menu module doesn't show anything when clicking on it once or twice, but does work from the third time. See the recording below (IDK what's up with the fonts):

https://github.com/user-attachments/assets/8be500b3-a9b0-4bf0-8712-768932a648cd

Here's the log: ironbar.log

This is in niri, but I can reproduce this on Hyprland as well. Ironbar version is github.com/JakeStanger/ironbar@4fad5a4d18. I'm also on NixOS.

<!-- gh-comment-id:2970163629 --> @Brisingr05 commented on GitHub (Jun 13, 2025): Using the same config and command, I can kinda reproduce this. The menu module doesn't show anything when clicking on it once or twice, but does work from the third time. See the recording below (IDK what's up with the fonts): https://github.com/user-attachments/assets/8be500b3-a9b0-4bf0-8712-768932a648cd Here's the log: [ironbar.log](https://github.com/user-attachments/files/20726028/ironbar.log) This is in niri, but I can reproduce this on Hyprland as well. Ironbar version is https://github.com/JakeStanger/ironbar/commit/4fad5a4d185d6d5c3d450cc385e854dfc59fc545. I'm also on NixOS.
Author
Owner

@postsolar commented on GitHub (Jun 13, 2025):

I'm not sure what would have differed between runs unless you launched it from a different program or had different environment variables or something at the time.

Nothing that I'd be aware of.

What isn't clear is whether it correctly parses them - if something's iffy with the parser, it could just throw out the file and ignore it.

In most files, Exec= line doesn't have an absolute path (i.e. it's firefox and not /nix/store/<...>firefox/bin/firefox). So these would be the same as on other distros.

The menu module doesn't show anything when clicking on it once or twice, but does work from the third time.

Just to be clear, this is quite different from what I have. In my case, the pop up itself always shows up on the first click, it's just it has no contents (also confirmed this with GTK inspector, no child widgets present).

<!-- gh-comment-id:2970327008 --> @postsolar commented on GitHub (Jun 13, 2025): > I'm not sure what would have differed between runs unless you launched it from a different program or had different environment variables or something at the time. Nothing that I'd be aware of. > What isn't clear is whether it correctly parses them - if something's iffy with the parser, it could just throw out the file and ignore it. In most files, `Exec=` line doesn't have an absolute path (i.e. it's `firefox` and not `/nix/store/<...>firefox/bin/firefox`). So these would be the same as on other distros. > The menu module doesn't show anything when clicking on it once or twice, but does work from the third time. Just to be clear, this is quite different from what I have. In my case, the pop up itself always shows up on the first click, it's just it has no contents (also confirmed this with GTK inspector, no child widgets present).
Author
Owner

@postsolar commented on GitHub (Nov 21, 2025):

✔️ doesn't happen anymore

<!-- gh-comment-id:3564758515 --> @postsolar commented on GitHub (Nov 21, 2025): ✔️ doesn't happen anymore
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#3137
No description provided.