ReneVolution / profanity-omemo-plugin

A Python plugin to use (axolotl / Signal Protocol) encryption for the profanity XMPP messenger
GNU General Public License v3.0
64 stars 14 forks source link

Error, not working #47

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

I have installed this plugin, and this is the log for it:

root@DebLin:/home/malte/Entwicklung/profanity-omemo-plugin-0.1.1# ./install.sh 
running install
running bdist_egg
running egg_info
writing requirements to src/profanity_omemo_plugin.egg-info/requires.txt
writing src/profanity_omemo_plugin.egg-info/PKG-INFO
writing top-level names to src/profanity_omemo_plugin.egg-info/top_level.txt
writing dependency_links to src/profanity_omemo_plugin.egg-info/dependency_links.txt
reading manifest file 'src/profanity_omemo_plugin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/profanity_omemo_plugin.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/__init__.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/constants.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/db.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/errors.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/log.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/prof_omemo_state.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/weak_message_store.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
copying build/lib.linux-x86_64-2.7/profanity_omemo_plugin/xmpp.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/constants.py to constants.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/db.py to db.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/errors.py to errors.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/log.py to log.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/prof_omemo_state.py to prof_omemo_state.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/weak_message_store.py to weak_message_store.pyc
byte-compiling build/bdist.linux-x86_64/egg/profanity_omemo_plugin/xmpp.py to xmpp.pyc
installing package data to build/bdist.linux-x86_64/egg
running install_data
copying deploy/prof_omemo_plugin.py -> build/bdist.linux-x86_64/egg/profanity_omemo_plugin
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/profanity_omemo_plugin.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/profanity_omemo_plugin-0.0.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing profanity_omemo_plugin-0.0.1-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/profanity_omemo_plugin-0.0.1-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/profanity_omemo_plugin-0.0.1-py2.7.egg
Extracting profanity_omemo_plugin-0.0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
profanity-omemo-plugin 0.0.1 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/profanity_omemo_plugin-0.0.1-py2.7.egg
Processing dependencies for profanity-omemo-plugin==0.0.1
Searching for python-omemo==0.1.0
Best match: python-omemo 0.1.0
Processing python_omemo-0.1.0-py2.7.egg
python-omemo 0.1.0 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/python_omemo-0.1.0-py2.7.egg
Searching for protobuf==3.1.0.post1
Best match: protobuf 3.1.0.post1
Processing protobuf-3.1.0.post1-py2.7.egg
protobuf 3.1.0.post1 is already the active version in easy-install.pth

Using /root/.local/lib/python2.7/site-packages/protobuf-3.1.0.post1-py2.7.egg
Searching for python-axolotl==0.1.42
Best match: python-axolotl 0.1.42
Processing python_axolotl-0.1.42-py2.7.egg
python-axolotl 0.1.42 is already the active version in easy-install.pth

Using /root/.local/lib/python2.7/site-packages/python_axolotl-0.1.42-py2.7.egg
Searching for cryptography==2.1.4
Best match: cryptography 2.1.4
Adding cryptography 2.1.4 to easy-install.pth file

Using /usr/lib/python2.7/dist-packages
Searching for six==1.11.0
Best match: six 1.11.0
Adding six 1.11.0 to easy-install.pth file

Using /usr/lib/python2.7/dist-packages
Searching for setuptools==39.0.1
Best match: setuptools 39.0.1
Adding setuptools 39.0.1 to easy-install.pth file
Installing easy_install script to /usr/local/bin

Using /usr/lib/python2.7/dist-packages
Searching for python-axolotl-curve25519==0.4.1.post2
Best match: python-axolotl-curve25519 0.4.1.post2
Processing python_axolotl_curve25519-0.4.1.post2-py2.7-linux-x86_64.egg
python-axolotl-curve25519 0.4.1.post2 is already the active version in easy-install.pth

Using /root/.local/lib/python2.7/site-packages/python_axolotl_curve25519-0.4.1.post2-py2.7-linux-x86_64.egg
Finished processing dependencies for profanity-omemo-plugin==0.0.1
do post install stuff here...

So no errors, but when I tried to run it:

Failed to load plugin: prof_omemo_plugin.py

Could you give me a hint?

gupkobbi commented 6 years ago

I can confirm that it worked for me (a couple of days ago).

Which version of Profanity are you using? Which version of Python did you use to compile with?

Here:

with profanity-omemo-plugin git state: 7c66c0d4cea43ea15f7747a8a4479d021040b8b7

$ profanity --version
Profanity, version 0.6.0dev.master.34aa7a7
Copyright (C) 2012 - 2018 James Booth <boothj5web@gmail.com>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libmesode
Desktop notification support: Disabled
OTR support: Enabled (libotr 4.1.0)
PGP support: Enabled (libgpgme 1.5.1)
C plugins: Enabled
Python plugins: Enabled (3.4.2)
GTK icons: Disabled
ghost commented 6 years ago
root@DebLin:/home/malte# profanity --version
Profanity, version 0.5.1
Copyright (C) 2012 - 2017 James Booth <boothj5web@gmail.com>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled
PGP support: Enabled
C plugins: Enabled
Python plugins: Enabled
GTK icons: Enabled
gupkobbi commented 6 years ago

I do remember that i saw your error message as well sometime in my installation process.

The way I got it to work was to checkout latest profanity master and compile it by hand using python 3.4, both for the client and the plugin.

And yes, the OMEMO wikipedia article gave impression it was very easy to install which I believe it may not be.

bitkeks commented 6 years ago

@beli3ver try using profanity -a <account> -l DEBUG and see if something appears in the log file. It can also help to run the Python interpreter and to try the import of the module. I just figured that an import failed (import Crypto) and had to install pycrypto manually.

ghost commented 6 years ago

Sorry, need long :smile: I am a arch user now. I installed profanity-git and profanity-omemo-git.

[13:52] >> profanity --version
Profanity, version 0.6.0dev.makepkg.42dc1327
Copyright (C) 2012 - 2018 James Booth <boothj5web@gmail.com>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libmesode
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.11.1)
C plugins: Enabled
Python plugins: Enabled (3.6.5)
GTK icons: Enabled

Here the log

07/06/2018 12:50:21: prof: INF: Starting Profanity (0.6.0dev.makepkg.42dc1327)...
07/06/2018 12:50:21: prof: INF: Initialising chat logs
07/06/2018 12:50:21: prof: INF: Initialising groupchat logs
07/06/2018 12:50:21: prof: INF: Loading accounts
07/06/2018 12:50:21: prof: INF: Initialising UI
07/06/2018 12:50:21: prof: INF: Initialising XMPP
07/06/2018 12:50:21: prof: INF: Loading capabilities cache
07/06/2018 12:50:21: prof: INF: Initialising commands
07/06/2018 12:50:21: prof: INF: Initialising contact list
07/06/2018 12:50:21: prof: INF: Loading TLS certificates
07/06/2018 12:50:21: prof: INF: Initialising OTR
07/06/2018 12:50:21: prof: INF: Starting main event loop
07/06/2018 12:50:23: prof: INF: Failed to load plugin: prof_omemo_plugin.py
07/06/2018 12:50:32: prof: INF: Profanity is shutting down...
07/06/2018 13:46:15: prof: INF: Starting Profanity (0.6.0dev.makepkg.42dc1327)...
07/06/2018 13:46:15: prof: INF: Initialising chat logs
07/06/2018 13:46:15: prof: INF: Initialising groupchat logs
07/06/2018 13:46:15: prof: INF: Loading accounts
07/06/2018 13:46:15: prof: INF: Initialising UI
07/06/2018 13:46:15: prof: INF: Initialising XMPP
07/06/2018 13:46:15: prof: INF: Loading capabilities cache
07/06/2018 13:46:15: prof: INF: Initialising commands
07/06/2018 13:46:15: prof: INF: Initialising contact list
07/06/2018 13:46:15: prof: INF: Loading TLS certificates
07/06/2018 13:46:15: prof: INF: Initialising OTR
07/06/2018 13:46:15: prof: INF: Starting main event loop
07/06/2018 13:46:26: prof: INF: Failed to load plugin: prof_omemo_plugin.py
07/06/2018 13:46:38: prof: INF: Profanity is shutting down...
07/06/2018 13:48:05: prof: INF: Starting Profanity (0.6.0dev.makepkg.42dc1327)...
07/06/2018 13:48:05: prof: INF: Initialising chat logs
07/06/2018 13:48:05: prof: INF: Initialising groupchat logs
07/06/2018 13:48:05: prof: INF: Loading accounts
07/06/2018 13:48:05: prof: INF: Initialising UI
07/06/2018 13:48:05: prof: INF: Initialising XMPP
07/06/2018 13:48:05: prof: INF: Loading capabilities cache
07/06/2018 13:48:05: prof: INF: Initialising commands
07/06/2018 13:48:05: prof: INF: Initialising contact list
07/06/2018 13:48:05: prof: INF: Loading TLS certificates
07/06/2018 13:48:05: prof: INF: Initialising OTR
07/06/2018 13:48:05: prof: DBG: GPG: Found gpgme version: 1.11.1
07/06/2018 13:48:05: prof: DBG: Env is GTK-ready: true
07/06/2018 13:48:05: prof: DBG: Resizing UI
07/06/2018 13:48:05: prof: DBG: Input received: /connect malte@malte-kiefer.de
07/06/2018 13:48:09: prof: INF: Connecting without account, JID: malte@malte-kiefer.de/profanity
07/06/2018 13:48:09: prof: INF: Connecting as malte@malte-kiefer.de/profanity
07/06/2018 13:48:09: xmpp: DBG: sock_connect() to malte-kiefer.de:5222 returned 10
07/06/2018 13:48:09: xmpp: DBG: Attempting to connect to malte-kiefer.de
07/06/2018 13:48:09: prof: INF: Starting main event loop
07/06/2018 13:48:09: xmpp: DBG: connection successful
07/06/2018 13:48:09: conn: DBG: SENT: <?xml version="1.0"?><stream:stream to="malte-kiefer.de" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
07/06/2018 13:48:09: xmpp: DBG: RECV: <stream:stream lang="en" from="malte-kiefer.de" id="4196cbb8-1618-49d4-b951-0ef6ad9791c9" version="1.0">
07/06/2018 13:48:09: xmpp: DBG: RECV: <features xmlns="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls></features>
07/06/2018 13:48:09: conn: DBG: SENT: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
07/06/2018 13:48:09: xmpp: DBG: RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
07/06/2018 13:48:09: xmpp: DBG: handle proceedtls called for proceed
07/06/2018 13:48:09: xmpp: DBG: proceeding with TLS
07/06/2018 13:48:09: TLS: DBG: STACK
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /CN=malte-kiefer.de
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ENDSTACK
07/06/2018 13:48:09: TLS: DBG: STACK
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /CN=malte-kiefer.de
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ENDSTACK
07/06/2018 13:48:09: TLS: DBG: STACK
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /CN=malte-kiefer.de
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: SUBJECT : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ISSUER  : /O=Digital Signature Trust Co./CN=DST Root CA X3
07/06/2018 13:48:09: TLS: DBG: ENDSTACK
07/06/2018 13:48:09: conn: DBG: SENT: <?xml version="1.0"?><stream:stream to="malte-kiefer.de" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
07/06/2018 13:48:09: xmpp: DBG: RECV: <stream:stream lang="en" from="malte-kiefer.de" id="2679d4b8-c654-45cd-b261-f54d45a21c0e" version="1.0">
07/06/2018 13:48:09: xmpp: DBG: RECV: <features xmlns="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>SCRAM-SHA-1-PLUS</mechanism></mechanisms><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></features>
07/06/2018 13:48:09: conn: DBG: SENT: <auth mechanism="SCRAM-SHA-1" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">biwsbj1tYWx0ZSxyPTcxMmI0ZDhmMmE3NjE1NmMwYzE0ZTJhOTJkNGQyYmQ=</auth>
07/06/2018 13:48:09: xmpp: DBG: RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cj03MTJiNGQ4ZjJhNzYxNTZjMGMxNGUyYTkyZDRkMmJkYzVjNTY4YTMtMDEyNi00NjJiLTgyMzUtZGQwMDllOWI0MjZkLHM9TkdJMU5XRXhaVEl0WVRsbE1DMDBaR1ZpTFdFME4yVXRZVFl4WldNMU5UY3hNemd3LGk9NDA5Ng==</challenge>
07/06/2018 13:48:09: xmpp: DBG: handle SCRAM-SHA-1 (challenge) called for challenge
07/06/2018 13:48:09: conn: DBG: SENT: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Yz1iaXdzLHI9NzEyYjRkOGYyYTc2MTU2YzBjMTRlMmE5MmQ0ZDJiZGM1YzU2OGEzLTAxMjYtNDYyYi04MjM1LWRkMDA5ZTliNDI2ZCxwPWx5T0MwaEpJS1phMUZmMUY5Z0d1aWJnM2M1ST0=</response>
07/06/2018 13:48:09: xmpp: DBG: RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>The response provided by the client doesn't match the one we calculated.</text></failure>
07/06/2018 13:48:09: xmpp: DBG: handle SCRAM-SHA-1 (challenge) called for failure
07/06/2018 13:48:09: xmpp: DBG: SASL SCRAM-SHA-1 auth failed
07/06/2018 13:48:09: conn: DBG: SENT: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">AG1hbHRlAC9wbHVnaW5zIGxvYWQgcHJvZl9vbWVtb19wbHVnaW4ucHk=</auth>
07/06/2018 13:48:09: xmpp: DBG: RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>Unable to authorize you with the authentication credentials you've sent.</text></failure>
07/06/2018 13:48:09: xmpp: DBG: SASL PLAIN auth failed
07/06/2018 13:48:09: conn: DBG: SENT: <iq id="_xmpp_auth1" type="set"><query xmlns="jabber:iq:auth"><username>malte</username><password>/plugins load prof_omemo_plugin.py</password><resource>profanity</resource></query></iq>
07/06/2018 13:48:09: xmpp: DBG: RECV: <iq id="_xmpp_auth1" type="error"><error type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
07/06/2018 13:48:09: xmpp: ERR: Legacy client authentication failed.
07/06/2018 13:48:09: conn: DBG: SENT: </stream:stream>
07/06/2018 13:48:09: xmpp: DBG: RECV: </stream:stream>
07/06/2018 13:48:09: xmpp: DBG: Closing socket.
07/06/2018 13:48:09: prof: DBG: Connection handler: XMPP_CONN_DISCONNECT
07/06/2018 13:48:09: prof: DBG: Connection handler: Login failed
07/06/2018 13:48:09: prof: DBG: Connection handler: No reconnect timer
07/06/2018 13:48:09: prof: INF: Login failed
07/06/2018 13:48:12: prof: DBG: Input received: /plugins load prof_omemo_plugin.py
07/06/2018 13:48:12: prof: INF: Failed to load plugin: prof_omemo_plugin.py
07/06/2018 13:48:23: prof: DBG: Input received: /quit
07/06/2018 13:48:23: prof: INF: Profanity is shutting down...
ghost commented 6 years ago

Profanity says no plugins installed

ghost commented 6 years ago

Fixed THE ERROR. The plugin was installed here: /usr/local/share/profanity/plugins/prof_omemo_plugin.py I copied it: cp /usr/local/share/profanity/plugins/prof_omemo_plugin.py /home/malte/.local/share/profanity/plugins/ Then

14:20:06 - Loaded plugins:
14:20:06 -   prof_omemo_plugin.py
14:20:16 - Plugin enabled: True
bitkeks commented 6 years ago

Seems to be a problem you should report in AUR as well. The latest commit switched from local to global installation. Looking into the profanity source code, it looks like /usr/… is not taken into account when using /plugins load. You can however use /plugins install /usr/local/share/profanity/plugins/prof_omemo_plugin.py (as documented) which copies the file into your local directory. This should be documented in the AUR package as well.