pixelated / pixelated-user-agent

User facing components of Pixelated: a JavaScript single page app and a RESTful service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EncryptError when trying to send emails

tuliocasagrande opened this issue · comments

We are getting this leap.bitmask.keymanager.errors.EncryptError, when trying to send emails to recipients that are apparently with expired keys.

For one of those, we're sure they renewed their key, but the nickname has a dot in the middle. So this could be the cause of not propagating the new key to remote.

For the other user, we're not sure whether they renewed their key or not.

This the log for the user with dot:

. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: 2017-02-23 17:46:46 [leap.bitmask.keymanager.openpgp] DEBUG [GNUPG:] GOOD_PASSPHRASE
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: gpg: <recipient2.with.dots public key>: skipped: unusable public key
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: [GNUPG:] INV_RECP 0 <recipient2.with.dots public key>
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: gpg: [stdin]: sign+encrypt failed: unusable public key
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: 2017-02-23 17:46:46 [leap.bitmask.keymanager.openpgp] WARN Failed to encrypt: Failed to encrypt/decrypt: [GNUPG:] GOOD_PASSPHRASE
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: gpg: <recipient2.with.dots public key>: skipped: unusable public key
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: [GNUPG:] INV_RECP 0 <recipient2.with.dots public key>
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: gpg: [stdin]: sign+encrypt failed: unusable public key
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: .
C Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: 2017-02-23 17:46:46 [leap.bitmask.mail.outgoing.service] ERROR [Failure instance: Traceback: <class 'leap.bitmask.keymanager.errors.EncryptError'>:
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:434:errback
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:501:_startRunCallbacks
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:588:_runCallbacks
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1184:gotResult
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: --- <exception caught here> ---
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1126:_inlineCallbacks
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/failure.py:389:throwExceptionIntoGenerator
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/src/leap.bitmask/src/leap/bitmask/keymanager/__init__.py:512:encrypt
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1128:_inlineCallbacks
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: /usr/share/python/pixelated-user-agent/src/leap.bitmask/src/leap/bitmask/keymanager/openpgp.py:677:encrypt
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: ]
. Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: Error while formatting log event: KeyError(u"u'recipient1@domain",)
C Feb 23 17:46:46 pixelated pixelated-user-agent[20837]: Original event: {'log_namespace': 'pixelated.resources.mails_resource', 'log_level': 'ERROR', 'log_logger': <Logger 'pixelated.resources.mails_resource'>, 'log_time': '2017-02-23 17:46:46', 'log_source': None, 'log_format': "error occurred while sending: ('Failed to send mail to all recipients', {u'recipient1@domain.com': None, u'recipient2.with.dots@domain.com': <twisted.python.failure.Failure leap.bitmask.keymanager.errors.EncryptError: >})\n"}

Related with: #516