Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: "The folder contents could not be displayed" "Error" "/run/user/1000/doc/". Related to "xdg-document-portal". #5769

Open
4 tasks done
Francewhoa opened this issue Apr 9, 2024 · 2 comments

Comments

@Francewhoa
Copy link

Francewhoa commented Apr 9, 2024

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.14.4

What Linux distribution are you using?

Debian

Linux distribution version

12 Bookworm. 6.1.0-18-amd64. Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux.

What architecture are you using?

x86_64

How to reproduce

  1. After a fresh reboot, use either LibreWolf 124.0.1-1 or Firefox 124.0.2 to print to a PDF file any web page. This works smooth and fine for now.

  2. Continue using the same device and apps above for multiple days without reboot. Do daily Flatpak updates without reboot.

  3. Until when you use either LibreWolf 124.0.1-1 or Firefox 124.0.2, when you print the same web page to a PDF.

  4. This error message is displayed:

    1. The folder contents could not be displayed Error[…] /run/user/1000/doc/ […]
      1. This screenshot below shows this error in French. With steps to reproduce.

      Screenshot-38---cropped

    2. This error message above is the first challenge. Then the PDF file creation failed. This is the second challenge.

The same challenge can be reproduced the other way around with an incoming file instead of an outgoing file. For example, but not limited to, using the same Flatpak apps, uploading a PNG file to any webpages. The upload failed without an error message displayed. The same workaround below temporarily resolved this challenge.

Using:

Expected Behavior

  1. Error message is not displayed.

  2. File is created. Such as, but not limited to PDF file.

Actual Behavior

  1. The error message is displayed

  2. Then the PDF file creation failed

Additional Information


Temporary Workaround

For those facing this challenge, the steps below temporary fixed this challenge. But the same challenge comes back after a few hours or days.

Steps:

  1. Using GNOME System Monitor or equivalent, kill this process xdg-document-portal

  2. Fully exit the Flatpak app. Including all its windows.

  3. Start the Flatpak app

  4. Error is gone


Related Ticket

bwrap: Can't find source path /run/user/1000/doc/by-app/com.spotify.Client: Permission denied #5580

@Francewhoa Francewhoa changed the title [Bug]: "The folder contents could not be displayed" "Error" "/run/user/1000/doc/" [Bug]: "The folder contents could not be displayed" "Error" "/run/user/1000/doc/". Related to "xdg-document-portal". Apr 9, 2024
@rkfg
Copy link

rkfg commented May 26, 2024

Happens on 1.18.4-1 as well, Debian testing. Restarting the service with systemctl --user restart xdg-document-portal makes it work. It works for some time until it doesn't, there are no error messages in systemd's log (checked with journalctl --user --unit xdg-document-portal) except Ignoring invalid max threads value 4294967295 > max (100000). that's printed right after starting it.

This bug is very inconvenient and unpredictable. The root user can't access /run/user/1000/doc either when this happens. I overrode the launch command and added -v so hopefully when this happens next time (tomorrow?) there will be some info.

@rkfg
Copy link

rkfg commented May 28, 2024

Well, this is awkward...

May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE d51fa1543a443a63
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE d51fa1543a443a63
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE 60d589f582bf7490
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE d51fa1543a443a63
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE 60d589f582bf7490
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: RELEASE d51fa1543a443a63
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: FORGET d51fa1543a443a63 53
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: FORGET 60d589f582bf7490 41
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 1:by-app
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 1:by-app => 2
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 2:org.kde.krita
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 2:org.kde.krita => 9
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: STATFS 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: STATFS -> error EPERM
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: ACCESS 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 1:.Trash
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP -> error ENOENT
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP 1:.Trash-1000
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: LOOKUP -> error ENOENT
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: STATFS 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: STATFS -> error EPERM
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: GETATTR 1
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: DESTROY
May 26 21:05:47 homecomp xdg-document-portal[2513880]: XDP: fuse fs unmounted externally
May 26 21:05:47 homecomp systemd[14732]: xdg-document-portal.service: Main process exited, code=exited, status=21/n/a
May 26 21:05:47 homecomp systemd[14732]: xdg-document-portal.service: Failed with result 'exit-code'.
May 28 12:08:28 homecomp systemd[14732]: Starting xdg-document-portal.service - flatpak document portal service...
May 28 12:08:28 homecomp systemd[14732]: Started xdg-document-portal.service - flatpak document portal service.
May 28 12:08:28 homecomp xdg-document-portal[659814]: fusermount3: failed to access mountpoint /run/user/1000/doc: Permission denied
May 28 12:08:28 homecomp xdg-document-portal[659807]: error: fuse init failed: Can't mount path /run/user/1000/doc
May 28 12:08:28 homecomp xdg-document-portal[659807]: XDP: Providing portal org.freedesktop.portal.Documents
May 28 12:08:28 homecomp xdg-document-portal[659807]: XDP: Providing portal org.freedesktop.portal.FileTransfer
May 28 12:08:28 homecomp xdg-document-portal[659807]: XDP: org.freedesktop.portal.Documents acquired
May 28 12:08:28 homecomp systemd[14732]: xdg-document-portal.service: Main process exited, code=exited, status=6/NOTCONFIGURED
May 28 12:08:28 homecomp systemd[14732]: xdg-document-portal.service: Failed with result 'exit-code'.

The programs work for now but the unit doesn't start anymore. Also /usr/libexec/xdg-document-portal is running, no idea what started it exactly. Seems like something stopped the systemd service and started another instance instead. Any ideas what can cause XDP: fuse fs unmounted externally? I certainly didn't unmount that manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants