Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ulauncher throws an error on launch #119350

Closed
critbase opened this issue Apr 13, 2021 · 8 comments · Fixed by #196410
Closed

Ulauncher throws an error on launch #119350

critbase opened this issue Apr 13, 2021 · 8 comments · Fixed by #196410
Assignees
Labels
0.kind: bug Something is broken

Comments

@critbase
Copy link
Contributor

Describe the bug
I'm unsure what the error is, but it seems to relate to ulauncher being unable to find the project path, whatever that may be.

To Reproduce
Steps to reproduce the behavior:

  1. nix-shell -p ulauncher --run "ulauncher"

Expected behavior
For Ulauncher to start normally

Additional context
This is the error message I get:

Traceback (most recent call last):
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/config.py", line 68, in get_data_path
    return paths[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/bin/..ulauncher-wrapped-wrapped", line 29, in <module>
    main()
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/main.py", line 128, in main
    window = UlauncherWindow.get_instance()
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/utils/decorator/singleton.py", line 19, in wrapper
    instance = fn(*args, **kwargs)
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 55, in get_instance
    return cls()
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 63, in __new__
    builder = Builder.new_from_file('UlauncherWindow')
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/ui/windows/Builder.py", line 47, in new_from_file
    ui_filename = get_data_file('ui', '%s.ui' % (builder_file_name,))
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/config.py", line 42, in get_data_file
    return os.path.join(get_data_path(), *path_segments)
  File "/nix/store/4dw42b5pf1ngkk9icj0xz14f1v6x8gk4-ulauncher-5.9.0/lib/python3.8/site-packages/ulauncher/config.py", line 70, in get_data_path
    raise ProjectPathNotFoundError()
ulauncher.config.ProjectPathNotFoundError

Notify maintainers

@aaronjanse @worldofpeace

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

  • system: "x86_64-linux"
  • host os: Linux 5.10.27, NixOS, 21.05.20210410.a73020b (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20210326_dd77f71
  • channels(root): "nixos-21.05pre274021.d496205cf22, nixpkgs-21.05pre273666.d1257435332"
  • channels(miyuki): "home-manager"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@critbase critbase added the 0.kind: bug Something is broken label Apr 13, 2021
@aaronjanse aaronjanse self-assigned this May 3, 2021
@aaronjanse
Copy link
Member

See the PR linked above. The issue is that the ulauncher package must be installed via nix-env, nix profile, systemPackages, or something similar. Using nix-shell does not work (for reasons explained in the patch). The PR both updates ulauncher and adds a note to explain what's going on to Nix users trying out the package.

I think it would be a good idea to create a NixOS module for Ulauncher. I might be able to do this after I finish exams in a couple weeks.

@gytis-ivaskevicius
Copy link
Contributor

Alright guys, the real solution here is to just use rofi.

With a little work you can make it look pretty good and with a little extra work one could easily make it look similar to ulauncher. Here is my config https://www.github.com/gytis-ivaskevicius/nixfiles/tree/master/overlays%2Fg-rofi

I tried to fix this issue up but it seemed to work for maintainers thus it was the end of that story

@aaronjanse
Copy link
Member

it seemed to work for maintainers thus it was the end of that story

Hello @gytis-ivaskevicius, ulauncher package maintainer here. This definitely shouldn't be the end of the story. I do want to get these issues fixed.

The problem is that ulauncher wants to store paths to its assets in a config file within $HOME. Typically we'd just let it use /nix/store paths for everything, but that would cause ulauncher to break if we update the derivation then garbage-collect the old paths in /nix/store.


I also use Rofi right now, and it works. But I really want the plugin ecosystem of Ulauncher, so I'm motivated to fix this situation.

Perhaps we could modify the current package to allow decoratively specifying the settings.json file contents (like vscode-with-extensions), which would allow the package to be used without messing with system state?

Maybe we could even create something like ulauncherPackages and a NixOS module?

@critbase
Copy link
Contributor Author

Perhaps this is a good fit for a home-manager module?
In any case, this issue can probably be closed once #121557 is merged. Maybe a new issue should be opened to track the addition of an unlauncher module?

@stale
Copy link

stale bot commented Nov 9, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 9, 2021
@PAI5REECHO
Copy link

bad bot

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 28, 2022
@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 1, 2022
@tmarkov
Copy link
Contributor

tmarkov commented Oct 14, 2022

I installed ulauncher (rev 3a1054b) through configuration.nix. Unfortunately, I get this error message on launch anyway.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 14, 2022
@B4rc1
Copy link
Contributor

B4rc1 commented Oct 17, 2022

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants