Menu

#127 Cannot find gpg-agent on Windows with gpg4win

fixed
nobody
None
1.5.1
Major
17.0.4
2.0.14
Windows
1.5.2
nobody
2013-11-12
2013-03-12
Chris J
No

Found (and fixed) bug in enigmail.js - isDosLike not working. Would appreciate this being rolled in to the final version :-)

Basically isDosLike seems to be failing in resolveAgentPath(), with the result that it wasn't appending ".exe" onto the end of the filename. I've fixed on my machine as follows:

  //if (gEnigmailSvc.isDosLike) {
  if (Ec.isDosLike()) {
    fileName += ".exe";
  }
  Ec.DEBUG_LOG("enigmail.js: resolveAgentPath - searching for " + fileName + "\n");

...don't know if there's a "better" way that fixes gEnigmailSvc.

Background info and trace extracts:

UI error message: Could not start the gpg-agent program which is needed for your GnuPG version 2.0.14".

After switching on logging, I see this in the log:
[...]
2013-03-12 23:13:01.478 [DEBUG] enigmail.js: detected GnuPG version '2.0.14'
2013-03-12 23:13:01.478 [DEBUG] enigmail.js: detectGpgAgent
2013-03-12 23:13:01.478 [DEBUG] enigmail.js: detectGpgAgent: no GPG_AGENT_INFO variable set
2013-03-12 23:13:01.478 [DEBUG] enigmail.js: ResolvePath: filePath=gpg-connect-agent
2013-03-12 23:13:01.479 [DEBUG] enigmail.js: ResolvePath: checking for C/gpg-connect-agent
[...]

The lack of a ".exe" suffix on the ResolvePath line pointed me in the right direction. Following the change I've made above, it now looks like this:

[...]

2013-03-12 23:34:11.835 [DEBUG] enigmail.js: detected GnuPG version '2.0.14'
2013-03-12 23:34:11.835 [DEBUG] enigmail.js: detectGpgAgent
2013-03-12 23:34:11.836 [DEBUG] enigmail.js: detectGpgAgent: no GPG_AGENT_INFO variable set
2013-03-12 23:34:11.836 [DEBUG] enigmail.js: resolveAgentPath - searching for gpg-connect-agent.exe
2013-03-12 23:34:11.836 [DEBUG] enigmail.js: detectGpgAgent: gpg-connect-agent is executable
[...]

...and message encryption/signing works sucessfully.

Discussion

  • Patrick Brunschwig

    Thanks, that's a bug indeed. I'll apply the patch (I found one more occurrence of the same error just a few lines further down).

     
  • Patrick Brunschwig

    • status: open --> fixed
    • fixed: --- --> 1.5.2
     

Log in to post a comment.