Link in flatpak apps won't open on click since anymore last update

Hi everyone,
I use some flatpak apps to chat with people (Discord, Zapzap for Whatsapp).
Since last update links won’t open when I click on them in app.

Launching these apps from terminal show me errors when I click on links :

Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L?interface ??org.freedesktop.portal.OpenURI?? n?existe pas pour l?objet ? l?emplacement /org/freedesktop/portal/desktop

(“interface org.freedesktop.portal.OpenURI doesn’t exist for the object or location /org/freedesktop/portal/dekstop”)

I thought it would be connected to xdg-portal, but I have packages installed

$ pamac search --installed xdg-desktop-portal
xdg-desktop-portal-gtk  1.14.1-3                                                                                   extra
    A backend implementation for xdg-desktop-portal using GTK
xdg-desktop-portal  1.18.0-2                                                                                       extra
    Desktop integration portals for sandboxed apps

I use Manjaro Xfce.

Does anyone has an idea? Thank you

What is the output of

pacman -Qs portal

Nevermind, you already checked. :wink:

Same as pamac search --installed xdg-dekstop-portal :

$ pacman -Qs portal
local/xdg-desktop-portal 1.18.0-2
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gtk 1.14.1-3
    A backend implementation for xdg-desktop-portal using GTK

Have you attempted to remove these, and install updated versions (if they are available)?

I have last versions installed, these are not the only applications affected by the problem, I took these two ones as example.

I don’t use flatpak; I prefer appimage, if I ever need to, so I’m likely no help in this instance.

What happens if you restart the portals?:

systemctl --user restart xdg-desktop-portal
systemctl --user restart xdg-desktop-portal-gtk

Are they running ?

systemctl --user status xdg-desktop-portal xdg-desktop-portal-gtk xdg-document-portal

OK. This was a dead-end:

Is dumping Flatpak entirely, an option?

This is likely caused by the recent updates to xdg-desktop-portal and xdg-desktop-portal-gtk. Downgrading those packages to the previous versions (xdg-desktop-portal-1.16.0-3-x86_64.pkg.tar.zst and xdg-desktop-portal-gtk-1.14.1-1-x86_64.pkg.tar.zst) should restore the ability to click links.

Lots of discussion in [Xdg-desktop-portal upgrade breaks GTK apps] but I haven’t had a chance to try to sort it all out.

OK looks that xdg-desktop-portal-gtk.service is inactive

$ systemctl --user status xdg-desktop-portal xdg-desktop-portal-gtk xdg-document-portal
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Tue 2023-10-17 18:35:39 CEST; 3h 14min ago
   Main PID: 2211 (xdg-desktop-por)
      Tasks: 6 (limit: 27388)
     Memory: 7.8M
        CPU: 183ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─2211 /usr/lib/xdg-desktop-portal

oct. 17 18:35:39 michael-20ygcto1ww systemd[1950]: Starting Portal service...
oct. 17 18:35:39 michael-20ygcto1ww xdg-desktop-por[2211]: No skeleton to export
oct. 17 18:35:39 michael-20ygcto1ww systemd[1950]: Started Portal service.

○ xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
     Active: inactive (dead)

● xdg-document-portal.service - flatpak document portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-document-portal.service; static)
     Active: active (running) since Tue 2023-10-17 18:35:39 CEST; 3h 14min ago
   Main PID: 2223 (xdg-document-po)
      Tasks: 9 (limit: 27388)
     Memory: 5.6M
        CPU: 111ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-document-portal.service
             ├─2223 /usr/lib/xdg-document-portal
             └─2266 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc

oct. 17 18:35:39 michael-20ygcto1ww systemd[1950]: Starting flatpak document portal service...
oct. 17 18:35:39 michael-20ygcto1ww systemd[1950]: Started flatpak document portal service.

In that case give it a restart

systemctl --user restart xdg-desktop-portal-gtk.service

If it is continually failing to start after boot then maybe we can investigate that as the issue.

Might not be way due to Wayland in my case (anyway the post you reference also reports that issue happen with X11)

In my case

$ echo $XDG_SESSION_TYPE
x11

ok thank you. The service is restarting with the command, but

  • clicking on links from flatpak apps still doesn’t work, even if I quit the the flatpak application and restart it
  • service xdg-desktop-portal-gtk.service is killed as soon as I quit my X11 session, then when I come back to a new X11 session I have to manually restart the service with the command you typed here

Should this not be:

systemctl --user restart xdg-desktop-portal.service

As I understand it, xdg-desktop-portal-gtk is a backend, that is loaded/used by xdg-desktop-portal as needed; unless I’m mistaken; and that’s possible, as I haven’t needed to explore this area until these recent issues arose.

XDG Desktop Portal

It should be started automatically.
But it should also be running.

Example here:

$ systemctl --user status plasma-xdg-desktop-portal-kde.service
● plasma-xdg-desktop-portal-kde.service - Xdg Desktop Portal For KDE
     Loaded: loaded (/usr/lib/systemd/user/plasma-xdg-desktop-portal-kde.service; static)
     Active: active (running) since 10h ago
   Main PID: 1240 (xdg-desktop-por)
      Tasks: 7 (limit: 16537)
     Memory: 20.2M
        CPU: 973ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/plasma-xdg-desktop-portal-kde.service
             └─1240 /usr/lib/xdg-desktop-portal-kde

 systemd[1067]: Starting Xdg Desktop Portal For KDE...
 systemd[1067]: Started Xdg Desktop Portal For KDE.

(so its been running since boot, as it should be … also obviously KDE here instead)

both packages were upgraded in september, and since upgrade everything worked fine until last OS update, so I doubt it’s connected with the packages versions.

[2023-10-09T19:06:32+0200] [ALPM] upgraded xdg-desktop-portal-gtk (1.14.1-1 -> 1.14.1-3)
[2023-10-09T19:06:32+0200] [ALPM] upgraded xdg-desktop-portal (1.16.0-3 -> 1.18.0-2)

I tried to downgrade xdg-destkop-portal-gtk tough but issue still persists

I’ve learned that flatpak devs seem to have been wrestling with this issue for over five years, without any definitive outcome (See link at my post #9).

The issue was closed on September 11, 2003, with the final resolution equating to not much more than a shrug of the shoulders. :man_shrugging: :person_shrugging: :woman_shrugging:

I ran into this issue too on a new Manjaro Cinnamon install. Spend 4 hours, tried all the tricks and checked all the checks… and finally found a solution thanks to this Github comment.

I ran /usr/lib/xdg-desktop-portal --verbose --replace

and for good measure right after that

I ran /usr/lib/xdg-desktop-portal-gtk --verbose --replace

and that fixed the problem for me. So maybe only the first command is enough to fix the issue :wink:

xfce here too, same issue

Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Nenhuma interface ?org.freedesktop.portal.OpenURI? no objeto no caminho /org/freedesktop/portal/desktop

@vi.o.vini
Did you try the commands in the @muvvenby post (scroll up)?