linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.21k stars 81 forks source link

Flatpak Warpinator 1.8.3 no longer starting after kernel update on Rasperry Pi 400, Debian 12 Bookworm #214

Open kotyz85 opened 6 months ago

kotyz85 commented 6 months ago

Distribution

Debian 12 Bookworm, aarch64

Package version

1.8.3, flatpak package

Frequency

Always

Bug description

I installed it yesterday from flathub and it worked fine, today, after system update which upgraded the kernel to version 6.6.20+rpt-rpi-v8 it no longer launches. It crashes every time, reinstalling the package did not solve the issue.

kotyz@raspberrypi:~ $ flatpak run org.x.Warpinator
Traceback (most recent call last):
  File "/app/libexec/warpinator/warpinator-launch.py", line 90, in <module>
    landlock.landlock_abi_version()
  File "/app/libexec/warpinator/landlock/plumbing.py", line 306, in landlock_abi_version
    return get_create_ruleset()(None, 0, CREATE_RULESET_VERSION)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/libexec/warpinator/landlock/plumbing.py", line 179, in create_ruleset_errcheck
    return syscall_errcheck(
           ^^^^^^^^^^^^^^^^^
  File "/app/libexec/warpinator/landlock/plumbing.py", line 160, in syscall_errcheck
    find_generic_reason_from_platform()
  File "/app/libexec/warpinator/landlock/plumbing.py", line 126, in find_generic_reason_from_platform
    kernel_version_tuple = tuple(map(int, kernel_version.split("-")[0].split(".")))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '20+rpt'

Steps to reproduce

Click on the Warpinator shortcut in the start menu - nothing happens. Launch it from terminal with the flatpak run org.x.Warpinator command - it spits out some traceback call and exits.

Expected behavior

Application should launch if I click on its shortcut in the start menu or if I launch it in the terminal with the flatpak run org.x.Warpinator command.

Additional information

kotyz@raspberrypi:~ $ uname -a
Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux
kotyz@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
kotyz@raspberrypi:~ $ flatpak list
Název                                            ID aplikace                                     Verze               Větev                 Instalace
Shortwave                                        de.haeckerfelix.Shortwave                       3.2.0               stable                user
Avidemux Team                                    org.avidemux.Avidemux                           2.8.1               stable                user
Freedesktop Platform                             org.freedesktop.Platform                        23.08.13            23.08                 user
Mesa                                             org.freedesktop.Platform.GL.default             24.0.2              23.08                 user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default             24.0.2              23.08-extra           user
ffmpeg-full                                      org.freedesktop.Platform.ffmpeg-full                                23.08                 user
openh264                                         org.freedesktop.Platform.openh264               2.1.0               2.2.0                 user
GNOME Application Platform version 45            org.gnome.Platform                                                  45                    user
KDE Application Platform                         org.kde.Platform                                                    5.15-23.08            user
KeePassXC Team                                   org.keepassxc.KeePassXC                         2.7.6               stable                user
MusicBrainz Picard                               org.musicbrainz.Picard                          2.11                stable                user
John Preston                                     org.telegram.desktop                            4.15.1              stable                user
Telegram Desktop Webview Add-on                  org.telegram.desktop.webview                    2.42.5              stable                user
Warpinator                                       org.x.Warpinator                                1.8.3               stable                user
mtwebster commented 6 months ago

Seems like the kernel version is unable to be parsed: the + symbol is unexpected.

In [4]: tuple(map(int, "6.6.20+rpt-rpi-v8".split("-")[0].split(".")))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[4], line 1
----> 1 tuple(map(int, "6.6.20+rpt-rpi-v8".split("-")[0].split(".")))

ValueError: invalid literal for int() with base 10: '20+rpt'

In [5]: 

What was the version string on the previous kernel? Seems like they need to fix this

kotyz85 commented 6 months ago

Previous kernel version is 6.1.0-rpi8-rpi-v8

I recently built deb package from source and I'm getting exactly the same error. So it's likely not dependent on packaging format, flatpak or deb.

kotyz@raspberrypi:~ $ apt show warpinator
Package: warpinator
Version: 1.8.3
Status: install ok installed
Priority: optional
Section: x11
Maintainer: Linux Mint <root@linuxmint.com>
Installed-Size: 13,8 MB
Depends: gir1.2-glib-2.0, gir1.2-gtk-3.0 (>= 3.20.0), gir1.2-xapp-1.0 (>= 1.6.0), python3 (<< 3.12), python3-async-timeout | python3 (>= 3.11.0), python3-gi, python3-setproctitle, python3-xapp (>= 1.6.0), python3-cryptography, python3-nacl, python3-netaddr, python3-netifaces, python3-ifaddr, python3-qrcode, dconf-gsettings-backend | gsettings-backend, python3 (>= 3.11~), python3:any, libc6 (>= 2.34), libstdc++6 (>= 12)
Download-Size: neznámá
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Allows simple local network file sharing.
kotyz@raspberrypi:~ $ which warpinator
/usr/bin/warpinator
kotyz@raspberrypi:~ $ warpinator
Traceback (most recent call last):
  File "/usr/libexec/warpinator/warpinator-launch.py", line 89, in <module>
    landlock.landlock_abi_version()
  File "/usr/libexec/warpinator/landlock/plumbing.py", line 306, in landlock_abi_version
    return get_create_ruleset()(None, 0, CREATE_RULESET_VERSION)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/warpinator/landlock/plumbing.py", line 179, in create_ruleset_errcheck
    return syscall_errcheck(
           ^^^^^^^^^^^^^^^^^
  File "/usr/libexec/warpinator/landlock/plumbing.py", line 160, in syscall_errcheck
    find_generic_reason_from_platform()
  File "/usr/libexec/warpinator/landlock/plumbing.py", line 126, in find_generic_reason_from_platform
    kernel_version_tuple = tuple(map(int, kernel_version.split("-")[0].split(".")))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '20+rpt'
mtwebster commented 6 months ago

You're right, it's because of the + in the kernel version.

You can try modifying warpinator-launch.py:

[03:00:16 PM] mtwebster@mintbox3:~/bin/warpinator[master *%]> git diff src/warpinator-launch.py
diff --git a/src/warpinator-launch.py b/src/warpinator-launch.py
index e06b0d05..a816ffbe 100644
--- a/src/warpinator-launch.py
+++ b/src/warpinator-launch.py
@@ -95,6 +95,8 @@ except ModuleNotFoundError as e:
 except landlock.SyscallError as e:
     if args.debug:
         print("Landlock support unavailable: %s" % str(e))
+except ValueError:
+    pass

 if args.mode:
     if args.mode in supported_modes: