Okular - password-protected PDF files freeze the program

When trying to open a password-protected PDF file, Okular freezes/hangs. The only message that appears in the console is:

okular 
kf.kio.core: KFileFilter::fromMimeType() called with empty input

Do you know how to fix this? Alternatively, does any other program open password-protected PDFs?

I cannot confirm. I still use Okular 23.08.5 due to Leap 15.6 (it’s the almost recent version in 16.0). I recently opened and properly viewed several password-protected PDFs. On opening them there showed up a dialogue for entering the password and then the PDF was displayed.

Unfortunately, I can’t share my password-protected files because they’re from a bank. When I have some free time, I’ll try generating one myself and see if Okular can open it.

PS.
My version of Okular: 25.08.2

On which OS are you (OS, type and version)?

You can try this site: GitHub - ArturT/Test-PDF-Files: Example PDF files. You can use them to test how your app works with encrypted, not encrypted and corrupted files.
There, you will find a regular PDF, an encrypted one, and a corrupted one. The offer is quite old, but maybe sufficient just for testing.

On opening AND viewing the encrypted PDF, I got:

gunnersson@tulicube:~/Downloads> okular encrypted.pdf 
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
Couldn't start kwalletd:  QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kwalletd5 was not provided by any .service files")
QWidget::setMinimumSize: (okular_sidebar/Sidebar) Negative sizes (0,-1) are not possible

But it displayed properly.

cat /etc/*-release
NAME="openSUSE Tumbleweed"
# VERSION="20251020"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20251020"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
# CPE 2.3 format, boo#1217921
CPE_NAME="cpe:2.3:o:opensuse:tumbleweed:20251020:*:*:*:*:*:*:*"
#CPE 2.2 format
#CPE_NAME="cpe:/o:opensuse:tumbleweed:20251020"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"

When I try open encrypted PDF:

okular 
kf.kio.core: KFileFilter::fromMimeType() called with empty input
GPL Ghostscript 10.06.0: 
   **** This file requires a password for access.
KCrash: Application 'okular' crashing... crashRecursionCounter = 2
QThreadStorage: entry 10 destroyed before end of thread 0x55c353e446d0
QThreadStorage: entry 9 destroyed before end of thread 0x55c353e446d0
QThreadStorage: entry 8 destroyed before end of thread 0x55c353e446d0
QThreadStorage: entry 2 destroyed before end of thread 0x55c353e446d0
QThreadStorage: entry 1 destroyed before end of thread 0x55c353e446d0
Aborted                    (core dumped) okular

or

okular encrypted.pdf 
KCrash: Application 'okular' crashing... crashRecursionCounter = 2
Aborted                    (core dumped) okular encrypted.pdf

I found a solution :slight_smile:

zypper rm --no-clean-deps kwalletmanager kwalletd6

Kwallet blocked chromium and okular.

Good, that it works.

Strange, this solution. On my system Okular asks on an encrypted PDF for kwallet, too. And it’s not installed. But, that it’s a stopper when installed, that is questionable I think.