Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Crash with latest profanity dev #45

Closed
bretello opened this issue Apr 9, 2018 · 1 comment
Closed

Crash with latest profanity dev #45

bretello opened this issue Apr 9, 2018 · 1 comment

Comments

@bretello
Copy link

bretello commented Apr 9, 2018

I was trying to use this plugin with the latest profanity dev (0.6.0dev.master.34aa7a7), but I kept getting unencrypted chats errors.

By going into the logs I saw what was triggering the errors: a ValueError exception on line 86 of xmpp.py (encrypt_stanza() :

account, resource = jid.rsplit('/', 1)

Not sure what changed between the previous versions of this plugin and profanity, but, given how this line is written, if jid does not contain a "/", this will raise a ValueError. I replaced that line with:

try:

    account, resource = jid.rsplit('/', 1)

except ValueError:

    account, resource = jid, ""

So that the ValueError is correctly handled, and I was able to get back the encrypted chats.

I keep getting another error:

 prof: ERR: ProfOmemoPlugin - Could not handle encrypted message.
Traceback (most recent call last):
  File "/Users/me/.local/share/profanity/plugins/prof_omemo_plugin.py", line 441, in 
prof_on_message_stanza_receive
    msg_dict = xmpp.unpack_encrypted_stanza(stanza)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/profanity_omemo_plugin-0.0.1-py2.7.egg/profanity_omemo_plugin/xmpp.py", line 297, in unpack_encrypted_stanza    
payload = payload_node.text
AttributeError: 'NoneType' object has no attribute 'text'
prof: ERR: ProfOmemoPlugin - Could not handle encrypted message

But I haven't had time to look into this.

Thanks for your awesome work!

@bretello
Copy link
Author

bretello commented Apr 9, 2018

Duplicate of #43 and #39

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

No branches or pull requests

1 participant