Weird Documents app behavior with "broken" PDFs

I’ve thinking about filing a bug, but it only happens with certain files which contain private data, so I guess it won’t be useful.

So: there’s these two PDF files (my COVID vaccine certificate and an electricity bill) which Documents app refuses to open. It says “Broken file, cannot read the PDF document” or something like that. They work fine in my PC (Linux, Okular PDF viewer).

Looking for additional output, I launched Documents from the console (sailfish-office), when… surprise! It opened then without trouble.

Any idea? Could it be related to some kind of cache? Rebooting does nothing. Anyway, I hope this topic is useful to anyone who gets that annoying “broken file” error.

1 Like

OK, snooping into the .desktop files related to Documents, I’ve found the problem: it’s related to Firejail permissions, of course. If I move the PDF into the Documents folder, the Documents app is able to open it, regardless of the way it’s launched.

Getting to the main problem here: if I download some PDF files into the “wrong” folder (let’s say ~/$HOME or ~/android_storage/Download, something usual when working with Android apps), Document app is still indexing them, even when they can’t be opened! I think this is pretty confusing.

3 Likes

Seems fixed:

I guess you can copy that change until the update rolls around.

4 Likes