Doesn't use the xdg desktop portal

Give your snap access to the dbus and that’ll be fixed. Check this for example:

I don’t see what I do different on Tuba’s snap https://github.com/GeopJr/Tuba/blob/main/build-aux/snap/snapcraft.yaml#L11 :confused: but I can confirm that the portal works on curtail and is not a gtk4 + core22 issue after all

Thanks for the heads up! I’ll investigate some more when I get some time to

The obfuscate snap also uses portals now.

Looks like using Gtk FileDialog fixed the portal issue!

1 Like

What I was not to able suggest you back then was, try to add GDK_DEBUG: portals in the environment section under apps.

Okay, I have got the idea why is this happening.

In GTK4, Gtk.FileChooserNative was not able to access portals within snaps. For others who are facing the same issue. Try to run your snap with GDK_DEBUG=portals <snap-name>. What this does is, forces to use portals.

Disclaimer: Gtk.FileChooserNative has been depriciated since GTK-4.10.

If your code uses it, please prefer to move to Gtk.FileDialog

@GeopJr please mark this as the solution