Ax-Shell icon indicating copy to clipboard operation
Ax-Shell copied to clipboard

Crash on startup

Open Skidamek opened this issue 1 year ago • 14 comments

Hi, i am trying to install this shell for the first time on fully updated arch linux and it crashes immediately not sure why, here's log. I used the installation script provided in the readme curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh | bash

❯ uwsm -- app python ~/.config/Ax-Shell/main.py                                       
Traceback (most recent call last):
  File "/home/skidam/.config/Ax-Shell/main.py", line 8, in <module>
    from modules.bar import Bar
  File "/home/skidam/.config/Ax-Shell/modules/bar.py", line 8, in <module>
    from fabric.widgets.wayland import WaylandWindow as Window
  File "/usr/lib/python3.13/site-packages/fabric/widgets/wayland.py", line 30, in <module>
    class WaylandWindow(Window):
    ...<307 lines>...
            }
  File "/usr/lib/python3.13/site-packages/fabric/widgets/wayland.py", line 31, in WaylandWindow
    @Property(
     ~~~~~~~~^
        GtkLayerShell.Layer,
        ^^^^^^^^^^^^^^^^^^^^
        flags="read-write",
        ^^^^^^^^^^^^^^^^^^^
        default_value=GtkLayerShell.Layer.TOP,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/fabric/core/service.py", line 124, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        type=_type,
        ^^^^^^^^^^^
    ...<8 lines>...
        **kwargs,
        ^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/gi/_propertyhelper.py", line 148, in __init__
    self.type = self._type_from_python(type)
                ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/site-packages/gi/_propertyhelper.py", line 267, in _type_from_python
    raise TypeError("Unsupported type: %r" % (type_,))
TypeError: Unsupported type: <enum 'Layer'>

Skidamek avatar Mar 22 '25 21:03 Skidamek

downgrade python-gobject to 3.50.0

S4NKALP avatar Mar 22 '25 22:03 S4NKALP

Seems to be a problem with PyGObject sadly. There's nothing I can do, sorry.

Axenide avatar Mar 23 '25 05:03 Axenide

how do i downgrade python-gobject to 3.50.0 without breaking my arch linux?

Bernard88-pixel avatar Apr 07 '25 13:04 Bernard88-pixel

Just downgrade it, it won't break anything. To make it simpler, install the downgrade package and run sudo downgrade python-gobject then select 3.50.0-2

Axenide avatar Apr 07 '25 17:04 Axenide

Downgrading it surely fixes the problem but also breaks the tlpui, I don't change the settings of tlupi regularly so this is no issue for me but will we have a better solution for this?

newcharhuso avatar Apr 21 '25 14:04 newcharhuso

Never mind, this is a me issue because downgrading it also breaks Ax-Shell the error is : [husnu@arch ~]$ tlpui Traceback (most recent call last): File "/sbin/tlpui", line 5, in from tlpui.main import main File "/usr/lib/python3.13/site-packages/tlpui/main.py", line 4, in import gi ModuleNotFoundError: No module named 'gi'

Edit: You need to select the 2nd remote for version 3.50.0

newcharhuso avatar Apr 21 '25 14:04 newcharhuso

Exactly, that's why I said 3.50.0-2. :)

Axenide avatar Apr 21 '25 20:04 Axenide

It's an issue with fabric/gtk-layer-shell not being adjusted to a breaking change that happened in pygobject.

Made a PR to fix that but it likely makes pygobject >= 3.51 a requirement. Haven't tested it tho.

@Axenide I'm not a python developer nor know much about gnome's ecosystem. If you mind taking a look at it, you might be able to figure out if that's a good approach or even (in light of low maintainer activity on fabric's side) if shipping a modified version of fabric would be a good idea. In my opinion dropping the downgrade requirement of a system package would be awesome.

FakeMichau avatar May 20 '25 13:05 FakeMichau

@FakeMichau You did a great job with that PR, I'll try to implement that within Ax-Shell instead of forking Fabric. It should be simple.

Thanks!

Axenide avatar May 20 '25 21:05 Axenide

So, after testing, the Enum Layer error is still there even after updating python-gobject. Guess we still have to wait for upstream to fix it.

Axenide avatar May 20 '25 21:05 Axenide

How did you make it crash? I currently have the modified fabric installed system-wide with the latest pygobject and I'm running ax-shell without those errors.

Unless you mean after trying to fix it in ax-shell, then my bad.

FakeMichau avatar May 20 '25 23:05 FakeMichau

I reimplemented your modification to wayland.py as a custom module but I couldn't make it work. I'll give it more time tomorrow.

Axenide avatar May 21 '25 00:05 Axenide

I copied over the modified wayland.py to the ax-shell's widgets folder under the name of wayland_hotfix.py and then changed all the imports from from fabric.widgets.wayland import WaylandWindow as Window to from widgets.wayland_hotfix import WaylandWindow as Window and it seems to be working on my end, even after installing an unmodified version of fabric

FakeMichau avatar May 21 '25 16:05 FakeMichau

That's exactly what I tried. I wonder what happened, but I'll try again.

Axenide avatar May 21 '25 23:05 Axenide