I fixed the problem. For some reason, the owner of the ~/.local/share/flatpak/ directory was the root.
/var/log/syslog
Jul 27 07:59:13 vasilisc systemd[13601]: Starting flatpak document portal service…
Jul 27 07:59:13 vasilisc xdg-document-portal[19171]: error: Failed to load db: Could not open file «/home/vasilisc/.local/share/flatpak/db/documents»: failure in open () function: Access denied
Jul 27 07:59:13 vasilisc systemd[13601]: xdg-document-portal.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 27 07:59:13 vasilisc systemd[13601]: xdg-document-portal.service: Failed with result ‘exit-code’.
After
sudo chown -R $USER:$USER ~/.local/share/
time docfetcher
elapsed time: 0.103026768
real 0m4,398s
user 0m4,740s
sys 0m0,369s