Every time I open KGpg (version 24.08.0, Fedora KDE 40), it shows an error that says “gpg: keydb_search_first failed: Invalid argument” and shows no keys in the main window.
I was experiencing this issue on Fedora 41. I was getting the same issue. I tried investigating by importing my keys manually, which failed. I discovered that the lock file was still there. Deleting it and restarting kgpg fixed the issue for me.
chilly@fedora:~/.gnupg/public-keys.d$ gpg2 --import *
gpg: no valid OpenPGP data found.
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
chilly@fedora:~/.gnupg/public-keys.d$ ls
pubring.db pubring.db.lock
chilly@fedora:~/.gnupg/public-keys.d$ rm pubring.db.lock
chilly@fedora:~/.gnupg/public-keys.d$ gpg2 --list-keys
[snipped]
---------
pub rsa4096 2043-11-07 [SCEAR] [expires: 2043-11-07]
1 Like