"GpgME not installed correctly" error when opening regular Okular

I use Okular as my default pdf viewer on Windows, but as it is currently, it can’t be chosen as the default pdf viewer unless I direct it to the okular executable itself. During the installation of Gpg4win, I curiously and foolishly checked the experimental Okular option. After which all pdf files would open in Gpg4win’s Okular, even if I had chosen my previous okular installation before. Trying to open any files with regular Okular would result in the “GpgME not installed correctly” error.

I uninstalled and reinstalled gpp4win, this time without its version of Okular. And it seemingly fixed the problem for a while. But now all of a sudden I’m getting the GpgME error again, even though Gpg4win’s Okular isn’t installed. What can I do?

Hi @ImeRGiNF, welcome to the Gpg4win/GnuPG forum! :slight_smile:

But now all of a sudden I’m getting the GpgME error again, even though Gpg4win’s Okular isn’t installed. What can I do?

Sorry to hear that you are having problems. Which version of Okular did you install (besides the one from Gpg4win)? Where did you get it from? From here: Okular - Official app in the Microsoft Store ?

There are two things to try that I can think of without seeing the defect:
a) deinstall and reinstall your preferred Okular version
b) find the dll depencency tracker for Microsoft developers to see which version of gpgme is being looked for


Ooh, seems like that version accidentally made it to the microsoft store. It had a packaging issue which we since fixed: 476981 – Binary Factory build #1575 is missing one .exe from /bin -- Configure backend doesn't work That error with the can’t find gpgme-w32-spawn should be gone with the next Okular update to the Windows store.

Which Version of Windows are you on? On my systems I get asked when a new Version that supports the same files (.pdf) is installed which version I want to open this with. Anyhow that would be fixed by right clicking a pdf file, select open with and not chose Okular (GnuPG edition) but regular Okular. And then keep this as default from now on.

As a workaround to make the error go away you can copy “gpgme-w32-spawn.exe” from the gpg4win installation folder to the Okular installation folder under bin. Although I have no idea where Microsoft Store apps are installed.

Sorry that Okular version should not have gone into the Windows store but I guess this is all automated, but that will probably mean that a fixed version will also soon be available.

@bernhard It is totally fine and even suggested by our about dialog that if you want to have a fully featured okular to install both from the Microsoft store and ours. We even tested this and there were no conflicts. Ours is called “Okular (GnuPG Edition)” and for security reason is stripped down to only open PDFs and not to render any active content.

1 Like

I have most programs installed through Chocolatey, which I believe gets Okular from Artifacts of Okular_Release_win64 #1575 : / [Jenkins]. That version can’t be chosen as the default pdf viewer in the regular dialog and I have to find the direct okular executable for it to be included.

When Okular GnuPG was installed, it didn’t appear as a second option, it overrode the regular Okular entry in the “open with” dialog. Right now the dialog still says just “okular” and does open regular okular, just with that error

For reference this is what I get:

I’m on Windows 10 Pro 22H2.

Copying “gpgme-w32-spawn.exe” into regular Okular’s folder fixed the issue, but I’m still not sure if I should just leave it here?

From what I have gathered: Yes, just leave it there.