Page MenuHome GnuPG

GPGOL - Leere Nachricht kann nicht signiert werden (empty message email can't be signed or encrypted)
Open, NormalPublic

Description

gpg4win with gpgol and MS-Office worked well for quite some time.
I can't say, what happened, but since a few weeks I am no longer able to sign/encrypt email messages with outlook:
I always get the following (German) message: "An empty email can't be signed or encrypted"
I can decrypt received emails without any problem.

Notes:

  1. gdpol is reported to be responsible for a "slow start" of outlook (0.02 sec.)
  2. I've already deactivated and re-activated the GPGOL add-in in Outlook
  3. I've already re-stalled the most recent gpg4win

Details

External Link
https://wald.intevation.org/forum/forum.php?thread_id=2446&forum_id=21&group_id=11
Version
gpgol 2.5.1; gpg4win 4.0.0; outlook version 2203 Gpg4win 4.0.2

Revisions and Commits

Event Timeline

aheinecke added a subscriber: aheinecke.

Could you please create a log file using the debug settings with Outlook Object Model debugging enabled?

I suspect that there is a conflict with another Addin causing us not to be able to access the mail body, so you could also try to disable other plugins in Outlook

I had already tried both, to deselct all other add-ins and to select all possible add-ins.
No change of the behaviour.

I've selected logging standard + Outlook API, but system does not create any log file.
I've closed and re-opened Outlook ... the same ... no log.

Have you selected an Output file in a location where you can write files with your permissions?

Hat sich das Problem gelöst? Bei mir tritt das seit gestern auf auf. Ich kann nichts mehr signieren oder verschlüsseln. andere Plugins habe ich deaktiviert, es beliebt trotzdem.

Has the problem resolved? This has been happening to me since yesterday. I can no longer sign or encrypt anything. I disabled other plugins, but it's still popular.

No, unfortunatelly problem is still existing.

This comment was removed by Diedrichs.

I've tried a few things now. Reinstalled Office, reinstalled GPG4win, reset Windows 11 with recovery when still worked. Nothing helped.

Finally I tried all GPG4Win backwards. With version gpg4win 3.1.5-1 I can sign and encrypt again.

Was there an Office update that gpg4win can't handle? Or where is the mistake?

Ich habe jetzt einiges probiert. Office neu installiert, GPG4win neu installiert, Windows 11 mit der Wiederherstellung zurückgesetzt, als noch ging. Nichts hat geholfen.

Schließlich habe ich alle GPG4Win nach "rückwärts" ausprobiert. Mit der Version gpg4win 3.1.5-1 kann ich wieder signieren und verschlüsseln.

Ob es eine Office-update gab, mit der gpg4win nicht zurecht kommt? Oder wo liegt der Fehler?

Thank's Diedrichs for this hint.
Here it works again using Gpg4win V.3.1.15.

3.1.16, 4.0.0 and 4.0.2 do not work.

There is likely some issue/problem with Gpg4win versions newer than 3.1.15 and MS-Outlook.

Will anybody take care of this issue and fix it for newer versions?

Thanks for the log and the analysis so far. In the log it is visible that the problem is that gpgol cannot create a temporary file to store the mails contents. Due to this it fails later as it has no data to encrypt. The storage as a temporary file was added in 3.1.16 to allow more embedded outlook objects since we now ask Outlook to first serialize the file. I wonder why this only occurs to very few people. Obviously it works for most people, including me.

Could you please make one more test and enable data debugging. Then afterward look into the log file and post here the lines above "Could not get a name out of 100 tries" I am interested in the candidate names and also please then check if those files really exist and if so try to remove them.

Currently its pseudonomized:
{{{
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_96': Die Datei ist vorhanden. (80)
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_97': Die Datei ist vorhanden. (80)
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_98': Die Datei ist vorhanden. (80)
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_99': Die Datei ist vorhanden. (80)
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_100': Die Datei ist vorhanden. (80)
14:17:51/3544/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_101': Die Datei ist vorhanden. (80)
}}}

Please find the requested log attached.
I don't know, where to look for such a file (candidate).

Log has been made using 3.1.16.

bernhard renamed this task from GPGOL - Leere Nachricht kann nicht signiert werden to GPGOL - Leere Nachricht kann nicht signiert werden (empty message email can't be signed or encrypted).Jul 12 2022, 10:00 AM
bernhard changed Version from gpgol 2.5.1; gpg4win 4.0.0; outlook version 2203 to gpgol 2.5.1; gpg4win 4.0.0; outlook version 2203 Gpg4win 4.0.2.
bernhard set External Link to https://wald.intevation.org/forum/forum.php?thread_id=2446&forum_id=21&group_id=11.Jul 12 2022, 10:02 AM

This was reported again in T6158. The problem is still that I have not seen a log with Data debugging enabled. @SPYazdani could you maybe create one? Please enable logging and check the box below the logging filename where it says "Include Mail contents (decrypted!) and meta information." and then you might afterward look into the log file and post here the lines above "Could not get a name out of 100 tries" I am interested in the candidate names and also please then check if those files really exist and if so try to remove them.

@SPYazdani But your log is also without the Data information. The issue is that I see the Problem that it tries to aquire a temporary file name and fails to get one. Then it runs into an unexpected state. But gpgol_string_107 is the pseudonomized debug output of the filename. Because the filename would include your username. And I need to see what GpgOL tries there and why this would fail.

04:27:58/14476/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_105': The file exists. (80)
04:27:58/14476/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_106': The file exists. (80)
04:27:58/14476/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_107': The file exists. (80)
04:27:58/14476/common.cpp:get_tmp_outfile: Failed to open candidate 'gpgol_string_108': The file exists. (80)
04:27:58/14476/ERROR/common.cpp:get_tmp_outfile: Could not get a name out of 100 tries
04:27:58/14476/mail.cpp:updateOOMData_o:2161:UNEXPECTED
04:27:58/14476/keycache.cpp:isMailResolvable: Mail has no sender or no recipients.

Please, Last chance to add a log with Included file names (Include data checkbox) before the next release. Me and a colleague reviewed the function and don't find an issue with it. Otherwise I will only add a MessageBox error in that case for the next release.

If you do not want to publish it send it to aheinecke@gnupg.org encrypted. My key is: https://heinecke.or.at/pgpkey.asc

strange, I have not received one. Did it bounce somewhere maybe because of size? Encryption should compress this though.

I have produced a log using 4.0.3.
See attached.

... Logging active, standard, with email content and meta information

Thanks a lot. Due to your log I have tried with a long username and umlauts and a dot in my username. My test name was Längül!ödiföäada.dad which is the longest that Windows allows. But It still works for me. Even if I create one or two gpgol_enc.dat files in %TEMP% It still works:

12:31:10/1100/DBG_DATA/common.cpp:get_tmp_outfile: Attachment candidate is C:\Users\LNGL!D~1.DAD\AppData\Local\Temp\gpgol_enc.dat
12:31:10/1100/common.cpp:get_tmp_outfile: Failed to open candidate 'C:\Users\LNGL!D~1.DAD\AppData\Local\Temp\gpgol_enc.dat': Die Datei ist vorhanden. (80)
12:31:10/1100/common.cpp:get_tmp_outfile: Failed to open candidate 'C:\Users\LNGL!D~1.DAD\AppData\Local\Temp\gpgol_enc_1.dat': Die Datei ist vorhanden. (80)
12:31:10/1100/mail.cpp:updateOOMData_o:Enable pass write for mail serialisatio

The only thing I can think of is that somehow there are really a hundred gpgol_enc_x.dat files in c:\users\yourusername\AppData\Local\Temp but the files were also correctly deleted for me as GpgOL only opens them with the temporary flag.

I will add some more debug code / error handling for the next version but I don't see more that I can do.

It's strange that the problem only occurs locally on one machine. I set up a test bench and did not experience the same errors as before.

Question: Do other encryption tools, such as Bitlocker interfere with gpgol.dll to read/write to the drive?

I had a look into my \AppData\Local\Temp and found some 10,000 Files/Folders (nearly 100,000 files in total) with over 10 GB.
After deleting most of them, GPG4WIN 4.0.3 is working!

Ok. So I never assumed that you had actually 100 gpgol_enc_number.dat files lying around.

So the next question ist: Why! Because otherwise you will run into this issue after the next 100 mails again.

Can you please confirm for me that in the log you now see after an encryption "Failed to delete file ..." ?
Because right after we use the temporary file we delete it again and it somehow seems that the deletion does not work on your system. What kind of Anti Virus Software do you have in stalled? Maybe it tries to open the file and then the File is in use? This would also explain why your temporary storage was so huge if other software had that problem, too. (BTW have you disabled Storage Sense by choice or does it also not clean up for you? https://support.microsoft.com/en-us/windows/manage-drive-space-with-storage-sense-654f6ada-7bfc-45e5-966b-e24aded96ad5 )

Sorry for the confusion ...
There was no single gpgol-File for deletion.
There were 100.000 other files from other programs.
No idea, why this has interferred with gpgol, but it obviously has.