StreamController icon indicating copy to clipboard operation
StreamController copied to clipboard

BUG: "ValueError: Namespace Xdp not available" when built from source and run via flatpak

Open kawaiishay opened this issue 6 months ago • 17 comments

Describe the bug When StreamController is built from source and run:

>>> flatpak run com.core447.StreamController
Traceback (most recent call last):
  File "/app/bin/StreamController/main.py", line 39, in <module>
    from src.app import App
  File "/app/bin/StreamController/src/app.py", line 24, in <module>
    from src.windows.Store.ResponsibleNotesDialog import ResponsibleNotesDialog
  File "/app/bin/StreamController/src/windows/Store/ResponsibleNotesDialog.py", line 20, in <module>
    import globals as gl
  File "/app/bin/StreamController/globals.py", line 9, in <module>
    from src.backend.DeckManagement.HelperMethods import find_fallback_font
  File "/app/bin/StreamController/src/backend/DeckManagement/HelperMethods.py", line 36, in <module>
    from autostart import is_flatpak
  File "/app/bin/StreamController/autostart.py", line 21, in <module>
    gi.require_version("Xdp", "1.0")
  File "/usr/lib/python3.12/site-packages/gi/__init__.py", line 122, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Xdp not available

I have the dependencies installed:

>>> sudo apt install xdg-desktop-portal xdg-desktop-portal-gtk libportal-dev libportal-gtk4-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
xdg-desktop-portal is already the newest version (1.18.4-1ubuntu2.24.04.1).
xdg-desktop-portal-gtk is already the newest version (1.15.1-1build2).
libportal-dev is already the newest version (0.7.1-5build5).
libportal-dev set to manually installed.
libportal-gtk4-1 is already the newest version (0.7.1-5build5).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

To Reproduce Steps to reproduce the behavior:

  1. build from source
  2. run via flatpak

Expected behavior App opens and runs

Screenshots Looks like the libraries for Xdp need to be in the manifest for flatpak? [https://mamot.fr/@krafting/113950708043499060] Image

Same as https://github.com/StreamController/StreamController/issues/120 when building from source

kawaiishay avatar Apr 01 '25 18:04 kawaiishay