linuxmint / mint22-beta

BETA Bug Squash Rush
33 stars 1 forks source link

Flatpak applications unable to take screenshots #157

Closed blackmyre closed 4 months ago

blackmyre commented 4 months ago

Description Flatpak applications that should be able to capture a screenshot fail with ZBus Error: missing field 'uri' message after making org.freedesktop.portal.Request. Applications tried are ASHPD Demo program com.belmoussaoui.ashpd.demo v0.4.1 and 2FA Authenticator program com.belmoussaoui.Authenticator v4.4.0.

This Issue Report describes the findings with the ASHPD Demo program, but they appear identical except for application-specific wording preceding the ZBus Error message.

Output and error message

2024-07-10T20:21:56.670447Z  INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_281/ashpd_8H7exIQQ8t
2024-07-10T20:21:56.801018Z  INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request'
2024-07-10T20:21:56.801068Z ERROR ashpd_demo::portals::desktop::screenshot: Failed to take a screenshot ZBus Error: missing field `uri`

Environment Fresh install of Mint 22 Cinnamon 64-bit Beta

Steps to reproduce

flatpak install -y flathub com.belmoussaoui.ashpd.demo
flatpak run com.belmoussaoui.ashpd.demo

What happens UI shows red banner: image Error message ERROR ashpd_demo::portals::desktop::screenshot: Failed to take a screenshot ZBus Error: missing field 'uri' is output to terminal

What was expected to happen The gnome-screenshot utility to launch successfully.

clefebvre commented 4 months ago

Maybe these apps aren't designed to work outside of GNOME? The fact that they use libAdwaita seems to indicate so.

clefebvre commented 4 months ago

We can't support apps which don't support us in the first place. Please reopen the issue if this is observed with apps which aren't designed specifically for GNOME.

blackmyre commented 4 months ago

Ah, fair enough. I thought Flatpak and the xdg-desktop-portal-* system were supposed to bridge the differences between desktop environments but it's not something I really understand so I probably got the wrong end of the stick. Apologies for the false flag.

[Edit] Just to note that this problem came to light when I installed gnome-authenticator from Mint's Software. I thought that as it is available there it would work (it seems to, except for the screenshot aspect).

mtwebster commented 4 months ago

This should be supported by xdg-desktop-portal-xapp

clefebvre commented 4 months ago

Ah, fair enough. I thought Flatpak and the xdg-desktop-portal-* system were supposed to bridge the differences between desktop environments but it's not something I really understand so I probably got the wrong end of the stick. Apologies for the false flag.

[Edit] Just to note that this problem came to light when I installed gnome-authenticator from Mint's Software. I thought that as it is available there it would work (it seems to, except for the screenshot aspect).

They do but some apps also get designed/implemented with only one DE in mind and can sometimes depend on DE specific features. LibAdwaita is specifically designed to make GNOME apps. It breaks essential features in other DEs such as controls theming and window controls.

Anyway, I'm happy to see this isn't the case here. Michael's commit will come as an update prior to the stable release.