Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mxmehl opened this issue Jul 12, 2019 · 9 comments
Open

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

mxmehl opened this issue Jul 12, 2019 · 9 comments

Comments

@mxmehl
Copy link
Contributor

mxmehl commented Jul 12, 2019

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: 1562936644.ft2otdf11o.2220@fsfe.org, 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: 1562936644.ft2otdf11o.2220@fsfe.org, 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/1562936644.ft2otdf11o.2220@fsfe.org
[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] max.mehl@fsfe.org 
[15:06:59] [0x00007f0373b59c00] [M] [debug] user@domain.com 
[15:06:59] [0x00007f0373b59c00] [M] [debug] crypto: failed to encrypt message: Could not list keys for "user@domain.com": 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 "user@domain.com": 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 "user@domain.com": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set warning: Failed encrypting: Could not list keys for "user@domain.com": 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 "user@domain.com": 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: 1562936644.ft2otdf11o.2220@fsfe.org, 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: 1562936644.ft2otdf11o.2220@fsfe.org
[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: 1562936644.ft2otdf11o.2220@fsfe.org
[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: 1562936644.ft2otdf11o.2220@fsfe.org, 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: 1562936644.ft2otdf11o.2220@fsfe.org, 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: 1562936644.ft2otdf11o.2220@fsfe.org: 0
[15:06:59] [0x00007f35babeb440] [E] [debug] focus done.
[15:06:59] [0x00007f35babeb440] [E] [debug] scrolling to: message_1562936644.ft2otdf11o.2220@fsfe.org
[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: 1562936644.ft2otdf11o.2220@fsfe.org, 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: 1562936644.ft2otdf11o.2220@fsfe.org, e: 0
[15:06:59] [0x00007f0373b59c00] [M] [debug] em: set warning (ready: true): Failed encrypting: Could not list keys for "user@domain.com": End of file
[15:06:59] [0x00007f0373b59c00] [M] [debug] tv: set warning: Failed encrypting: Could not list keys for "user@domain.com": 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 "user@domain.com": 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: 1562936644.ft2otdf11o.2220@fsfe.org, 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
Copy link
Contributor Author

mxmehl commented Aug 1, 2019

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...

@gauteh
Copy link
Member

gauteh commented Aug 1, 2019

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

@mxmehl
Copy link
Contributor Author

mxmehl commented Aug 9, 2019

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
Copy link
Contributor Author

mxmehl commented Aug 9, 2019

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.

@ghost
Copy link

ghost commented Sep 6, 2019

@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.

@mxmehl
Copy link
Contributor Author

mxmehl commented Sep 9, 2019

@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...

@bernhardreiter
Copy link

@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.

@mxmehl
Copy link
Contributor Author

mxmehl commented Mar 3, 2020

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.

@bernhardreiter
Copy link

bernhardreiter commented Mar 3, 2020

It is meanwhile a confirmed GMime issue (jstedfast/gmime#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants