python-nbxmpp issueshttps://dev.gajim.org/gajim/python-nbxmpp/-/issues2024-02-12T21:47:12Zhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/154MUC subject should not update if there is a <thread/>2024-02-12T21:47:12ZsingpolymaMUC subject should not update if there is a <thread/>Thus saith the xep:
```
Note: A message with a <subject/> and a <body/> or a <subject/> and a <thread/> is a legitimate message, but it SHALL NOT be interpreted as a subject change.
```Thus saith the xep:
```
Note: A message with a <subject/> and a <body/> or a <subject/> and a <thread/> is a legitimate message, but it SHALL NOT be interpreted as a subject change.
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/150Regular MUC members can't change a room's subject when hosted on prosody, des...2023-08-13T08:46:41Zlis sineRegular MUC members can't change a room's subject when hosted on prosody, despite having the proper permission## Versions
- OS: Void Linux
- Gajim version: 1.8.0
- GTK version: 3.24.38
- Python-nbxmpp version: 4.3.0
## Steps to reproduce the problem
1. Log in to Gajim with an account that's a `Member` in a prosody-hosted group chat (...## Versions
- OS: Void Linux
- Gajim version: 1.8.0
- GTK version: 3.24.38
- Python-nbxmpp version: 4.3.0
## Steps to reproduce the problem
1. Log in to Gajim with an account that's a `Member` in a prosody-hosted group chat (or with no affiliation in a public channel)
2. Make sure the Owner Has set `Allow anyone to set the room's subject` to enabled
(that's the default for newly created rooms using Gajim)
3. Try to change the room's subject (using the Member/no affiliation account)
## Expected behavior
I'm able to change the room's subject
## Actual behavior
The text field for changing the room's subject is greyed-out
## More information
If I use dino, I'm able to change the subject using /topic
(and I'm not able to do so, if the permission is set to Owners/Admins only)
So, Gajim is able to correctly update the `Allow anyone to set the room's subject` field in the MUC settings (stored server-side), but for some reason Gajim isn't able to act on its value.
Note that everything works correctly when the MUC is hosted on an ejabberd server.
This might be unrelated, but I captured logs when changing the `Allow anyone to set the room's subject` from disabled to enabled, once using ejabberd (messaging.one) and once using prosody (jabbers.one)
I attached the full logs as well as summarized versions showing only the relevant lines.
[jabbers.one](/uploads/f677c6cb7857cbf3544f86f48b49cfb8/jabbers.one)
[jabbers.one_summary](/uploads/f8cba2aa1c5c7e776468aa410cc543c8/jabbers.one_summary)
[messaging.one](/uploads/0c3fb23f20044d68ec02525532d01b20/messaging.one)
[messaging.one_summary](/uploads/1dee4147cda3d100e2d6171f504f7201/messaging.one_summary)
P.S: Prosody's devs told me that the absence of a `value` tag implies a value of false.
P.P.S: unrelated to the bug, but when opening a room's settings in Gajim's UI, two identical copies of the following stanza are sent at roughly the same time (but with different id's)
```xml
<!-- Outgoing Fri 11 Aug 2023 03:32:01 PM CET (lissine@messaging.one) -->
<iq xmlns="jabber:client" to="mohegax@conference.messaging.one" type="get" id="fa15badb-8a2f-4d95-bb7a-3bde7f8f824a">
<query xmlns="http://jabber.org/protocol/muc#owner" />
</iq>
```
The iq results are obviously the same.
Unless this is intended behavior, the redundant stanza should probably be removed.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/136file preview error on invalid link to pdf2023-01-17T15:47:03Zdiode24file preview error on invalid link to pdf## Versions:
- OS: Ubuntu 22.04.1 LTS 22.04 (jammy)
- GTK Version: 3.24.33
- PyGObject Version: 3.42.1
- GLib Version : 2.71.3
- python-nbxmpp Version: 4.0.0
- Gajim Version: 1.6.0
## Traceback
```
Traceback (most recent call last):
F...## Versions:
- OS: Ubuntu 22.04.1 LTS 22.04 (jammy)
- GTK Version: 3.24.33
- PyGObject Version: 3.42.1
- GLib Version : 2.71.3
- python-nbxmpp Version: 4.0.0
- Gajim Version: 1.6.0
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/http.py", line 312, in _on_response
self._input_stream = session.send_finish(result)
gi.repository.GLib.GError: g-io-error-quark: Operation was cancelled (19)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/http.py", line 316, in _on_response
self._set_failed(HTTPRequestError.CANCELLED)
File "/usr/lib/python3/dist-packages/nbxmpp/http.py", line 464, in _set_failed
self._cleanup()
File "/usr/lib/python3/dist-packages/nbxmpp/http.py", line 489, in _cleanup
del self._cancellable
AttributeError: _cancellable
```
## Steps to reproduce the problem
1. enable file preview
2. post link to a pdf from archive.org with date removed from URL
original link:
`https://web.archive.org/web/20081001170454/https://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf`
posted link has date removed:
`https://web.archive.org/web/https://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf`https://dev.gajim.org/gajim/python-nbxmpp/-/issues/59Wrong authentication mechanism while using GSSAPI for one of the account on t...2021-02-19T17:46:20ZAleksandr KerovWrong authentication mechanism while using GSSAPI for one of the account on the same serverIf you have second account from the same server, and server promote GSSAPI auth, Gajim would use default kerberos ticket for auth. So, you will get two connection to the same account. I think Gajim should not to use GSSAPI, if password i...If you have second account from the same server, and server promote GSSAPI auth, Gajim would use default kerberos ticket for auth. So, you will get two connection to the same account. I think Gajim should not to use GSSAPI, if password is specified or check JID user match kerberos ticket username. Workaround: force authentication_mechanisms to what you prefer.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/111MUC: GroupchatRoster error when right-clicking participant2020-10-05T15:38:21ZDaniel BrötzmannMUC: GroupchatRoster error when right-clicking participant## Versions
- OS: Linux Mint 20
- GTK Version: 3.24.20
- PyGObject Version: 3.36.0
- GLib Version : 2.64.2
- python-nbxmpp Version: 1.0.2
- Gajim Version: 1.2.91+gajim@b4c10c7111a76cca76baac02a51b5c16a5afc635
## Traceback
```
Traceback ...## Versions
- OS: Linux Mint 20
- GTK Version: 3.24.20
- PyGObject Version: 3.36.0
- GLib Version : 2.64.2
- python-nbxmpp Version: 1.0.2
- Gajim Version: 1.2.91+gajim@b4c10c7111a76cca76baac02a51b5c16a5afc635
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gajim/gtk/groupchat_roster.py", line 294, in _on_roster_button_press_event
self._show_contact_menu(nick)
File "/usr/lib/python3/dist-packages/gajim/gtk/groupchat_roster.py", line 304, in _show_contact_menu
menu = get_groupchat_roster_menu(self._account,
File "/usr/lib/python3/dist-packages/gajim/gui_menu_builder.py", line 859, in get_groupchat_roster_menu
build_invite_submenu(item,
File "/usr/lib/python3/dist-packages/gajim/gui_menu_builder.py", line 149, in build_invite_submenu
menuitem = Gtk.MenuItem.new_with_label(room_jid.localpart)
TypeError: Argument 0 does not allow None as a value
```
I report this for somebody else.
## Steps to reproduce
Right-click on any nickname of a group chat I’m the owner of.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/101RuntimeError: Converting the GError failed2020-08-17T06:15:17ZsowidvhuRuntimeError: Converting the GError failed## Versions
- OS: Windows 10
- GTK Version: 3.24.14
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.94
- Gajim Version: 1.1.94
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/a...## Versions
- OS: Windows 10
- GTK Version: 3.24.14
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.94
- Gajim Version: 1.1.94
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/tcp.py", line 251, in _on_write_all_async_finished
RuntimeError: Converting the GError failed
```
## Steps to reproduce the problem
Actually i dunno, it appeared like ten times after unlocking the PC after a while.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/90Connection fails if trying to connect using TOR2020-03-07T21:47:43ZMartinConnection fails if trying to connect using TOR## Versions
- OS: Debian 9 Stretch
- Gajim version: gajim-default-nightly/unstable,unstable,unstable,now 20171023-1 (in info it says 0.16.11.1)
- GTK version: 3.22.11
- Python-nbxmpp version: 0.6.0
## Steps to reproduce the pr...## Versions
- OS: Debian 9 Stretch
- Gajim version: gajim-default-nightly/unstable,unstable,unstable,now 20171023-1 (in info it says 0.16.11.1)
- GTK version: 3.22.11
- Python-nbxmpp version: 0.6.0
## Steps to reproduce the problem
Set up your account to connect via Proxy (SOCKS5, localhost, 9050)
## Expected behavior
Gajim starts and is connecting using TOR
## Actual behavior
Gajim fails to connect (changing localhost to 127.0.0.1 doesn't make any difference)
```
26.10.2017 19:34:41 (I) nbxmpp.proxy_connectors: Authentification successfull. Jabber server contacted.
26.10.2017 19:34:41 (I) nbxmpp.transports_nb: Plugging fd 18, W:True, R:True
26.10.2017 19:34:41 (I) nbxmpp.transports_nb: pollout called, state == PROXY_CONNECTING
26.10.2017 19:34:41 (I) nbxmpp.transports_nb: Plugging fd 18, W:False, R:True
26.10.2017 19:34:41 (E) nbxmpp.transports_nb: _do_send:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 584, in _do_send
sent_data = decode_py2(sent_data, 'utf-8')
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
string = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 5: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 588, in _do_send
if ord(char) & 0xc0 == 0xc0:
TypeError: ord() expected string of length 1, but int found
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 584, in _do_send
sent_data = decode_py2(sent_data, 'utf-8')
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
string = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 5: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 588, in _do_send
if ord(char) & 0xc0 == 0xc0:
TypeError: ord() expected string of length 1, but int found
26.10.2017 19:34:41 (I) nbxmpp.client_nb: Disconnecting NBClient:
26.10.2017 19:34:41 (I) nbxmpp.plugin: Plugging <nbxmpp.transports_nb.NonBlockingTCP object at 0x7f887be597f0> __OUT__ of <nbxmpp.client_nb.NonBlockingClient object at 0x7f888998f4a8>.
26.10.2017 19:34:41 (E) gajim.c.connection: Connection to proxy failed:
26.10.2017 19:34:41 (D) gajim.c.ged: our-show Args: (<gajim.common.connection_handlers_events.OurShowEvent object at 0x7f887be4eeb8>,)
26.10.2017 19:34:41 (D) gajim.plugin_system: ClientsIconsPlugin.connect_with_roster_draw_contact() <entered>
26.10.2017 19:34:41 (D) gajim.plugin_system: ClientsIconsPlugin.connect_with_roster_draw_contact() <left>
26.10.2017 19:34:41 (D) gajim.conversation_textview: Printed Line: 4, martin ist jetzt Abgemeldet, 1509039281.6551602, inserted after: None, stanza-id: None, correct-id: None
26.10.2017 19:34:41 (D) gajim.plugin_system: ClientsIconsPlugin.connect_with_roster_draw_contact() <entered>
26.10.2017 19:34:41 (D) gajim.plugin_system: ClientsIconsPlugin.connect_with_roster_draw_contact() <left>
26.10.2017 19:34:41 (D) gajim.c.ged: connection-lost Args: (<gajim.common.connection_handlers_events.ConnectionLostEvent object at 0x7f8889987f60>,)
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/55Endless loop if server crashes while negotiating TLS2020-03-07T21:43:19ZPhilipp Höristphilipp@hoerist.comEndless loop if server crashes while negotiating TLS```
_____________
<?xml version='1.0'?><stream:stream xmlns='jabber:client' from='localhost' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' id='c5a9f300-db2e-40b2-a505-b05373f259c0' version='1.0'><stream:features><starttls...```
_____________
<?xml version='1.0'?><stream:stream xmlns='jabber:client' from='localhost' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' id='c5a9f300-db2e-40b2-a505-b05373f259c0' version='1.0'><stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism></mechanisms></stream:features>
_____________
27/07/18 13:45:29 (D) gajim.c.ged: stanza-received Args: (<gajim.common.connection_handlers_events.StanzaReceivedEvent object at 0x7f7f1ced1cc0>,)
27/07/18 13:45:29 (I) nbxmpp.client_nb: -------------xmpp_connect_machine() >> mode: RECEIVE_DOCUMENT_ATTRIBUTES, data: <?xml version='1.0'?...
27/07/18 13:45:29 (I) nbxmpp.client_nb: got STREAM FEATURES in first recv
27/07/18 13:45:29 (I) nbxmpp.client_nb: -------------xmpp_connect_machine() >> mode: STREAM_STARTED, data: None...
27/07/18 13:45:29 (I) nbxmpp.client_nb: TLS supported by remote server. Requesting TLS start.
27/07/18 13:45:29 (I) nbxmpp.client_nb: -------------tls_negotiaton_handler() >> tag: None
27/07/18 13:45:29 (I) nbxmpp.transports_nb: Plugging fd 19, W:True, R:True
27/07/18 13:45:29 (I) nbxmpp.transports_nb: pollout called, state == CONNECTED
27/07/18 13:45:29 (I) nbxmpp.transports_nb: Plugging fd 19, W:False, R:True
27/07/18 13:45:29 (I) nbxmpp.client_nb: raising event from transport: :::::DATA SENT::::
_____________
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
_____________
27/07/18 13:45:29 (D) gajim.c.ged: stanza-sent Args: (<gajim.common.connection_handlers_events.StanzaSentEvent object at 0x7f7f1ced1eb8>,)
27/07/18 13:45:29 (I) nbxmpp.transports_nb: pollin called, state == CONNECTED
27/07/18 13:45:29 (I) nbxmpp.idlequeue: read timeout removed for fd 19
27/07/18 13:45:29 (I) nbxmpp.client_nb: raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
27/07/18 13:45:29 (D) gajim.c.ged: stanza-received Args: (<gajim.common.connection_handlers_events.StanzaReceivedEvent object at 0x7f7f1ced1f60>,)
27/07/18 13:45:29 (I) nbxmpp.transports_nb: pollin called, state == CONNECTED
27/07/18 13:45:29 (I) nbxmpp.idlequeue: read timeout removed for fd 19
27/07/18 13:45:29 (I) nbxmpp.client_nb: raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
27/07/18 13:45:29 (D) gajim.c.ged: stanza-received Args: (<gajim.common.connection_handlers_events.StanzaReceivedEvent object at 0x7f7f1ced1f60>,)
27/07/18 13:45:29 (I) nbxmpp.transports_nb: pollin called, state == CONNECTED
27/07/18 13:45:29 (I) nbxmpp.idlequeue: read timeout removed for fd 19
27/07/18 13:45:29 (I) nbxmpp.client_nb: raising event from transport: :::::DATA RECEIVED::::
_____________
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/86AttributeError in _process_pubsub_location: 'NoneType' object has no attribut...2019-12-06T21:32:02Zwess nicholsAttributeError in _process_pubsub_location: 'NoneType' object has no attribute 'getTag'## Versions
- OS: Ubuntu 19.04
- GTK Version: 3.24.8
- PyGObject Version: 3.32.0
- GLib Version : 2.60.0
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@b60b725a9d31f1e018f3c1ad75b03b43849f394d
## Traceback
```
Traceback (...## Versions
- OS: Ubuntu 19.04
- GTK Version: 3.24.8
- PyGObject Version: 3.32.0
- GLib Version : 2.60.0
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@b60b725a9d31f1e018f3c1ad75b03b43849f394d
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 631, in dispatch
handler['func'](session, stanza, properties)
File "/usr/lib/python3/dist-packages/nbxmpp/modules/location.py", line 49, in _process_pubsub_location
location_node = item.getTag('geoloc', namespace=NS_LOCATION)
AttributeError: 'NoneType' object has no attribute 'getTag'
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/85UnicodeEncodeError: 'OpaqueString' codec can't encode character (DISALLOWED/p...2019-10-11T20:35:52ZDaniel BrötzmannUnicodeEncodeError: 'OpaqueString' codec can't encode character (DISALLOWED/precis_ignorable_properties)## Versions
- OS: Manjaro Linux
- GTK Version: 3.24.10
- PyGObject Version: 3.32.2
- GLib Version : 2.60.4
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/pyth...## Versions
- OS: Manjaro Linux
- GTK Version: 3.24.10
- PyGObject Version: 3.32.2
- GLib Version : 2.60.4
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 772, in validate_resourcepart
return opaque.enforce(resourcepart)
File "/usr/lib/python3.7/site-packages/precis_i18n/profile.py", line 70, in enforce
return self.base.enforce(temp, self.name)
File "/usr/lib/python3.7/site-packages/precis_i18n/baseclass.py", line 57, in enforce
raise_error(codec_name, value, i, kind)
File "/usr/lib/python3.7/site-packages/precis_i18n/baseclass.py", line 103, in raise_error
raise UnicodeEncodeError(encoding, value, start, end, reason)
UnicodeEncodeError: 'OpaqueString' codec can't encode character '\u061c' in position 0: DISALLOWED/precis_ignorable_properties
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 662, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/idlequeue.py", line 555, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/idlequeue.py", line 406, in _process_events
obj.pollin()
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/transports.py", line 443, in pollin
self._do_receive()
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/transports.py", line 664, in _do_receive
self._on_receive(received)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/transports.py", line 678, in _on_receive
self.on_receive(data)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/dispatcher.py", line 648, in _WaitForData
res = self.ProcessNonBlocking(data)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/dispatcher.py", line 307, in ProcessNonBlocking
self.Stream.Parse(data)
File "/build/python/src/Python-3.7.4/Modules/pyexpat.c", line 469, in EndElement
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/simplexml.py", line 642, in endtag
self.dispatch(self._mini_dom)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/dispatcher.py", line 571, in dispatch
stanza, properties.mam = unwrap_mam(stanza, own_jid)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/modules/misc.py", line 96, in unwrap_mam
message = Message(node=forwarded.getTag('message'))
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 1223, in __init__
payload=payload, timestamp=timestamp, xmlns=xmlns, node=node)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 981, in __init__
self.setFrom(self['from'])
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 1067, in setFrom
self.setAttr('from', JID(val))
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 827, in __init__
self.node, self.domain, self.resource = parse_jid(jid)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 738, in parse_jid
resourcepart = validate_resourcepart(resourcepart)
File "/usr/lib/python3.7/site-packages/nbxmpp-0.9.92-py3.7.egg/nbxmpp/protocol.py", line 774, in validate_resourcepart
raise ResourcepartNotAllowedChar
nbxmpp.protocol.ResourcepartNotAllowedChar: Not allowed character in resourcepart
```
## Steps to reproduce the problem
Triggered by this message in xsf@muc.xmpp.org http://logs.xmpp.org/xsf/2019-09-09?p=h#2019-09-09-2977d6acb5137447 containing '\u061c'. The log following this message has some explanation.