I feel like this has come up before, but I tried searching Google, the support forum on SourceForge, and the mailing list, but couldn't find a match so I have to ask for help.
I previously had success using Windows Thunderbird + GnuPG + Enigmail, but then "something broke" and I was without GnuPG for a while; eventually I reinstalled the OS and GnuPG started working again but Enigmail is giving me a few errors that I think are all related to the same root cause.
SYMPTOM #1: When I go to menu option "Enigmail | About Enigmail" I first receive this error:
Enigmail: Error in accessing Enigmail service
In order to use Enigmail, GnuPG is required. If you did not install GnuPG yet, the easiest way to do this is using the "Setup Wizard" button below."
SYMPTOM #2: When I dismiss the dialog, the "About Enigmail" window appears:
Running Enigmail version 1.9.6.1 (20161116-1713)
ERROR: Failed to access Enigmail core service!
SYMPTOM #3: When I go to menu option "Enigmail | Setup Wizard," regardless of whether I select the standard/extended/manual configuration, I am taken to the "GnuPG Required" screen ("The wizard tried to locate the GnuPG executable, but it could not be found.") When I use the "Browse" button to locate the GnuPG binary, it says that the file selected (C:\Program Files (x86)\GNU\GnuPG\gpg2.exe) is "not a GnuPG executable."
WHAT I TRIED:
I tried looking at the logs (inline, at bottom) for errors, but it looks like it DOES find the binary, and I see no 'ERROR' or 'WARN' level messages.
I also tried uninstalling the Enigmail plugin folder from my Thunderbird profile (plus manually deleting the remaining folder), but my settings persisted after reinstalling, so it's possible that some old installation data is causing a problem, but I haven't figured out where it might be coming from yet.
I saw a post that there can be errors if the wrong key is configured under the account settings (although that would seem to assume that Enigmail was running) so I went in to the account settings and updated the key to use, but that did not help (though it's further evidence that old configuration data is being persisted).
I considered that the whitespace in the default path name to the GnuPG binary is causing problems, but the timestamp below at 2017-02-05 07:04:17.651 shows it is quoting the full pathname of the file, so I ASSUME (which may be wrong) that this is not the problem...
Found post at https://sourceforge.net/p/enigmail/forum/support/thread/e6db078d/ ("Enigmail fails to find gnupg executable ") but that's Linux. I tried to use the nightly build that was linked as a fix (https://www.enigmail.net/download/nightly/enigmail-nightly-1.9.6.1.xpi) even though it looks like the same version as what was installed, but it did not fix the problem.
ENVIRONMENT
Windows 7
Thunderbird (45.7.0 in this particular case)
Enigmail 1.9.6.1
Gpg4win 2.3.3 (gpg 2.0.30)
----->8===== ENIGMAIL DEBUG LOG (BEGIN CUT AND PASTE) =====8<-----
Unfortunately that did not work either, I got the same error about not being a GnuPG executable file. :-(
Glancing at the log, I still don't see any warnings or errors. Is there something else I can try? (My inclination at this point would be to do another "clean uninstall", removing all traces of it and trying again, but when I tried that before it still retained settings between attempts, so I don't think I did it right.)
Thanks,
-Neil R.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately, neither of these options helped either: I've been closing and reopening Thunderbird with every attempt, and changing the "Additional settings" parameter to --homedir G: from --homedir g:/ didn't help. New log attached (produced by opening Thunderbird, making the requested change, closing, re-opening, going to Enitmail | Debugging Options | View Log | Save to file).
Your GNUPGHOME is still wrong. It must be "g:\". "g:/" will not work, and "g:" will not work either. Please change your GNUPGHOME environment variable and restart Thunderbird afterwards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My apologies, I thought you were referring to the --homedir option within the Enigmail preferences, not the GNUPGHOME environment variable.
Per your instructions, I:
Changed the GNUPGHOME environment variable to be g:\
Restarted Thunderbird
Opened Enigmail preferences (Enigmail | Preferences)
Navigated to the "Basic" tab (which now says "GnuPG was found in C:\Program Files (x86)\GNU\GnuPG\pub\gpg2.exe"!) and cleared the 'Override with' checkmark and value
Navigated to the Advanced tab and cleared the --homedir G: from the "Additional parameters for GnuPG" field
Restarted Thunderbird again
Success! Thank you!!!
As some follow-up testing, I closed Thunderbird, changed the environment variable back to g:/ from g:\ and when I restarted Thunderbird, it again reported that it could not find the GnuPG executable.
As a second test, I changed the GNUPGHOME environment variable and got the following results (restarting Thunderbird after every change):
GNUPGHOME
Enigmail finds GnuPG binary
c:\does_not_exist
Yes
c:\does_not_exist\
Yes
g:
Yes
g:\
Yes
g:/
No
To me this all suggests there are two bugs, but before filing would like to get your thoughts:
Inability to access GNUPGHOME directory (when pointing at a removable drive?) causes Enigmail to fail, reporting that it cannot find the GnuPG binary.
Enigmail on Windows does not recognize Linux-style path separators for GNUPGHOME, even though GnuPG itself does.
To confirm #2 I performed the following test:
C:\notused\daily\1>type testall.cmd
@echo off@for %%d in (c:\does_not_exist c:\does_not_exist\ g: g:\ g:/) do ( set GNUPGHOME=%%d echo GNUGPGHOME set to !GNUPGHOME! gpg --list-keys 2>nul | find "E098F32E" echo Loop end.)C:\notused\daily\1>testall.cmd
GNUGPGHOME set to c:\does_not_existLoop end.GNUGPGHOME set to c:\does_not_exist\Loop end.GNUGPGHOME set to g:pub 1024D/E098F32E 2004-06-05Loop end.GNUGPGHOME set to g:\pub 1024D/E098F32E 2004-06-05Loop end.GNUGPGHOME set to g:/pub 1024D/E098F32E 2004-06-05Loop end.C:\notused\daily\1>
To me, this seems pretty conclusive that GnuPG (on Windows) does not care if GNUPGHOME is set to use g:, g:\ (Windows-style) or g:/ (Linux-style). Maybe I'm missing something though, so I'll wait a day or so to see if there are any objections before I create bug reports for these two issues.
Thanks again for your help, I'm really happy to have Enigmail working again! :-)
-Neil R.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Enigmail on Windows does not recognize Linux-style path
separators for GNUPGHOME, even though GnuPG itself does.
To be pedantic, GnuPG really doesn't. Path separators are a OS issue.
Don't use UNIX-style path separators on Windows. That makes about as much
sense as trying to run a UNIX binary on Windows. The two operating systems
are different.
Under Windows the path separator is a backslash, except that sometimes
(usually but not always) it will accept a forward separator. The particular
rules on when it's allowed have changed considerably in the last decade.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is that GnuPG reports an errror to Enigmail if you provide an invalid value for the home directory name to GnuPG. And it seems that invalid does not mean "not existing" but really an invalid value. GnuPG on Windows only accepts backslash for directory names; forward slashes will always cause GnuPG to fail for every type of operation.
We can argue that Enigmail improperly reports that it cannot find GnuPG, but it remains a fact that the only way to determine if GnuPG is found successfully is to run "gpg --version" and expect a non-error exit status.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
I feel like this has come up before, but I tried searching Google, the support forum on SourceForge, and the mailing list, but couldn't find a match so I have to ask for help.
I previously had success using Windows Thunderbird + GnuPG + Enigmail, but then "something broke" and I was without GnuPG for a while; eventually I reinstalled the OS and GnuPG started working again but Enigmail is giving me a few errors that I think are all related to the same root cause.
SYMPTOM #1: When I go to menu option "Enigmail | About Enigmail" I first receive this error:
SYMPTOM #2: When I dismiss the dialog, the "About Enigmail" window appears:
SYMPTOM #3: When I go to menu option "Enigmail | Setup Wizard," regardless of whether I select the standard/extended/manual configuration, I am taken to the "GnuPG Required" screen ("The wizard tried to locate the GnuPG executable, but it could not be found.") When I use the "Browse" button to locate the GnuPG binary, it says that the file selected (
C:\Program Files (x86)\GNU\GnuPG\gpg2.exe
) is "not a GnuPG executable."WHAT I TRIED:
ENVIRONMENT
----->8===== ENIGMAIL DEBUG LOG (BEGIN CUT AND PASTE) =====8<-----
----->8===== ENIGMAIL DEBUG LOG (END CUT AND PASTE) =====8<-----
Any help would be greatly appreciated. Thanks!
-Neil R.
You are pointing Enigmail to the wrong executable. Gpg4win installs a wrapper called gpg2.exe, which is not gpg2 (but some gpg4win internal tool).
You need to point Enigmail to:
Unfortunately that did not work either, I got the same error about not being a GnuPG executable file. :-(
Glancing at the log, I still don't see any warnings or errors. Is there something else I can try? (My inclination at this point would be to do another "clean uninstall", removing all traces of it and trying again, but when I tried that before it still retained settings between attempts, so I don't think I did it right.)
Thanks,
-Neil R.
You set your GnuPG homedir to g:/ but I don't think that this would work. If you're on Windows, it needs to be G:.
The log doesn't display any error. How about simply restarting Thunderbird?
Unfortunately, neither of these options helped either: I've been closing and reopening Thunderbird with every attempt, and changing the "Additional settings" parameter to
--homedir G:
from--homedir g:/
didn't help. New log attached (produced by opening Thunderbird, making the requested change, closing, re-opening, going to Enitmail | Debugging Options | View Log | Save to file).I tried this on Windows.
Your GNUPGHOME is still wrong. It must be "g:\". "g:/" will not work, and "g:" will not work either. Please change your GNUPGHOME environment variable and restart Thunderbird afterwards.
My apologies, I thought you were referring to the
--homedir
option within the Enigmail preferences, not theGNUPGHOME
environment variable.Per your instructions, I:
GNUPGHOME
environment variable to beg:\
--homedir G:
from the "Additional parameters for GnuPG" fieldSuccess! Thank you!!!
As some follow-up testing, I closed Thunderbird, changed the environment variable back to
g:/
fromg:\
and when I restarted Thunderbird, it again reported that it could not find the GnuPG executable.As a second test, I changed the
GNUPGHOME
environment variable and got the following results (restarting Thunderbird after every change):GNUPGHOME
c:\does_not_exist
c:\does_not_exist\
g:
g:\
g:/
To me this all suggests there are two bugs, but before filing would like to get your thoughts:
GNUPGHOME
directory (when pointing at a removable drive?) causes Enigmail to fail, reporting that it cannot find the GnuPG binary.GNUPGHOME
, even though GnuPG itself does.To confirm #2 I performed the following test:
To me, this seems pretty conclusive that GnuPG (on Windows) does not care if
GNUPGHOME
is set to useg:
,g:\
(Windows-style) org:/
(Linux-style). Maybe I'm missing something though, so I'll wait a day or so to see if there are any objections before I create bug reports for these two issues.Thanks again for your help, I'm really happy to have Enigmail working again! :-)
-Neil R.
To be pedantic, GnuPG really doesn't. Path separators are a OS issue.
Don't use UNIX-style path separators on Windows. That makes about as much
sense as trying to run a UNIX binary on Windows. The two operating systems
are different.
Under Windows the path separator is a backslash, except that sometimes
(usually but not always) it will accept a forward separator. The particular
rules on when it's allowed have changed considerably in the last decade.
The problem is that GnuPG reports an errror to Enigmail if you provide an invalid value for the home directory name to GnuPG. And it seems that invalid does not mean "not existing" but really an invalid value. GnuPG on Windows only accepts backslash for directory names; forward slashes will always cause GnuPG to fail for every type of operation.
We can argue that Enigmail improperly reports that it cannot find GnuPG, but it remains a fact that the only way to determine if GnuPG is found successfully is to run "gpg --version" and expect a non-error exit status.