inercia / k3x

A UI for local Kubernetes clusters created with k3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traceback when running k3x from flatpak

danielmellado opened this issue · comments

When trying to run k3x from flatpak I get a GTK traceback error.

$ flatpak run --user com.github.inercia.k3x
GI search path:
[PRE-MAIN]  [search-path] - /usr/lib/x86_64-linux-gnu/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN] Current LD_LIBRARY_PATH: /app/lib:/app/lib/x86_64-linux-gnu:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib
2020-09-17 13:14:30,830 [MainThread  ] [DEBUG]  [MAIN] Creating settings manager...
2020-09-17 13:14:30,839 [MainThread  ] [DEBUG]  Creating settings in delayed mode...
2020-09-17 13:14:30,839 [MainThread  ] [INFO ]  Changing loglevel to 20
2020-09-17 13:14:30,839 [MainThread  ] [INFO ]  [MAIN] Using icon /home/dmellado/.var/app/com.github.inercia.k3x/cache/icons/app.svg
2020-09-17 13:14:30,839 [MainThread  ] [INFO ]  [MAIN] Starting appindicator.Indicator
2020-09-17 13:14:30,865 [MainThread  ] [INFO ]  Creating/recreating docker client with DOCKER_HOST=unix:///var/run/docker.sock

(k3x:2): Gtk-CRITICAL **: 13:14:31.013: gtk_entry_set_text: assertion 'text != NULL' failed
Traceback (most recent call last):
  File "/app/bin/k3x", line 62, in <module>
    sys.exit(main.main(VERSION))
  File "/app/share/k3x/k3x/main.py", line 139, in main
    _indicator = Indicator(version=version)  # NOTE: assign for keeping the object alive
  File "/app/share/k3x/k3x/main.py", line 113, in __init__
    self._keybinder = Keybindings(self._settings, self._shortcuts)
  File "/app/share/k3x/k3x/keybindings.py", line 85, in __init__
    self._keybinder = SystemHotkey(check_queue_interval=0.01)
  File "/app/lib/python3.7/site-packages/system_hotkey/system_hotkey.py", line 614, in __init__
    self.conn = xcffib.connect()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 527, in __init__
    self.invalid()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 559, in invalid
    raise ConnectionException(err)
xcffib.ConnectionException: Connection closed, error during parsing display string.

It seems the failure is at this line. I think I will try to use xlib and see if this is stable...

Anyway, we should surround this code for not crashing...

Related to #13 (comment)

Just letting you know I had this same issue occur.

Looks like this is still an issue. I just ran into it when attempting to run the flatpak on Manjaro.

@WisdomWolf I ran into the same issue. Try disabling wayland flatpak run --user --nosocket=wayland com.github.inercia.k3x.

Wayland is still a problem, and I had to remove the wayland socket from the flatpak permissions in order to execute k3x.