Prescient Analytics

GnuGPG - How to fix gpg: handle plaintext failed: General error

23/01/2019 08:34 AM Comment(s) By kpauligk

[Note: this issue occured using GPG4Win 2.2.5 in an Azure Function App environment]


I recently encountered a frustrating, albeit minor, issue. A Powershell Script process that was running on as an Azure Function App, started throwing an error gpg: handle plaintext failed: General error


A quick Google search of the error message did not reveal much, though the first result did refer to filenames potentially being a cause.


The frustrating part was that it was working correctly previously, and on my local environment there was no issue in the command I was using: bin\gpg.exe -v --batch --output d:\home\download\files\file_07112018.zip --decrypt D:\home\download\files\file_07112018.zip.gpg


Long story (of trying error logging, different switches etc) short, I altered the output filename and placed an underscore suffix and magically it worked! A guess is a conflict between the filename set in the encrypted file since it was the same as I was trying to output.


Hope this helps someone!

kpauligk

Share -