LibreOffice (from flathub) cannot find files found in GNOME Shell's overview search on Fedora Silverblue 44

Hi,

my issue is pretty much what I wrote in the title. If I search for files using the GNOME overview search, and try to open a found file using LibreOffice by clicking on the search result, LibreOffice Writer/Calc/etc. launches, but I am shown an error message like in the following screenshots /run/user/1000/doc/<some-random-string>/my-spreadsheet.ods does not exist.:

Opening LibreOffice Calc, and then File->Open the very same file, works:

AFAIR the issue appeared after the update to Fedora Silverblue 44. I cannot remember this to be an issue on FS 43.

It pretty much looks like a sandbox/permission issue, but I don’t understand what exactly is wrong? My permissions are unmodified from the defaults:

$ flatpak info --show-permissions org.libreoffice.LibreOffice
[Context]
shared=ipc;network;
sockets=cups;fallback-x11;pulseaudio;wayland;
devices=dri;
filesystems=xdg-config/gtk-3.0;xdg-run/gvfsd;xdg-config/fontconfig:ro;host;

[Session Bus Policy]
org.gtk.vfs.*=talk
org.libreoffice.LibreOfficeIpc0=own

[Environment]
GIO_EXTRA_MODULES=/app/lib/gio/modules
JAVA_HOME=/app/jre
LIBO_FLATPAK=1

Even if I give the app filesystem=home permissions, the same issue happens.

There is at least one other user who has reported the very same issue to the LibreOffice user forum: https://ask.libreoffice.org/t/libreoffice-documents-fail-to-launch-from-gnome-search/135232 Since I have no account over there, I wanted to first check with the Fedora community if someone has a clue here? If this is a genuine issue with LibreOffice, I am happy to create an account on their forums if only to +1 the linked discussion.

I am on Silverblue 44 an your issue with LibreOffice is reproducible.

FWIW, doing the same for other file formats (text, image, PDF), the corresponding Flatpak apps will open the files just fine.

One thing I’ve noticed in LibreOffice’s metadata is that it’s missing the filesystems=xdg-run/gvfs permissions, whereas the other Flatpak apps do have it. Might not be relevant though.

FWIW, the thread on the LibreOffice forum had received the solution since almost 2 months (didn’t bother about the issue until today). TL;DR, this fixed the issue at hand:

flatpak override --user --filesystem=xdg-run/doc org.libreoffice.LibreOffice

Since the OP on the LibreOffice forum didn’t proceed with the suggested PR to the LibreOffice flatpak on flathub, I have just sent them a PR myself: finish-args: Add --filesystem=xdg-run/doc by jmaibaum · Pull Request #387 · flathub/org.libreoffice.LibreOffice · GitHub

Just FYI (for anyone just reading here), the flatpak maintainer for LibreOffice noted in the PR linked above that just adding blanket xdg-run/doc permssions this is not a generally applicable solution.

So, there still seems to be a bug in GNOME Shell’s Overview Search that needs addressing by someone more knowledgable.

Today (or some days ago, didn’t have to edit a document for a couple of days), this workaround stopped working. LibreOffice would not open at all anymore, neither from the overview search, nor by simply launching it directly. I got this on the command line:

$ flatpak run org.libreoffice.LibreOffice
bwrap: Can't mount on symlink destination /run/user/1000/doc

I had to remove the override again in order to being able to launch LO at all. Of course, the documents search on the overview remains broken again afterwards (as it was before I learned about the now no longer working workaround).

So, back to square one.