omemo / gajim-omemo

Gajim plugin for OMEMO Multi-End Message and Object Encryption
87 stars 7 forks source link

Gajim fails to start (due to omemo?) after upgrade to Ubuntu 16.04 #56

Closed adoa closed 8 years ago

adoa commented 8 years ago

Hey guys,

a few days ago I upgraded my Ubuntu from 15.10 to 16.04. Since then something strange happened with gajim and omemo: Gajim fails to start and I get a traceback that looks like this:

File "gajim.py", line 533, in <module>
    interface.run()
  File "/usr/share/gajim/src/gui_interface.py", line 2733, in run
    gajim.plugin_manager = plugins.PluginManager()
  File "/usr/share/gajim/src/plugins/helpers.py", line 129, in __call__
    cls.instance=super(Singleton, cls).__call__(*args,**kw)
  File "/usr/share/gajim/src/plugins/pluginmanager.py", line 104, in __init__
    pc = PluginManager.scan_dir_for_plugins(path)
  File "/usr/share/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/usr/share/gajim/src/plugins/pluginmanager.py", line 454, in scan_dir_for_plugins
    module = __import__(module_name)
  File "/usr/share/gajim/src/common/demandimport.py", line 95, in _demandimport
    return _import(name, globals, locals, fromlist, level)
  File "/home/awachtel/.local/share/gajim/plugins/omemo/__init__.py", line 42, in <module>
    from omemo.state import OmemoState
  File "/usr/share/gajim/src/common/demandimport.py", line 114, in _demandimport
    mod = _origimport(name, globals, locals)
  File "/home/awachtel/.local/share/gajim/plugins/omemo/omemo/state.py", line 29, in <module>
    from axolotl.protocol.prekeywhispermessage import PreKeyWhisperMessage
  File "/usr/share/gajim/src/common/demandimport.py", line 114, in _demandimport
    mod = _origimport(name, globals, locals)
  File "/usr/local/lib/python2.7/dist-packages/axolotl/protocol/prekeywhispermessage.py", line 9, in <module>
    from .whispermessage import WhisperMessage
  File "/usr/share/gajim/src/common/demandimport.py", line 112, in _demandimport
    return _origimport(name, globals, locals, fromlist, level)
  File "/usr/local/lib/python2.7/dist-packages/axolotl/protocol/whispermessage.py", line 9, in <module>
    from . import whisperprotos
  File "/usr/share/gajim/src/common/demandimport.py", line 112, in _demandimport
    return _origimport(name, globals, locals, fromlist, level)
  File "/usr/local/lib/python2.7/dist-packages/axolotl/protocol/whisperprotos.py", line 21, in <module>
    serialized_pb=_b('\n\x19WhisperTextProtocol.proto\x12\ntextsecure\"b\n\x0eWhisperMessage\x12\x12\n\nratchetKey\x18\x01 \x01(\x0c\x12\x0f\n\x07\x63ounter\x18\x02 \x01(\r\x12\x17\n\x0fpreviousCounter\x18\x03 \x01(\r\x12\x12\n\nciphertext\x18\x04 \x01(\x0c\"\x8f\x01\n\x14PreKeyWhisperMessage\x12\x16\n\x0eregistrationId\x18\x05 \x01(\r\x12\x10\n\x08preKeyId\x18\x01 \x01(\r\x12\x16\n\x0esignedPreKeyId\x18\x06 \x01(\r\x12\x0f\n\x07\x62\x61seKey\x18\x02 \x01(\x0c\x12\x13\n\x0bidentityKey\x18\x03 \x01(\x0c\x12\x0f\n\x07message\x18\x04 \x01(\x0c\"t\n\x12KeyExchangeMessage\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0f\n\x07\x62\x61seKey\x18\x02 \x01(\x0c\x12\x12\n\nratchetKey\x18\x03 \x01(\x0c\x12\x13\n\x0bidentityKey\x18\x04 \x01(\x0c\x12\x18\n\x10\x62\x61seKeySignature\x18\x05 \x01(\x0c\"E\n\x10SenderKeyMessage\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\titeration\x18\x02 \x01(\r\x12\x12\n\nciphertext\x18\x03 \x01(\x0c\"c\n\x1cSenderKeyDistributionMessage\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\titeration\x18\x02 \x01(\r\x12\x10\n\x08\x63hainKey\x18\x03 \x01(\x0c\x12\x12\n\nsigningKey\x18\x04 \x01(\x0c\x42\x37\n&org.whispersystems.libaxolotl.protocolB\rWhisperProtos')
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 828, in __init__
    _message.default_pool.AddSerializedFile(self.serialized_pb)
AttributeError: 'module' object has no attribute 'default_pool'

To me this looks as if omemo was trying to recover something from my messaging history, but fails. I tried to reinstall gajim (version 0.16.5 now from the ubuntu repos) and to reinstall the omemo plugin. Still the same problem.

I would prefer not to lose my history. If it is inevitable, how would I even remove it?

I keep all my python packages synced aganist PyPI via pip, so maybe there was an update somewhere there which is unrelated to my upgrade to Ubuntu 16.04 …

kalkin commented 8 years ago

Downgrade to protobuf==2.7 . This is a known issue in Gajim 0.16.5 I'm working on it.

adoa commented 8 years ago

had to use protobuf==2.6.1 but the downgrade worked. Thanks for the quick answer!

Chroedde commented 8 years ago

Hi, I have the same problem. It wasn't fixed in the meantime? Could you give me a hint how I downgrade the protobuf? What commands I have to use? :-)

Thanks a lot! Best regards!

lovetox commented 8 years ago

you can downgrade with sudo pip install protobuf==2.6.1

but if you are on debian or arch, it would be better to use the gajim-omemo package

on debian its in unstable and backports for arch see the wiki

Chroedde commented 8 years ago

Hi, Thank you for the answer. I am using the latest version of mint. Is this a problem?

lovetox commented 8 years ago

no it shouldnt, but then you have to use the pip command

Chroedde commented 8 years ago

Thanks a lot. It's working. Greetings from Dresden to the sea. :-)