profanity-omemo-plugin icon indicating copy to clipboard operation
profanity-omemo-plugin copied to clipboard

"I sent you an OMEMO encrypted message but your client doesn’t seem to support that." after "OMEMO Session started."

Open devurandom opened this issue 8 years ago • 8 comments

The OMEMO plugin is active and somewhat working, but it does not decrypt incoming messages:

OMEMO Session started.
###############################################
#                                             #
#                   CAUTION                   #
#    This plugin does not support any form    #
#             of Trust Management             #
#      All Devices are trusted *blindly*      #
#                                             #
###############################################
... added devices with IDs ...
...: I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo

Profanity 0.5.1. OMEMO plugin 982612f9a16068366434771d8f55bbfc3e8d6822

devurandom avatar Oct 08 '17 14:10 devurandom

Android logs from Conversations? Linux logs from Profanity?

licaon-kter avatar Oct 08 '17 15:10 licaon-kter

I get a lot of these in the main console of Profanity: Plugin error - prof_omemo_plugin.prof_on_message_stanza_receive(): return value undefined, expected boolean

Redacted excerpt from profanity.log:

prof: INF: ProfOmemoPlugin - Received Message: <message to="${MY_JID}/profanity" type="chat" from="${MY_JID}"><sent xmlns="urn:xmpp:carbons:2"><forwarded xmlns="urn:xmpp:forward:0"><message id="${MESSAGE_ID}" xmlns="jabber:client" type="chat" to="${OTHER_JID}" from="${MY_JID}/mobile"><encrypted xmlns="eu.siacs.conversations.axolotl"><header sid="${SID}"><key rid="${RID_1}" prekey="true">...</key><key rid="${RID_2}">...</key><iv>...</iv></header><payload>...</payload></encrypted><markable xmlns="urn:xmpp:chat-markers:0"/><request xmlns="urn:xmpp:receipts"/><origin-id id="${MESSAGE_ID}" xmlns="urn:xmpp:sid:0"/><store xmlns="urn:xmpp:hints"/><encryption namespace="eu.siacs.conversations.axolotl" xmlns="urn:xmpp:eme:0" name="OMEMO"/></message></forwarded></sent></message>
prof: INF: ProfOmemoPlugin - Received OMEMO encrypted message.
prof: ERR: Plugin error - prof_omemo_plugin.prof_on_message_stanza_receive(): return value undefined, expected boolean
prof: WRN: Carbon received with no message.
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/share/profanity/plugins/prof_omemo_plugin.py", line 451, in prof_on_message_stanza_receive
stderr: ERR:     plain_msg = omemo_state.decrypt_msg(msg_dict)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 197, in decrypt_msg
stderr: ERR:     encrypted_key)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 441, in handlePreKeyWhisperMessage
stderr: ERR:     key = sessionCipher.decryptPkmsg(preKeyWhisperMessage)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessioncipher.py", line 95, in decryptPkmsg
stderr: ERR:     unsignedPreKeyId = self.sessionBuilder.process(sessionRecord, ciphertext)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 50, in process
stderr: ERR:     unsignedPreKeyId = self.processV3(sessionRecord, message)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 112, in processV3
stderr: ERR:     ourSignedPreKey = self.signedPreKeyStore.loadSignedPreKey(message.getSignedPreKeyId()).getKeyPair()
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/liteaxolotlstore.py", line 164, in loadSignedPreKey
stderr: ERR:     return self.signedPreKeyStore.loadSignedPreKey(signedPreKeyId)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/litesignedprekeystore.py", line 42, in loadSignedPreKey
stderr: ERR:     signedPreKeyId)
stderr: ERR: axolotl.invalidkeyidexception.InvalidKeyIdException: No such signedprekeyrecord! ${SOME_NUMBER} 
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/share/profanity/plugins/prof_omemo_plugin.py", line 451, in prof_on_message_stanza_receive
stderr: ERR:     plain_msg = omemo_state.decrypt_msg(msg_dict)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 197, in decrypt_msg
stderr: ERR:     encrypted_key)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 441, in handlePreKeyWhisperMessage
stderr: ERR:     key = sessionCipher.decryptPkmsg(preKeyWhisperMessage)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessioncipher.py", line 95, in decryptPkmsg
stderr: ERR:     unsignedPreKeyId = self.sessionBuilder.process(sessionRecord, ciphertext)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 50, in process
stderr: ERR:     unsignedPreKeyId = self.processV3(sessionRecord, message)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 112, in processV3
stderr: ERR:     ourSignedPreKey = self.signedPreKeyStore.loadSignedPreKey(message.getSignedPreKeyId()).getKeyPair()
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/liteaxolotlstore.py", line 164, in loadSignedPreKey
stderr: ERR:     return self.signedPreKeyStore.loadSignedPreKey(signedPreKeyId)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/litesignedprekeystore.py", line 42, in loadSignedPreKey
stderr: ERR:     signedPreKeyId)
stderr: ERR: axolotl.invalidkeyidexception.InvalidKeyIdException: No such signedprekeyrecord! ${SOME_NUMBER} 
stderr: ERR: 
stderr: ERR: During handling of the above exception, another exception occurred:
stderr: ERR: 
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/log.py", line 61, in emit
stderr: ERR:     log_message += '\n' + traceback.print_exception(*tb_info)
stderr: ERR: TypeError: Can't convert 'NoneType' object to str implicitly
stderr: ERR: 
stderr: ERR: During handling of the above exception, another exception occurred:
stderr: ERR: 
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/share/profanity/plugins/prof_omemo_plugin.py", line 453, in prof_on_message_stanza_receive
stderr: ERR:     log.exception('Could not decrypt Message.')
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1315, in exception
stderr: ERR:     self.error(msg, *args, **kwargs)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1308, in error
stderr: ERR:     self._log(ERROR, msg, args, **kwargs)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1414, in _log
stderr: ERR:     self.handle(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1424, in handle
stderr: ERR:     self.callHandlers(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1486, in callHandlers
stderr: ERR:     hdlr.handle(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
stderr: ERR:     self.emit(record)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/log.py", line 65, in emit
stderr: ERR:     prof.log_error('Could not log last message. {0}'.format(e.message))
stderr: ERR: AttributeError: 'TypeError' object has no attribute 'message'
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/share/profanity/plugins/prof_omemo_plugin.py", line 451, in prof_on_message_stanza_receive
stderr: ERR:     plain_msg = omemo_state.decrypt_msg(msg_dict)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 197, in decrypt_msg
stderr: ERR:     encrypted_key)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/state.py", line 441, in handlePreKeyWhisperMessage
stderr: ERR:     key = sessionCipher.decryptPkmsg(preKeyWhisperMessage)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessioncipher.py", line 95, in decryptPkmsg
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 50, in process
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/python_axolotl-0.1.39-py3.4.egg/axolotl/sessionbuilder.py", line 112, in processV3
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/liteaxolotlstore.py", line 164, in loadSignedPreKey
stderr: ERR:     return self.signedPreKeyStore.loadSignedPreKey(signedPreKeyId)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/omemo/litesignedprekeystore.py", line 42, in loadSignedPreKey
stderr: ERR:     signedPreKeyId)
stderr: ERR: axolotl.invalidkeyidexception.InvalidKeyIdException: No such signedprekeyrecord! ${SOME_NUMBER} 
stderr: ERR: 
stderr: ERR: During handling of the above exception, another exception occurred:
stderr: ERR: 
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/log.py", line 61, in emit
stderr: ERR:     log_message += '\n' + traceback.print_exception(*tb_info)
stderr: ERR: TypeError: Can't convert 'NoneType' object to str implicitly
stderr: ERR: 
stderr: ERR: During handling of the above exception, another exception occurred:
stderr: ERR: 
stderr: ERR: Traceback (most recent call last):
stderr: ERR:   File "${HOME}/.local/share/profanity/plugins/prof_omemo_plugin.py", line 453, in prof_on_message_stanza_receive
stderr: ERR:     log.exception('Could not decrypt Message.')
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1315, in exception
stderr: ERR:     self.error(msg, *args, **kwargs)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1308, in error
stderr: ERR:     self._log(ERROR, msg, args, **kwargs)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1414, in _log
stderr: ERR:     self.handle(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1424, in handle
stderr: ERR:     self.callHandlers(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 1486, in callHandlers
stderr: ERR:     hdlr.handle(record)
stderr: ERR:   File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
stderr: ERR:     self.emit(record)
stderr: ERR:   File "${HOME}/.local/lib64/python3.4/site-packages/profanity_omemo_plugin-0.0.1-py3.4.egg/profanity_omemo_plugin/log.py", line 65, in emit
prof: INF: ProfOmemoPlugin - Received Message: <message to="${MY_JID}/profanity" type="chat" from="${MY_JID}"><received xmlns="urn:xmpp:carbons:2"><forwarded xmlns="urn:xmpp:forward:0"><message xmlns="jabber:client" type="chat" to="${MY_JID}/mobile" lang="en" from="${OTHER_JID}/phone"><received id="${MESSAGE_ID}" xmlns="urn:xmpp:chat-markers:0"/><received id="${MESSAGE_ID}" xmlns="urn:xmpp:receipts"/></message></forwarded></received></message>
prof: WRN: Carbon received with no message.

devurandom avatar Oct 08 '17 15:10 devurandom

Use https://gist.github.com and post the link, instead of just pasting.

licaon-kter avatar Oct 08 '17 16:10 licaon-kter

@devurandom Does it work the other way around? Can you successfully send messages to Conversations.im?

ReneVolution avatar Oct 08 '17 19:10 ReneVolution

I do not get a reply and Conversations does not show them, i.e. they don't arrive there neither via CC nor MAM. They also appear grey in Profanity, instead of turning into a greenish tone, as they normally do. But I do not find any send-related entry in the logs. Only Checking Sessions for ... and Recipient ... has all sessions set up..

devurandom avatar Oct 08 '17 20:10 devurandom

Same issue here for conversations and wime against ejabberd 18.12.1-2~bpo9+1.

gabrix73 avatar Mar 10 '19 10:03 gabrix73

profanity is implementing OMEMO https://github.com/boothj5/profanity/pull/1039

ghost avatar Mar 11 '19 03:03 ghost

Also this plugin is unmaintained/discontinued, which is mentioned on the main page.

kaffeekanne avatar Mar 11 '19 08:03 kaffeekanne