Bug 2093599 - OMEMO support no more available with Gajim 1.4.3
Summary: OMEMO support no more available with Gajim 1.4.3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gajim
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schmidt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-04 15:50 UTC by Nicolas Berrehouc
Modified: 2022-06-11 01:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-11 01:58:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nicolas Berrehouc 2022-06-04 15:50:35 UTC
Description of problem:
OMEMO works fine with Gajim 1.3.3, 1.4.0, 1.4.1, 1.4.2.
OMEMO support was done with the following commands:
```
$ sudo dnf install python3-devel gcc automake python3-pip python3 redhat-rpm-config python3-cryptography python3-qrcode
$ pip3 install --user python-axolotl
```

Since the update of Gajim 1.4.2 to 1.4.3, OMEMO is no longer functional in Gajim.

Version-Release number of selected component (if applicable):
gajim-1.4.3-1.fc36

How reproducible:
Update to Gajim 1.4.3.

Steps to Reproduce:
1.
2.
3.

Actual results:
No way to use OMEMO.

Expected results:
OMEMO working well as before.

Additional info:
No problem with gajim-1.4.2-1.fc36.noarch and python3-nbxmpp-3.1.0-2.fc36.noarch installed.

No updates available for python-axolotl.
```
$ pip3 install --user --upgrade python-axolotl
Requirement already satisfied: python-axolotl in ./.local/lib/python3.10/site-packages (0.2.3)
Requirement already satisfied: python-axolotl-curve25519>=0.4.1 in ./.local/lib/python3.10/site-packages (from python-axolotl) (0.4.1.post2)
Requirement already satisfied: cryptography in /usr/lib64/python3.10/site-packages (from python-axolotl) (36.0.0)
Requirement already satisfied: protobuf>=3.0.0.b2 in ./.local/lib/python3.10/site-packages (from python-axolotl) (3.18.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib64/python3.10/site-packages (from cryptography->python-axolotl) (1.15.0)
Requirement already satisfied: pycparser in /usr/lib/python3.10/site-packages (from cffi>=1.12->cryptography->python-axolotl) (2.20)
Requirement already satisfied: ply==3.11 in /usr/lib/python3.10/site-packages (from pycparser->cffi>=1.12->cryptography->python-axolotl) (3.11)
```

Comment 1 Michael Kuhn 2022-06-06 08:36:05 UTC
Saw your comment on Bodhi first, so copy-and-pasting here:
What error do you get? Gajim does not contain any references to the axolotl module, so I would assume that any errors are rather due to changes in the omemo plugin (https://dev.gajim.org/gajim/gajim-plugins) but I don't see any relevant changes there.

Comment 2 Nicolas Berrehouc 2022-06-07 18:17:41 UTC
I did some tests to reproduce the bug.

 * With gajim-1.4.3-1.fc36.noarch package installed:

```
$ gajim
07/06/2022 19:45:30 (W) gajim.c.storage.cache      Execution time for _load_caps_data: 59 ms
07/06/2022 19:45:31 (E) gajim.p.omemo              No module named 'google'
07/06/2022 19:45:31 (E) gajim.p.omemo              No module named 'axolotl'
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/gajim/common/ged.py", line 101, in raise_event
    if handler(event_obj):
  File "/usr/lib/python3.10/site-packages/gajim/remote_control.py", line 319, in on_presence_received
    if obj.old_show < 2 and obj.new_show > 1:
TypeError: '>' not supported between instances of 'str' and 'int'
```

When I check the plugins, OMEMO is no more enabled with a warning message "You are missing Python3-Axololt or use an outdated version."


 * With gajim-1.4.2-1.fc36.noarch package installed:

```
$ gajim
/usr/lib/python3.10/site-packages/gajim/common/jingle_rtp.py:31: PyGIWarning: Farstream was imported without specifying a version first. Use gi.require_version('Farstream', '0.2') before import to ensure that the right version gets loaded.
  from gi.repository import Farstream
/usr/lib/python3.10/site-packages/gajim/common/preview_helpers.py:34: PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GstPbutils
07/06/2022 19:56:30 (W) gajim.c.storage.cache      Execution time for _load_caps_data: 58 ms

07/06/2022 19:56:40 (E) gajim.c.ged                Error while running an event handler: <bound method GajimRemote.on_presence_received of <gajim.remote_control.GajimRemote object at 0x7f3a12df1180>>
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/gajim/common/ged.py", line 101, in raise_event
    if handler(event_obj):
  File "/usr/lib/python3.10/site-packages/gajim/remote_control.py", line 319, in on_presence_received
    if obj.old_show < 2 and obj.new_show > 1:
TypeError: '>' not supported between instances of 'str' and 'int'

(org.gajim.Gajim:97717): Gtk-CRITICAL **: 19:58:15.968: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

```

When I check the plugins, OMEMO is enabled and works well.

Something must have changed somewhere regarding the OMEMO plugin.

Comment 3 zak 2022-06-09 14:16:19 UTC
The error occurs if the setting 'remote_control' is activated in ACE (which is deactivated by default) and has nothing to do with OMEMO.

The upstream issue is: https://dev.gajim.org/gajim/gajim/-/issues/10934

Comment 4 Nicolas Berrehouc 2022-06-09 16:39:19 UTC
Thank you zak for your answer and the link.

I think this setting was enabled in older versions and indeed has nothing to do with OMEMO.

The problem lies in the two new errors that appeared after the upgrade to version 1.4.3:
```
07/06/2022 19:45:31 (E) gajim.p.omemo              No module named 'google'
07/06/2022 19:45:31 (E) gajim.p.omemo              No module named 'axolotl'
```

Comment 5 Michael Kuhn 2022-06-10 06:27:28 UTC
I compared the binaries of versions 1.4.2 and 1.4.3: Due to the update to the newer Python packaging guidelines, the "gajim" binary is now generated differently, which probably has the side effect of not finding locally installed pip modules anymore. I'm not sure whether we can easily fix that.

Comment 6 Nicolas Berrehouc 2022-06-10 07:42:57 UTC
You are right. Indeed locally installed pip modules are not found anymore.

I uninstalled local pip module **python-axolotl**:
```
$ pip3 uninstall python-axolotl
Found existing installation: python-axolotl 0.2.3
Uninstalling python-axolotl-0.2.3:
  Would remove:
    /home/<username>/.local/lib/python3.10/site-packages/axolotl/*
    /home/<username>/.local/lib/python3.10/site-packages/python_axolotl-0.2.3.dist-info/*
Proceed (Y/n)? Y
  Successfully uninstalled python-axolotl-0.2.3
```

And after I enabled copr repository philfry/gajim and installed **python3-axolotl**:
```
$ sudo dnf copr enable philfry/gajim
$ sudo dnf install python3-axolotl
```

And now OMEMO works well with gajim-1.4.3-1.fc36.noarch \o/

The new packages included in the official Fedora repository could be a relevant solution:
 - bug2043228
 - bug2043231

Comment 7 Michael Kuhn 2022-06-10 09:05:06 UTC
Thanks for the hint! I hadn't noticed that they were reviewed and included now. I will add them as recommends once they are available in updates.

Comment 8 Nicolas Berrehouc 2022-06-10 17:38:59 UTC
Oops! I didn't see that they were available via updates-testing. So I removed the packages provided by philfry/gajim and deleted this repository.

Everything works fine with the packages provided by updates-testing.

Thank you very much for your help!

So there is just the problem of having modules installed with pip that are not found.

Comment 9 Arthur Bols 2022-06-10 18:13:15 UTC
Great to hear! I'll add this bug to the update in bodhi: https://bodhi.fedoraproject.org/updates/FEDORA-2022-d0a4335d91

I think the status should be updated to POST for it to be automatically updated?

Comment 10 Fedora Update System 2022-06-10 18:13:33 UTC
FEDORA-2022-d0a4335d91 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d0a4335d91

Comment 11 Fedora Update System 2022-06-11 01:58:01 UTC
FEDORA-2022-d0a4335d91 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.