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

Bauh fails to list Flatpaks #374

Open
UriHerrera opened this issue Oct 14, 2024 · 5 comments
Open

Bauh fails to list Flatpaks #374

UriHerrera opened this issue Oct 14, 2024 · 5 comments

Comments

@UriHerrera
Copy link

Describe the bug

Bauh no longer lists any Flatpak, whether installed or not.

Software Environment
bauh version: 0.10.7 - AppImage
O.S: Nitrux 3.7.0
Python version: 3.12

Here's the output from the terminal.

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/view/core/controller.py", line 206, in _fill_read_installed
    man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available,
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/controller.py", line 162, in read_installed
    installed = flatpak.list_installed(version)
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/flatpak.py", line 129, in list_installed
    runtime = 'runtime' in data[6]
IndexError: list index out of range
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/view/core/controller.py", line 495, in _fill_suggestions
    man_sugs = man.list_suggestions(limit=limit, filter_installed=filter_installed)
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/controller.py", line 642, in list_suggestions
    installed = {i.id for i in self.read_installed(disk_loader=None).installed}
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/controller.py", line 162, in read_installed
    installed = flatpak.list_installed(version)
  File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/flatpak.py", line 129, in list_installed
    runtime = 'runtime' in data[6]
IndexError: list index out of range
@PandusMaximus
Copy link

Having the same issue with Arch using the appimage or the AUR build. Cant see installed flatpaks whether its set to User or System.

@BlastboomStrice
Copy link

Same issue appeared on:
bauh version: 0.10.7 - bauh-0.10.7-x86_64.AppImage
OS: Debian testing (Trixie)
Python version: 3.12.6-1 amd64

I could install and see flatpaks until a few hours ago, somehow now it's gone, hmm.

@UriHerrera
Copy link
Author

UriHerrera commented Oct 20, 2024

I downloaded the AppImage again, and everything works now (?)

It seems the problem was with how Bauh reads Flatpak's output, and the length of this output caused an issue. If that's the case, then it means that at any point, this issue will occur again.

imagen

No errors when running the AppImage

@tuxfanmatze
Copy link

tuxfanmatze commented Nov 2, 2024

Bauh 0.10.7 installed via pipx, Linux Mint 22 Kernel: 6.8.0-48-generic, Python: 3.12.3

I had the same problem some weeks ago and now the error seems to be gone!

The main error it think was the following output from parsing the flatpak list:
File "/tmp/.mount_bauh-0U152ZH/usr/lib/python3.9/site-packages/bauh/gems/flatpak/flatpak.py", line 129, in list_installed
runtime = 'runtime' in data[6]
IndexError: list index out of range

I printed the flatpak parsing output to the terminal in ~/.local/share/pipx/venvs/bauh/lib/python3.12/site-packages/bauh/gems/flatpak/flatpak.py
due to adding after line 131 in flatpak.py a print(data) command in line 132:

129   for o in app_list.stdout:
130       if o:
131           data = o.decode().strip().split('\t')
132           print (data)

This was the error causing output (only the last line):
['org.freedesktop.Platform.ffmpeg-full', 'org.freedesktop.Platform.ffmpeg-full/x86_64/24.08', 'x86_64', '24.08', 'FFmpeg "full" extension contains codecs not included in']
-> you see, it breaks after the 5.th entry causing the "IndexError: list index out of range".

Now I installed the org.freedesktop.Platform.ffmpeg-full/x86_64/24.08 again
output of print(data):
['org.freedesktop.Platform.ffmpeg-full', 'org.freedesktop.Platform.ffmpeg-full/x86_64/24.08', 'x86_64', '24.08', 'FFmpeg-full extension contains patent-restricted codecs not in runtime FFmpeg', 'flathub', 'system,runtime', 'FFmpeg extension with extra codecs']
-> now the error disapeared cause this line has all 8 entries, so the data[ ] array has no errors.

Maybe the maintainer of the ffmpeg- Flatpak has changed in meatime his description Text?

The error ocurred for me if I has installed the Newsflash Flatpak: io.gitlab.news_flash.NewsFlash. the ffmpeg- Flatpak was installed as an dependency.
As a meantime solution I uninstalled the ffmpeg-24.08 Flatpak and set it on hold in bauh and Mint Updatemanager. But on the commandline i didn't find a Flatpak hold. The ffmpeg-23.08 Flatpak didn't cause any errors.

What are your experiences?

@JFingerle
Copy link

JFingerle commented Jan 17, 2025

I'm encountering the same problem on Manjaro.

bauh version: 0.10.7
flatpak version: 1:1.15.12-1

Workaround

I fixed it by removing "org.freedesktop.Platform.ffmpeg-full".

flatpak remove org.freedesktop.Platform.ffmpeg-full

Output of bauh:

Exception in thread Thread-15 (_fill_read_installed):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/bauh/view/core/controller.py", line 206, in _fill_read_installed
    man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/bauh/gems/flatpak/controller.py", line 162, in read_installed
    installed = flatpak.list_installed(version)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/bauh/gems/flatpak/flatpak.py", line 129, in list_installed
    runtime = 'runtime' in data[6]
                           ~~~~^^^
IndexError: list index out of range

Output of "flatpak list":

Name                                             Application ID                                           Version                             Branch                  Installation
Discord                                          com.discordapp.Discord                                   0.0.71                              stable                  user
Jellyfin Media Player                            com.github.iwalton3.jellyfin-media-player                1.11.1                              stable                  user
Flatseal                                         com.github.tchx84.Flatseal                               2.3.0                               stable                  user
Bottles                                          com.usebottles.bottles                                   51.15                               stable                  user
FreeTube                                         io.freetubeapp.FreeTube                                  0.21.3 Beta                         stable                  user
MeshLab                                          net.meshlab.MeshLab                                      2023.12                             stable                  user
Freedesktop Platform                             org.freedesktop.Platform                                 freedesktop-sdk-23.08.23            23.08                   user
Freedesktop Platform                             org.freedesktop.Platform                                 freedesktop-sdk-24.08.3             24.08                   user
Mesa                                             org.freedesktop.Platform.GL.default                      24.0.9                              22.08                   user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default                      24.0.9                              22.08-extra             user
Mesa                                             org.freedesktop.Platform.GL.default                      24.2.5                              23.08                   user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default                      24.2.5                              23.08-extra             user
Mesa                                             org.freedesktop.Platform.GL.default                      24.2.4                              24.08                   user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default                      24.2.4                              24.08extra              user
Mesa                                             org.freedesktop.Platform.GL32.default                    24.2.3                              23.08                   user
Mesa                                             org.freedesktop.Platform.GL32.default                    24.2.4                              24.08                   user
MangoHud                                         org.freedesktop.Platform.VulkanLayer.MangoHud            0.7.2                               23.08                   user
ffmpeg-full                                      org.freedesktop.Platform.ffmpeg-full                                                         23.08                   user
FFmpeg extension with extra codecs               org.freedesktop.Platform.ffmpeg-full                                                         24.08                   user
i386                                             org.freedesktop.Platform.ffmpeg_full.i386                                                    23.08                   user
i386                                             org.freedesktop.Platform.ffmpeg_full.i386                                                    24.08                   user
openh264                                         org.freedesktop.Platform.openh264                        2.1.0                               2.2.0                   user
openh264                                         org.freedesktop.Platform.openh264                        2.4.1                               2.4.1                   user
EasyTAG                                          org.gnome.EasyTAG                                        2.4.3                               stable                  user
GNOME Application Platform version 44            org.gnome.Platform                                                                           44                      user
GNOME Application Platform version 45            org.gnome.Platform                                                                           45                      user
GNOME Application Platform version 46            org.gnome.Platform                                                                           46                      user
i386                                             org.gnome.Platform.Compat.i386                                                               45                      user
i386                                             org.gnome.Platform.Compat.i386                                                               46                      user
i386                                             org.gnome.Platform.Compat.i386                                                               47                      user
Matcha-dark-sea GTK theme                        org.gtk.Gtk3theme.Matcha-dark-sea                        2021-12-25                          3.22                    user
KDE Application Platform                         org.kde.Platform                                                                             5.15-23.08              user
mprime                                           org.mersenne.mprime                                      30.19+build.20                      stable                  user
Signal Desktop                                   org.signal.Signal                                        7.29.0                              stable                  user
Telegram Desktop                                 org.telegram.desktop                                     5.6.3                               stable                  user
Telegram Desktop Webview Add-on                  org.telegram.desktop.webview                             2.44.4                              stable                  user
DXVK                                             org.winehq.Wine.DLLs.dxvk                                2.4.1                               stable-23.08            user
Gecko                                            org.winehq.Wine.gecko                                                                        stable-23.08            user
gecko                                            org.winehq.Wine.gecko                                                                        stable-24.08            user
Mono                                             org.winehq.Wine.mono                                                                         stable-23.08            user
mono                                             org.winehq.Wine.mono                                                                         stable-24.08            user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants