python-nbxmpp issueshttps://dev.gajim.org/gajim/python-nbxmpp/-/issues2023-10-22T09:42:16Zhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/152AttributeError: 'TcpConnection' object has no attribute 'get_base_io_stream'2023-10-22T09:42:16ZDaniel BrötzmannAttributeError: 'TcpConnection' object has no attribute 'get_base_io_stream'# Error Details:
- Sentry event: https://sentry.io/gajim-aec982731/gajim/issues/4536174894
- First seen:
2023-10-09T15:57:19+00:00
- Last seen: 2023-10-09T15:57:19+00:00
- Event: 1
- Users: 0# Error Details:
- Sentry event: https://sentry.io/gajim-aec982731/gajim/issues/4536174894
- First seen:
2023-10-09T15:57:19+00:00
- Last seen: 2023-10-09T15:57:19+00:00
- Event: 1
- Users: 0https://dev.gajim.org/gajim/python-nbxmpp/-/issues/138Implement XEP-0424 Message Retraction2023-03-02T13:36:05ZDaniel BrötzmannImplement XEP-0424 Message Retraction[XEP-0424 Message Retraction](https://xmpp.org/extensions/xep-0424.html)
Before implementing, some changes are on their way: https://github.com/xsf/xeps/pull/1270[XEP-0424 Message Retraction](https://xmpp.org/extensions/xep-0424.html)
Before implementing, some changes are on their way: https://github.com/xsf/xeps/pull/1270https://dev.gajim.org/gajim/python-nbxmpp/-/issues/137Update XEP-0425 Message Moderation implementation2024-03-19T05:37:40ZDaniel BrötzmannUpdate XEP-0425 Message Moderation implementationChanges are planned here: https://github.com/xsf/xeps/pull/1271Changes are planned here: https://github.com/xsf/xeps/pull/1271https://dev.gajim.org/gajim/python-nbxmpp/-/issues/135GError: g-tls-error-quark: TLS connection closed unexpectedly (6)2024-03-16T09:34:53ZJorge GomezGError: g-tls-error-quark: TLS connection closed unexpectedly (6)## Versions:
- OS: Linux 6.0.12
- GTK Version: 3.24.30
- PyGObject Version: 3.40.1
- GLib Version : 2.70.2
- python-nbxmpp Version: 3.1.0
- Gajim Version: 1.4.6
## Traceback
```
Traceback (most recent call last):
File "/gnu/store/lsfw...## Versions:
- OS: Linux 6.0.12
- GTK Version: 3.24.30
- PyGObject Version: 3.40.1
- GLib Version : 2.70.2
- python-nbxmpp Version: 3.1.0
- Gajim Version: 1.4.6
## Traceback
```
Traceback (most recent call last):
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/tcp.py", line 197, in _on_read_async_finish
data = stream.read_bytes_finish(result)
gi.repository.GLib.GError: g-tls-error-quark: TLS connection closed unexpectedly (6)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/tcp.py", line 213, in _on_read_async_finish
self._finalize('disconnected')
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/tcp.py", line 383, in _finalize
self.notify(signal_name)
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/util.py", line 428, in notify
func(self, signal_name, *args, **kwargs)
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/client.py", line 472, in _on_disconnected
self.notify('disconnected')
File "/gnu/store/lsfwppir7mgkn4xacw7af19y0xwhsg84-python-nbxmpp-3.1.0/lib/python3.9/site-packages/nbxmpp/util.py", line 428, in notify
func(self, signal_name, *args, **kwargs)
File "/gnu/store/ss8z4dgh3zpylai67yc99dngd87bj0kf-gajim-1.4.6/lib/python3.9/site-packages/gajim/common/client.py", line 300, in _on_disconnected
self.notify('state-changed', SimpleClientState.DISCONNECTED)
File "/gnu/store/ss8z4dgh3zpylai67yc99dngd87bj0kf-gajim-1.4.6/lib/python3.9/site-packages/gajim/common/helpers.py", line 1268, in notify
func(self, signal_name, *args, **kwargs)
File "/gnu/store/ss8z4dgh3zpylai67yc99dngd87bj0kf-gajim-1.4.6/lib/python3.9/site-packages/gajim/common/modules/muc.py", line 962, in _on_client_state_changed
self._reset_state()
File "/gnu/store/ss8z4dgh3zpylai67yc99dngd87bj0kf-gajim-1.4.6/lib/python3.9/site-packages/gajim/common/modules/muc.py", line 219, in _reset_state
room.set_not_joined()
AttributeError: 'BareContact' object has no attribute 'set_not_joined'
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/133Implement XEP-0410: MUC Self-Ping (Schrödinger's Chat)2023-02-22T11:11:22ZDaniel BrötzmannImplement XEP-0410: MUC Self-Ping (Schrödinger's Chat)From [XEP-0410: MUC Self-Ping (Schrödinger's Chat)](https://xmpp.org/extensions/xep-0410.html):
> The Multi-User Chat (XEP-0045) protocol was not designed to handle s2s interruptions or message loss well. Rather often, the restart of a ...From [XEP-0410: MUC Self-Ping (Schrödinger's Chat)](https://xmpp.org/extensions/xep-0410.html):
> The Multi-User Chat (XEP-0045) protocol was not designed to handle s2s interruptions or message loss well. Rather often, the restart of a server or a component causes a client to believe that it is still joined to a given chatroom, while the chatroom service does not know of this occupant.
> This specification aims to provide the most efficient, albeit not the most elegant, way for clients to periodically check whether they are still joined to a chatroom. However, it can not ensure that a client remains joined to a room without any interruptions.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/131anonymous login account status stuck at "connecting"2022-10-17T21:38:31Zdiode24anonymous login account status stuck at "connecting"From the debug log:
```
(I) nbxmpp.connection | (localhost12) Signal: data-received
(I) nbxmpp.dispatcher | (localhost12) Signal: before-dispatch
(I) nbxmpp.stream | (localhost12) Sign...From the debug log:
```
(I) nbxmpp.connection | (localhost12) Signal: data-received
(I) nbxmpp.dispatcher | (localhost12) Signal: before-dispatch
(I) nbxmpp.stream | (localhost12) Signal: stanza-received
(D) gajim.c.ged | Raise event: stanza-received
(I) nbxmpp.stream | (localhost12) Execute state machine
(I) nbxmpp.stream | (localhost12) Set state: StreamState.WAIT_FOR_FEATURES
(I) nbxmpp.dispatcher | (localhost12) Signal: before-dispatch
(I) nbxmpp.stream | (localhost12) Signal: stanza-received
(D) gajim.c.ged | Raise event: stanza-received
(I) nbxmpp.stream | (localhost12) Execute state machine
(I) nbxmpp.stream | (localhost12) Set state: StreamState.PROCEED_WITH_AUTH
(I) nbxmpp.sasl | (localhost12) Available mechanisms: {'ANONYMOUS'}
(I) nbxmpp.sasl | (localhost12) Chosen auth mechanism: ANONYMOUS
(E) nbxmpp.connection | (localhost12) Error while executing data-received:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/tcp.py", line 280, in _on_read_async_finish
self.notify('data-received', data)
File "/usr/lib/python3/dist-packages/nbxmpp/util.py", line 436, in notify
func(self, signal_name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 556, in _on_data_received
self._dispatcher.process_data(data)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 243, in process_data
self._parser.Parse(data)
File "../Modules/pyexpat.c", line 468, in EndElement
File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 739, in endtag
self.dispatch(self._mini_dom)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 354, in dispatch
self._dispatch_callback(stanza)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 671, in _xmpp_state_machine
self._on_stream_features(Features(stanza))
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 768, in _on_stream_features
self._start_auth(features)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 806, in _start_auth
self._sasl.start_auth(features)
File "/usr/lib/python3/dist-packages/nbxmpp/sasl.py", line 157, in start_auth
mech_class = self._mechanism_classes[chosen_mechanism]
KeyError: 'ANONYMOUS'
(I) gajim.c.settings | Commit
(I) gajim.p.repository | Refresh index
(I) gajim.p.repository | Refresh successful
(I) nbxmpp.connection | (localhost12) Send keepalive
(I) nbxmpp.connection | (localhost12) ::::: DATA SENT ::::
```
I setup a local prosody server and followed https://prosody.im/doc/anonymous_loginshttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/128RFC 9266: Channel Bindings for TLS 1.3 support2023-11-14T20:10:22ZNeustradamusRFC 9266: Channel Bindings for TLS 1.3 supportCan you add the support of RFC 9266: Channel Bindings for TLS 1.3?
- https://datatracker.ietf.org/doc/html/rfc9266
Little details, to know easily:
- tls-unique for TLS =< 1.2
- tls-server-end-point
- tls-exporter for TLS = 1.3
Thanks i...Can you add the support of RFC 9266: Channel Bindings for TLS 1.3?
- https://datatracker.ietf.org/doc/html/rfc9266
Little details, to know easily:
- tls-unique for TLS =< 1.2
- tls-server-end-point
- tls-exporter for TLS = 1.3
Thanks in advance.
Linked to:
- https://dev.gajim.org/search?group_id=6&project_id=11&scope=blobs&search=tls-uniquehttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/121SHA-1 support for XEP-0234 and XEP-03002022-01-26T08:31:24ZdefanorSHA-1 support for XEP-0234 and XEP-0300Currently [nbxmpp's `Hashes2` doesn't support SHA-1 hashes](https://dev.gajim.org/gajim/python-nbxmpp/-/blob/7373fe86752471d8ed25b0d08b50815759d73981/nbxmpp/protocol.py#L1600), but [XEP-0234: Jingle File Transfer](https://xmpp.org/extens...Currently [nbxmpp's `Hashes2` doesn't support SHA-1 hashes](https://dev.gajim.org/gajim/python-nbxmpp/-/blob/7373fe86752471d8ed25b0d08b50815759d73981/nbxmpp/protocol.py#L1600), but [XEP-0234: Jingle File Transfer](https://xmpp.org/extensions/xep-0234.html#sect-idm45623584297328) relies on [XEP-0300: Use of Cryptographic Hash Functions in XMPP](https://xmpp.org/extensions/xep-0300.html), which allows functions from [IANA Hash Function Textual Names Registry](http://www.iana.org/assignments/hash-function-text-names), including SHA-1, so it would be nice to handle. Otherwise, when SHA-1 is used, Gajim rather confusingly says that a transferred file might have been damaged and proposes to reload it.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/125'NoneType' object has no attribute 'remove_iq_callback'2022-03-15T20:49:46ZSteffen Jaeckel'NoneType' object has no attribute 'remove_iq_callback'## Versions
- OS: Arch Linux
- GTK Version: 3.24.29
- PyGObject Version: 3.40.1
- GLib Version : 2.68.0
- python-nbxmpp Version: 2.0.2
- Gajim Version: 1.3.2
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3.9...## Versions
- OS: Arch Linux
- GTK Version: 3.24.29
- PyGObject Version: 3.40.1
- GLib Version : 2.68.0
- python-nbxmpp Version: 2.0.2
- Gajim Version: 1.3.2
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nbxmpp/dispatcher.py", line 498, in _timeout_check
func(self._client, None, **user_data)
File "/usr/lib/python3.9/site-packages/nbxmpp/task.py", line 313, in _async_finished
self._set_finished()
File "/usr/lib/python3.9/site-packages/nbxmpp/task.py", line 214, in _set_finished
self._finalize()
File "/usr/lib/python3.9/site-packages/nbxmpp/task.py", line 320, in _finalize
self._client._dispatcher.remove_iq_callback(self._iq_id)
AttributeError: 'NoneType' object has no attribute 'remove_iq_callback'
```
## Steps to reproduce the problem
I clicked on my "Messages" window and this error popped up...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/119Project documentation2023-04-05T19:41:26ZManuelProject documentationHi,
I'm looking for an XMPP library in python and this one interests me. But to be honest I have no experience with the XMPP universe and without documentation I don;t know how to use it.
I looked the provided example but it is succinc...Hi,
I'm looking for an XMPP library in python and this one interests me. But to be honest I have no experience with the XMPP universe and without documentation I don;t know how to use it.
I looked the provided example but it is succinct.
Is there any documentation somewhere ? A more complete exemple ?
What I want to do is:
- connect to a XMPP server witn an admin user
- create a room on a MUC component
- configure it
Thanks for your help.
PS: I'm in a django project, I think there is no issue using this lib in a web application but if you think I'm wrong feel free to tell me I'm.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/115IBB sequence overflow2020-12-18T13:01:23ZZashIBB sequence overflowAccording to [XEP-0047](https://xmpp.org/extensions/xep-0047.html#send) the `seq` number must overflow after 65535 but I don't see `nbxmpp/modules/ibb.py` doing anything about this. Maybe it doesn't need to, seems Gajim does.
It may be ...According to [XEP-0047](https://xmpp.org/extensions/xep-0047.html#send) the `seq` number must overflow after 65535 but I don't see `nbxmpp/modules/ibb.py` doing anything about this. Maybe it doesn't need to, seems Gajim does.
It may be appropriate to reject `seq > 65535`.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/112Please add new SCRAM-SHA-512(-PLUS) / SCRAM-SHA3-512(-PLUS)2022-04-02T15:49:11ZNeustradamusPlease add new SCRAM-SHA-512(-PLUS) / SCRAM-SHA3-512(-PLUS)After SCRAM-SHA-1(-PLUS) and SCRAM-SHA-256(-PLUS), by same author, there are:
- SCRAM-SHA-512(-PLUS): https://tools.ietf.org/html/draft-melnikov-scram-sha-512
- SCRAM-SHA3-512(-PLUS): https://tools.ietf.org/html/draft-melnikov-scram-sha3...After SCRAM-SHA-1(-PLUS) and SCRAM-SHA-256(-PLUS), by same author, there are:
- SCRAM-SHA-512(-PLUS): https://tools.ietf.org/html/draft-melnikov-scram-sha-512
- SCRAM-SHA3-512(-PLUS): https://tools.ietf.org/html/draft-melnikov-scram-sha3-512
Can you add?
Thanks in advance.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/103Avoid unnecessary background activity2020-06-11T17:20:48ZAndrey GurskyAvoid unnecessary background activity## Versions
- OS: GNU/Linux Debian Bullseye testing
- Gajim version: b5924afddfe8cb
- GTK version: 3.24.13-1
- Python-nbxmpp version: 93e0a046cbc5
## Steps to reproduce the problem
1. Start Gajim.
1. Ensure there is almost...## Versions
- OS: GNU/Linux Debian Bullseye testing
- Gajim version: b5924afddfe8cb
- GTK version: 3.24.13-1
- Python-nbxmpp version: 93e0a046cbc5
## Steps to reproduce the problem
1. Start Gajim.
1. Ensure there is almost no traffic.
## Expected behavior
No unnecessary background activity, no polling, no timeout callbacks except for keep-alive answer within ... seconds as configured (in my case 300 seconds).
## Actual behavior
Every 5 seconds:
```
03/24/2020 13:24:32 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/24/2020 13:24:37 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/24/2020 13:24:42 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/24/2020 13:24:47 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/24/2020 13:24:52 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/24/2020 13:24:57 (I) nbxmpp.connection | (trashserver.net) Send keepalive
```
It looks like it is hard-coded: https://dev.gajim.org/gajim/python-nbxmpp/-/blob/93e0a046cbc5e14e08b5ebe6a670fcbd5cddbbb3/nbxmpp/tcp.py#L151https://dev.gajim.org/gajim/python-nbxmpp/-/issues/88Error when connect on network with captive portal2021-02-19T12:38:24ZtuxayoError when connect on network with captive portal## Versions
- OS: Antergos Linux
- GTK+ Version: 3.24.12
- PyGObject Version: 3.34.0
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3.7/site-pa...## Versions
- OS: Antergos Linux
- GTK+ Version: 3.24.12
- PyGObject Version: 3.34.0
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 661, in _do_receive
received = decode_py2(received, 'utf-8')
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
string = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 454: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3.7/site-packages/nbxmpp/idlequeue.py", line 563, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3.7/site-packages/nbxmpp/idlequeue.py", line 411, in _process_events
obj.pollin()
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 451, in pollin
self._do_receive()
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 671, in _do_receive
received = decode_py2(received, 'utf-8')
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
string = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 454: invalid start byte
```
## Steps to reproduce the problem
I didn't retried but here is what happened:
- everything okay
- suspend system
- wake up system in a place without network
- (actually the error might be here, I'm not sure)
- connect to a network that has a captive portal
- get this error
https://dev.gajim.org/gajim/python-nbxmpp/-/issues/83Support loading client certs in PEM format2019-09-05T15:52:52ZPhilipp Höristphilipp@hoerist.comSupport loading client certs in PEM formathttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/72KeyError in self.queue[fd].read_timeout()2022-05-03T14:03:30ZdeafboyKeyError in self.queue[fd].read_timeout()## Versions
- OS: Linux
- GTK+ Version: 3.22.30
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.2+gajim@65dc8ed89254a8bec6e8eb0eb31ca0640575ff25
## Traceback
```
Traceback (most recent call last):
File...## Versions
- OS: Linux
- GTK+ Version: 3.22.30
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.2+gajim@65dc8ed89254a8bec6e8eb0eb31ca0640575ff25
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gajim/gui_interface.py", line 2251, in process_connections
app.idlequeue.process()
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 583, in process
self._check_time_events()
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 339, in _check_time_events
self.queue[fd].read_timeout()
KeyError: 23
```
## Steps to reproduce the problem
Unknown. Gajim in running in background as usual. The main window seems to be fully functional.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/98Use XEP-0198 ack requests instead of iq pings when available2020-02-10T19:37:17ZzimioUse XEP-0198 ack requests instead of iq pings when availableIn xep-198 it says:
"When an \<r/> element ("request") is received, the recipient MUST acknowledge it by sending an \<a/> element to the sender containing a value of 'h' that is equal to the number of stanzas handled by the recipient of...In xep-198 it says:
"When an \<r/> element ("request") is received, the recipient MUST acknowledge it by sending an \<a/> element to the sender containing a value of 'h' that is equal to the number of stanzas handled by the recipient of the \<r/> element. The response SHOULD be sent as soon as possible after receiving the \<r/> element, and MUST NOT be withheld for any condition other than a timeout."
Gajim doesn't have a timeout for requests. There should be a timeout for that, and it should attempt reconnection.