Ulauncher and the debugging journey

Hi everyone :slight_smile:

I’m not the most present on the NixOS discourse, but I’m trully in love with NixOS. I also really like Gnome and Ulauncher. I’m also a big fan of setting everything up with a tidy configuration.

Everything fine, isn’t it?.. Well, Ulauncher gives me some frustration. I can’t start it when Gnome launches. I tried adding the Ulauncher shortcut to the starting application: nothing. I tried to add ulauncher as a user systemd service that starts after Gnome: it fails. I tried to cry: it didn’t even react.

I think the best track here is a systemd service thing, but I get an error regarding the reading of an SVG file with gdk-pixbuf. I don’t know of to debug it, since I’m not familiar with GTK.

Do you have any tips for an efficient debugging and/or some places to accompagny a newbie like me?

About the error itself, I’m pretty sure it is an issue with a dependency. I can start Ulauncher from my Gnome with no issue whatsoever, but when I start it from a Service (or in Sway if that matters), it fails and gives back the following lines.

mai 18 08:54:00 NoverDesktop systemd[9181]: ulauncher.service: Failed with result 'exit-code'.
mai 18 08:54:00 NoverDesktop systemd[9181]: ulauncher.service: Main process exited, code=exited, status=1/FAILURE
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]: TypeError: Argument 0 does not allow None as a value
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     surface = Gdk.cairo_surface_create_from_pixbuf(prefs_pixbuf, scale_factor, self.get_window())
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 363, in _render_prefs_icon
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     self._render_prefs_icon()
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 226, in init_theme
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     self.init_theme()
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 98, in finish_initializing
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     new_object.finish_initializing(builder)
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 65, in __new__
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     return cls()
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 55, in get_instance
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     instance = fn(*args, **kwargs)
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/utils/decorator/singleton.py", line 19, in wrapper
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     window = UlauncherWindow.get_instance()
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/lib/python3.8/site-packages/ulauncher/main.py", line 128, in main
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:     main()
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]:   File "/nix/store/n63w5wsna3hmylzdrmi8h06y1c9052ly-ulauncher-5.8.0/bin/..ulauncher-wrapped-wrapped", line 29, in <module>
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]: Traceback (most recent call last):
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]: 2021-05-18 08:54:00,205 | ERROR | ulauncher: except_hook() | Uncaught exception
mai 18 08:54:00 NoverDesktop ulauncher-start[6732]: 2021-05-18 08:54:00,205 | WARNING | ulauncher.utils.image_loader: load_image() | Could not load image /run/current-system/sw/share/ulauncher/media/gear.svg. E: gdk-pixbuf-error-quark: Couldn’t recognize the image file format for file “/run/current-system/sw/share/ulauncher/media/gear.svg” (3)
mai 18 08:53:59 NoverDesktop systemd[9181]: Started Start Ulauncher.

Cheers guys, and thanks for the help! :slight_smile:

Did you find a solution? I have the same problem under gnome.

Nop sorry, still no progress at all. I did not retry to fix it :confused: