astroid icon indicating copy to clipboard operation
astroid copied to clipboard

"Could not list keys [...] End of file" when encrypting email

Open mxmehl opened this issue 5 years ago • 9 comments

After starting to use notmuch/astroid compiled with Gmime3, I start to get an error with encrypting an email to a recipient whom I wrote many encrypted emails before, and whose key has not been changed since then.

This happens both in current master as well as with the fixed version for Gmime #644 (see also #638).

It seems to be related to the used key since others do work. The only difference I can see is that the key has no expiry date. Here's the key of the person to test it.

Below the log of what happens when I try to encrypt the message in the "New message" window.

[15:06:58] [0x00007f0373b59c00] [M] [debug] mw: set active: 1, current: 1
[15:06:58] [0x00007f0373b59c00] [M] [debug] mw: focus-in: 1 active: true, in_quit: false
[15:06:59] [0x00007f0373b59c00] [M] [debug] got sig: true
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: preparing message from fields..
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: prepare message done.
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: reading edited message..
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set warning (ready: true): 
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Info
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 39 of 39 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35babeb440] [E] [debug] hide warning.
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.

[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0

[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set info (ready: true): Edit message with 'Enter'.
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set info: Edit message with 'Enter'.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Info
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 67 of 67 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] set info: Edit message with 'Enter'.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.

[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.

[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: initialize..
[15:06:59] [0x00007f0373b59c00] [M] [info] msg: loading message from file (mid supplied): /home/max/.cache/astroid/[email protected]
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk (50): content-type: text/plain
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: preferred.
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: is part (viewable: true, attachment: false) 
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: body: part
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: plain text (out html: false)
[15:06:59] [0x00007f0373b59c00] [M] [warning] charset: not defined.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ms: deconstruct
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: deconstruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] same account: true
[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: build..
[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: adding inline signature from: /home/max/.config/astroid/signature.txt
[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: finalize..
[15:06:59] [0x00007f0373b59c00] [M] [debug] crypto: gpg: gpg2
[15:06:59] [0x00007f0373b59c00] [M] [debug] cr: encrypting for: 
[15:06:59] [0x00007f0373b59c00] [M] [debug] [email protected] 
[15:06:59] [0x00007f0373b59c00] [M] [debug] [email protected] 
[15:06:59] [0x00007f0373b59c00] [M] [debug] crypto: failed to encrypt message: Could not list keys for "[email protected]": End of file

(astroid:19940): gmime-CRITICAL **: 15:06:59.696: g_mime_message_set_mime_part: assertion 'GMIME_IS_OBJECT (mime_part)' failed

(astroid:19940): GLib-GObject-CRITICAL **: 15:06:59.696: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[15:06:59] [0x00007f0373b59c00] [M] [error] cm: failed encrypting or signing: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] crypto: deconstruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set warning (ready: true): Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set warning: Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Info
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 118 of 118 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] set warning: Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.

[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.

[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: wrote to stream.
[15:06:59] [0x00007f0373b59c00] [M] [info] msg: loading message from GMimeStream.
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk (52): content-type: text/plain
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: preferred.
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: is part (viewable: true, attachment: false) 
[15:06:59] [0x00007f0373b59c00] [M] [debug] mt: destruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: clear messages..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: ClearMessages
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 2 of 2 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] clearing all messages.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 17 of 17 bytes.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f0373b59c00] [M] [debug] render: html loaded, building messages..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ms: deconstruct
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: deconstruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: deconstruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] crypto: deconstruct.
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: adding message: [email protected]
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: body: part
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: plain text (out html: false)
[15:06:59] [0x00007f0373b59c00] [M] [debug] enc: quoted-printable
[15:06:59] [0x00007f0373b59c00] [M] [debug] charset: utf-8
[15:06:59] [0x00007f0373b59c00] [M] [debug] create message part: 52 (siblings: 0) (kids: 0) (attachment: false) (viewable: true) (mimetype: text/plain)
[15:06:59] [0x00007f0373b59c00] [M] [info] chunk: contents: loaded 196 bytes in 0.021 ms.
[15:06:59] [0x00007f0373b59c00] [M] [info] chunk: file size: 196 (time used to calculate: 0.058 s.)
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: body: part
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: plain text (out html: true)
[15:06:59] [0x00007f0373b59c00] [M] [debug] enc: quoted-printable
[15:06:59] [0x00007f0373b59c00] [M] [debug] charset: utf-8
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: body: part
[15:06:59] [0x00007f0373b59c00] [M] [debug] chunk: plain text (out html: false)
[15:06:59] [0x00007f0373b59c00] [M] [debug] enc: quoted-printable
[15:06:59] [0x00007f0373b59c00] [M] [debug] charset: utf-8
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: AddMessage
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 672 of 672 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35babeb440] [E] [debug] adding message: [email protected]
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] create message part: 52 (siblings: false) (kids: 0) (attachment: false) (viewable: true) (focusable: false) (mimetype: text/plain)
[15:06:59] [0x00007f35babeb440] [E] [debug] create body part: 52
[15:06:59] [0x00007f35babeb440] [E] [debug] create_body_part done.
[15:06:59] [0x00007f35babeb440] [E] [debug] request: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAA..
[15:06:59] [0x00007f35babeb440] [E] [debug] request: allow.
[15:06:59] [0x00007f35babeb440] [E] [debug] request: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAA..
[15:06:59] [0x00007f35babeb440] [E] [debug] request: allow.
[15:06:59] [0x00007f35babeb440] [E] [debug] message added.
[15:06:59] [0x00007f35babeb440] [E] [debug] focusing: : -1
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 17 of 17 bytes.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: , e: -1
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: sending state..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: State
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 70 of 70 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] set iframe src: [email protected], 52
[15:06:59] [0x00007f35babeb440] [E] [debug] got state.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 17 of 17 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: , e: -1
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: sending indent..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Indent
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 12 of 12 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] update indent.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 17 of 17 bytes.[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.

[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: , e: -1
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: set hidden state
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Hidden
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 37 of 37 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] set hidden
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 17 of 17 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: , e: -1
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: focus message: [email protected], element: 0
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Navigate
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 41 of 41 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] navigating, type: Element
[15:06:59] [0x00007f35babeb440] [E] [debug] focusing: [email protected]: 0
[15:06:59] [0x00007f35babeb440] [E] [debug] focus done.
[15:06:59] [0x00007f35babeb440] [E] [debug] scrolling to: [email protected]
[15:06:59] [0x00007f35babeb440] [E] [debug] navigation done.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0
[15:06:59] [0x00007f0373b59c00] [M] [info] tv: ready emitted.
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: got tv ready.
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set info (ready: true): Edit message with 'Enter'.
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set info: Edit message with 'Enter'.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Info
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 67 of 67 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35babeb440] [E] [debug] set info: Edit message with 'Enter'.
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.

[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set warning (ready: true): Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set warning: Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: sending: Info
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for lock..
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) lock acquired.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: wrote: 118 of 118 bytes.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) waiting for ACK..
[15:06:59] [0x00007f35b0c68700] [E] [debug] reader waiting..
[15:06:59] [0x00007f35babeb440] [E] [debug] set warning: Failed encrypting: Could not list keys for "[email protected]": End of file
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: sending: Ack
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) waiting for lock
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: wrote: 43 of 43 bytes.
[15:06:59] [0x00007f35babeb440] [E] [debug] ae: send (async) message sent.
[15:06:59] [0x00007f0373b59c00] [M] [debug] ae: send (sync) ACK received.
[15:06:59] [0x00007f0373b59c00] [M] [debug] pc: got ack (s: true) , focus: [email protected], e: 0
[15:06:59] [0x00007f0373b59c00] [M] [debug] cm: deinitialized.
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: decide policy
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: decide policy
[15:06:59] [0x00007f35babeb440] [E] [debug] request: about:srcdoc..
[15:06:59] [0x00007f35babeb440] [E] [debug] request: blocked.

mxmehl avatar Jul 12 '19 13:07 mxmehl

It does not seem that the expiration date is the issue, I tested it with other keys as well.

Does someone have an idea? I cannot send encrypted emails to some people, that's really bad...

mxmehl avatar Aug 01 '19 07:08 mxmehl

It seems to be an error propagated from the gpgme library, looks like debug info can be increased with: https://gnupg.org/documentation/manuals/gpgme/Debugging.html

gauteh avatar Aug 01 '19 09:08 gauteh

Sorry, I fail to get the debug output. I tried GPGME_DEBUG=9 astroid and also exporting GPGME_DEBUG before executing, but I don't get any output, also if I provide a log file location.

Where would I have to set this to receive the full debug information?

mxmehl avatar Aug 09 '19 17:08 mxmehl

OK, nevermind, I tried a few times, also with bash instead of my fish shell, and magically it worked. Will send you the log privately as it contains quite some private information.

mxmehl avatar Aug 09 '19 17:08 mxmehl

@mxmehl Did you solve this? I see the same issue. I can encrypt on the command line with the key that Astroid reports it can't list.

ghost avatar Sep 06 '19 21:09 ghost

@mxmehl Did you solve this? I see the same issue. I can encrypt on the command line with the key that Astroid reports it can't list.

I had this problem only with one key. I solved it by editing the key manually (--edit-key) and removing all expired subkeys (like explained here).

No good solution, but I didn't have the time to debug it properly...

mxmehl avatar Sep 09 '19 12:09 mxmehl

@mxmehl can you send the debug output to me as well?

Starting to simplify problem case

https://github.com/astroidmail/astroid/blob/master/src/crypto.cc#L266 outputs "crypto: failed to encrypt message: ", this comes from the call of g_mime_multipart_encrypted_encrypt() which is (in Version 3 of Gmime calls the Gmime), so we have a defect there, the next step of reporting would be a test case for Gmime.

bernhardreiter avatar Mar 03 '20 13:03 bernhardreiter

Ironically, I cannot send it to you as encrypted mail as your key also throws the same error. But I've sent you the encrypted file instead.

Astroid also seems to throw the same error if the full key is expired.

mxmehl avatar Mar 03 '20 13:03 mxmehl

It is meanwhile a confirmed GMime issue (https://github.com/jstedfast/gmime/issues/88).

For additional explanation: the message End of file comes from gpgme, but is an expected state if all keys have been read. GMime's code misses to find the first usable subkey for encryption and thus fails.

bernhardreiter avatar Mar 03 '20 16:03 bernhardreiter