Page MenuHome GnuPG

GpgEX: "Can not connect to the GnuPG user interface"
Testing, Needs TriagePublic

Description

When trying to encrypt a file via the explorer context menu "sign and encrypt" (or try any other GpgEX option) the following error message is shown in a GpgEX dialog window:

Can not connect to the GnuPG user interface:
Invalid argument

Only "About GpgEX" works.

The issue occurs only in the VSD 4.0-Beta and GPD 5.0.2.
GpgEX in Gpg4win 5.0.2. works fine.

Details

Version
gpd 5.0.2 and vsd 4.0-Beta

Event Timeline

Debug logs might help. A debug file path can be specified with the registry value "GpgEX Debug File" in the HKLM\Software\Gpg4win key.

Was Kleopatra already running? If not, does it work if Kleopatra is already running?

"Invalid argument" could mean that gpgex doesn't find gpgconf (which it needs to ask for the socket dir). gpgex looks in the following folders (relative to gpgex.dll):

  • "../GnuPG/bin/gpgconf.exe", /* GnuPG-[VS-]Desktop */
  • "../../GnuPG/bin/gpgconf.exe", /* Gpg4win. */
  • "../bin/gpgconf.exe", /* Legacy */

I think I see the problem. Actually, gpgex looks relative to the install directory of Gpg4win or GnuPG-[VS-]Desktop while the above listed relative paths assume the bin (or bin_64) folder.

This is a regression in gpgex 1.1.0 introduced with rX9c7ec74d3f79: Modernize and simplify. (the wrong relative paths were introduced much earlier, but they were never used before the mentioned commit because gpgconf.exe was always found via the install directory of GnuPG that was retrieved from the registry).

Kleopatra was running. Here the log:

ikloecker changed the task status from Open to Testing.Thu, May 7, 3:38 PM
ikloecker moved this task from Backlog to WIP on the gpd5x board.

Fixed. Requires (a release? and) an update of gpgex in all gpg4win branches that use gpgex-1.1.0.

The problem doesn't occur with Gpg4win because Gpg4win installs GnuPG next to Gpg4win (so that the relative path intended for GnuPG-[VS-]Desktop works for Gpg4win) while GnuPG-[VS-]Desktop installs GnuPG nested in Gpg4win.