G

[XEP-0384] Attribute Error when a profile is connected early

When I'm lauching Libervia Web just after Libervia Backend (and thus the libervia service account is connected immediately), I have the following traceback:

2022-11-24T09:38:34+0100 /!\ [sat.plugins.plugin_xep_0384] error while preparing profile for libervia: name 'client' is not defined
[SNIP]
2022-11-24T09:38:34+0100 [sat.memory.sqla] getting individual binary private values from database for namespace XEP-0384 with keys ['DEVICE_ID']
2022-11-24T09:38:34+0100 [twisted.internet.defer#critical] Unhandled error in Deferred:
2022-11-24T09:38:34+0100 [twisted.internet.defer#critical] 
        Traceback (most recent call last):
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/internet/defer.py", line 517, in errback
            self._startRunCallbacks(fail)
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/internet/defer.py", line 580, in _startRunCallbacks
            self._runCallbacks()
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/internet/defer.py", line 1514, in gotResult
            current_context.run(_inlineCallbacks, r, g, status)
        --- <exception caught here> ---
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/internet/defer.py", line 1443, in _inlineCallbacks
            result = current_context.run(result.throwExceptionIntoGenerator, g)
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/twisted/python/failure.py", line 500, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 2716, in __on_device_list_update
            session_manager = await self.get_session_manager(profile)
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 1920, in get_session_manager
            return cast(omemo.SessionManager, await deferred)
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 2202, in _message_received_trigger
            session_manager = await self.get_session_manager(cast(str, client.profile))
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 1920, in get_session_manager
            return cast(omemo.SessionManager, await deferred)
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 1927, in get_session_manager
            session_manager = await prepare_for_profile(
          File "/home/goffi/dev/sat/sat/plugins/plugin_xep_0384.py", line 1458, in prepare_for_profile
            session_manager = await make_session_manager(sat, profile).create(
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/omemo/session_manager.py", line 425, in create
            device, _ = await self.get_own_device_information()
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/omemo/session_manager.py", line 1469, in get_own_device_information
            all_own_devices = await self.get_device_information(self.__own_bare_jid)
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/omemo/session_manager.py", line 1344, in get_device_information
            return (await self.__get_device_information(bare_jid))[0]
          File "/home/goffi/venvs/sat_dev/lib/python3.10/site-packages/omemo/session_manager.py", line 1457, in __get_device_information
            await storage.store(f"/devices/{client.jid.userhost()}/list", [ own_device_id ])
        builtins.NameError: name 'client' is not defined
G

goffi 24/11/2022 11:34

actually this is a locally modified file, my bad. Closing this ticket now.

Vous n'êtes pas connecté⋅e. Merci de vous connecter pour commenter.

id

413

author

Goffi

created

24/11/2022 08:42

updated

24/11/2022 11:34

labels
backend XEP-0384 OMEMO
type
bug
status
closed
priority
normal
milestone
0.9
severity
normal