Bug 430092

Summary: Qt app compiled for KDE flatpak runtime cannot open directories
Product: [Developer tools] Qt/KDE Flatpak Runtime Reporter: jstone <joshua.gage.stone>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description jstone 2020-12-06 18:37:58 UTC
SUMMARY

A Flathub submission request for an Qt application was made recently, and a bug has been found where the application cannot open directories:

https://github.com/flathub/flathub/pull/1978


STEPS TO REPRODUCE
1. Run the following commands to install and run the flatpak:

    flatpak install --user https://dl.flathub.org/build-repo/32694/org.multimc.MultiMC.flatpakref
    flatpak run org.multimc.MultiMC

2. Try to click either:

Folders > View Instance Folder

.. or:

Folders > View Central Mods Folder


OBSERVED RESULT

The application window merely hangs when trying to click on either of these menu items. Giving more sandbox permissions for accessing folders, dbus, etc, doesn't make a difference either.


EXPECTED RESULT

A folder will open in the desktop's file manager. This works as expected with the latest release tarball:

https://multimc.org/#Download

As well as when compiled from source, as found here:

https://github.com/MultiMC/MultiMC5


SOFTWARE/OS VERSIONS
Linux distro:    Fedora 33 Workstation
Desktop:         Gnome 3.38.1
Flatpak version: 1.8.3
Flatpak runtime: org.kde.Platform/x86_64/5.15


ADDITIONAL INFORMATION

Some debugging has led me to believe that this call to QDesktopServices::openUrl() is the cause of the hanging:

https://github.com/MultiMC/MultiMC5/blob/develop/api/gui/DesktopServices.cpp#L84

This bug may also be related to a similar regression fixed in the version of xdg-utils in the Freedesktop runtime:

https://github.com/flatpak/flatpak-xdg-utils/pull/36
Comment 1 jstone 2020-12-10 03:36:51 UTC
This behavior is apparently caused by a bug in the application itself. It's been patched and now it works as expected.