python-nbxmpp issueshttps://dev.gajim.org/gajim/python-nbxmpp/-/issues2017-10-08T00:04:12Zhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/40random programming errors detected...2017-10-08T00:04:12Zkevstanzarandom programming errors detected...pops up randomly now and then.. very annoying...
```
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 549, in _process_events
return IdleQueue._process_events(self, fd, flags)
F...pops up randomly now and then.. very annoying...
```
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 549, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 409, in _process_events
obj.pollin()
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 444, in pollin
self._do_receive()
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 667, in _do_receive
self._on_receive(received)
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 681, in _on_receive
self.on_receive(data)
File "/usr/lib/python2.7/site-packages/nbxmpp/proxy_connectors.py", line 229, in _on_req_sent
self.on_failure(txt)
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 218, in _on_connect_failure
self.on_connect_failure(err_message=err_message)
File "/usr/lib/python2.7/site-packages/nbxmpp/client_nb.py", line 285, in _try_next_ip
on_connect_failure=self._try_next_ip)
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 358, in connect
socket: %s' % atr(e))
NameError: global name 'atr' is not defined
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/41super() call is not python2.7 compatible?2017-10-08T00:04:12ZPolynomdivisionsuper() call is not python2.7 compatible?Hi,
I'm using gajim-nightly on Ubuntu.
Gajim still uses python2.7?
Here is a patch that fixes the problems in the `protocol.py` when calling the super() function:
[fix_super_call.patch](/uploads/6986354710eef5611d31a9315b4cb612/fix_sup...Hi,
I'm using gajim-nightly on Ubuntu.
Gajim still uses python2.7?
Here is a patch that fixes the problems in the `protocol.py` when calling the super() function:
[fix_super_call.patch](/uploads/6986354710eef5611d31a9315b4cb612/fix_super_call.patch)
This function call is python3 and python2.7 compatible...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/42def delChild trys to remove node that is not a child2017-10-08T00:04:12ZPolynomdivisiondef delChild trys to remove node that is not a childHi,
I'm getting this error:
28.07.2017 10:13:50 (E) gajim.c.ged Error while running an even handler: <bound method UrlImagePreviewPlugin.handle_message_received of <url_image_preview.url_image_preview.UrlImagePreviewPlugin o...Hi,
I'm getting this error:
28.07.2017 10:13:50 (E) gajim.c.ged Error while running an even handler: <bound method UrlImagePreviewPlugin.handle_message_received of <url_image_preview.url_image_preview.UrlImagePreviewPlugin object at 0x7f051c3adf10>>
Traceback (most recent call last):
File "/usr/share/gajim/src/common/ged.py", line 93, in raise_event
if handler(*args, **kwargs):
File "/home/nick/.local/share/gajim/plugins/url_image_preview/url_image_preview.py", line 104, in handle_message_received
event.stanza.delChild(oob_node)
File "/usr/lib/python2.7/dist-packages/nbxmpp/simplexml.py", line 263, in delChild
self.kids.remove(node)
ValueError: list.remove(x): x not in list
So UrlImagePreviewPlugin is trying to delete something thats not in list?
I would do something like this in this patch here:
[fix_delete_child.patch](/uploads/0b03d2e7b57ff39642b9376a593713e1/fix_delete_child.patch)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/81High CPU usage when connected to a domain with both AAAA and A record but no ...2020-03-07T21:50:09ZCedricHigh CPU usage when connected to a domain with both AAAA and A record but no IPv6 support## Versions
- OS: Mac OS 10.13.1
- Gajim version: Master branch commit gajim@4c45c186c4bd41233a7cc9dcd5b53e760ac3ec26
- GTK version: 3.22.25
- Python-nbxmpp version: Master branch commit 3417ccbf921c7f5e68ce05e8108f4cf2fcc80860
...## Versions
- OS: Mac OS 10.13.1
- Gajim version: Master branch commit gajim@4c45c186c4bd41233a7cc9dcd5b53e760ac3ec26
- GTK version: 3.22.25
- Python-nbxmpp version: Master branch commit 3417ccbf921c7f5e68ce05e8108f4cf2fcc80860
## Steps to reproduce the problem
I installed python3 master branch version like described in the wiki (https://dev.gajim.org/gajim/gajim/wikis/help/GajimMacOSX) and had no issues connecting to my server and to write other people.
## Actual behavior
The cpu usage of the python gajim process is always at 100%. And the log is spammed with this error:
`
...
03.11.2017 20:31:11 (E) nbxmpp.transports_nb _do_send:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 573, in _do_send
send_count = self._send(self.sendbuff)
OSError: [Errno 9] Bad file descriptor
...
`
When I run gajim in a iPython console with profiling enabled I get the related message:
`03.11.2017 20:28:27 (W) nbxmpp.transports_nb calling send on empty buffer and queue`
I'm happy to provide additional info if needed. I would be great to have a xmpp client on Mac OS again.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/43Provide uninstall option in setup.py2017-11-20T20:51:04ZvanitasvitaeProvide uninstall option in setup.pyThere is no way to uninstall this library other than manually searching for the files and deleting them.
A uninstall task would come in handy.There is no way to uninstall this library other than manually searching for the files and deleting them.
A uninstall task would come in handy.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/44UnicodeDecodeError: 'utf8' codec can't decode byte 0xfd in position 180: inva...2017-12-06T09:55:01Zdon fuzUnicodeDecodeError: 'utf8' codec can't decode byte 0xfd in position 180: invalid start byte**Please first check if another issue has been opened for your problem**
## Versions
- OS: Ubuntu 17.04
- Gajim version: 16.6 (from ubuntu repo) and 16.8 (tar.gz)
- GTK version: libgtk-3-0 Version: 3.22.11-0ubuntu3
- Python-nbx...**Please first check if another issue has been opened for your problem**
## Versions
- OS: Ubuntu 17.04
- Gajim version: 16.6 (from ubuntu repo) and 16.8 (tar.gz)
- GTK version: libgtk-3-0 Version: 3.22.11-0ubuntu3
- Python-nbxmpp version: 0.5.4-1
## Steps to reproduce the problem
1. after start of gajim
1. disable/enable network interface
Faced issue with gajim 16.6 then I switched to 16.8 and got the same behaviour.
## Expected behavior
## Actual behavior
`Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nbxmpp/idlequeue.py", line 549, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python2.7/dist-packages/nbxmpp/idlequeue.py", line 409, in _process_events
obj.pollin()
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 444, in pollin
self._do_receive()
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 662, in _do_receive
received = decode_py2(received, 'utf-8')
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
string = string.decode(encoding)
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfd in position 180: invalid start byte`
Only position number in last line varies.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/45smack acks not sent in time2018-01-23T22:39:12ZAndrey Gurskysmack acks not sent in timeIf smack request is not answered promptly, this can lead to connection termination. @lovetox has proposed a workaround for https://dev.gajim.org/gajim/gajim/issues/8758. After applying it, the original issue turns from a presumably pure ...If smack request is not answered promptly, this can lead to connection termination. @lovetox has proposed a workaround for https://dev.gajim.org/gajim/gajim/issues/8758. After applying it, the original issue turns from a presumably pure Gajim's issue into an interoperation issue between Gajim and ejabberd.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/46Unable to load client pkcs12 certificate from file2017-12-12T00:51:38ZMiguel NPUnable to load client pkcs12 certificate from fileGajim can't establish a connection to my openfire server using mutual authentication. Wireshark reveals that Gajim is sending an empty certificate to the server. At first I thought it was related to my custom made pkcs12 certificate till...Gajim can't establish a connection to my openfire server using mutual authentication. Wireshark reveals that Gajim is sending an empty certificate to the server. At first I thought it was related to my custom made pkcs12 certificate till I saw the following error in the Gajim logging:
(W) nbxmpp.tls_nb: Unable to load client pkcs12 certificate from file C:\test.p12: ([('asn1 encoding routines', 'asn1_d2i_read_bio', 'not enough data')],) ... Is it a valid PKCS12 cert?
I'm not a python programmer but I was able to reproduce the error easily with this small script:
import OpenSSL.SSL
import OpenSSL.crypto
p12 = OpenSSL.crypto.load_pkcs12(open("C:/test.p12",'r').read(),"password")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_D2I_READ_BIO', 'not enough data')]
But if I change file opening mode to 'rb', it works!
Please, can anybody verify this?
Any help will be appreciated. Thanks.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/47File transfer windows limited2018-01-11T15:34:00ZRômulo FerreiraFile transfer windows limited## Versions
- OS: Windows 7 Professional
- Gajim version: 0.16.9
- GTK version: 2.24.10
- Python-nbxmpp version: 2.24.0
## Steps to reproduce the problem
1. Open gajim in windows and set up an account.
2. Logout and logon ...## Versions
- OS: Windows 7 Professional
- Gajim version: 0.16.9
- GTK version: 2.24.10
- Python-nbxmpp version: 2.24.0
## Steps to reproduce the problem
1. Open gajim in windows and set up an account.
2. Logout and logon on windows.
3. Open the gajim with the previously configured account.
4. Try to send to some contact of your list some file below 10MB.
5. Exception raised:
A programming error has been detected
It's probably not fatal, but it should be reported to developers.
OBS: Network and windows without firewall or any active anti virus application.
It was verified that in the first logon of a new user in the machine followed by the configuration of some account and carried
out the test of shipment for files smaller than 10M was successful. However after logging out and logging in again the exception
is thrown onto the screen.
![erro](/uploads/e6ea787edbadd684707c1b12a8195435/erro.jpg)
When sending files above 10M I can see in the ejabberd log the connection of the machine to the server. When it is less than 10M
nothing arrives in the log.
![log](/uploads/32c767d8bce38d569966c9fdffebf79e/log.jpg)
## Expected behavior
Uploading files over the network
## Actual behavior
Traceback (most recent call last):
File "src\dialogs.py", line 1495, in on_dialog_response
File "src\filetransfers_window.py", line 305, in on_ok
File "src\filetransfers_window.py", line 360, in send_file
File "src\common\jingle.py", line 168, in start_file_transfer
File "src\common\jingle_session.py", line 300, in start_session
File "src\common\jingle_session.py", line 256, in on_session_state_changed
File "src\common\jingle_session.py", line 720, in __session_initiate
File "src\common\jingle_session.py", line 590, in __broadcast
File "src\common\jingle_content.py", line 116, in on_stanza
File "src\common\jingle_content.py", line 166, in __fill_jingle_stanza
File "src\common\jingle_content.py", line 200, in _fill_content
File "src\common\jingle_ft.py", line 183, in _calcHash
File "C:\Python27\lib\site-packages\nbxmpp\simplexml.py", line 508, in __getattr__
AttributeErrorhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/48UnicodeDecodeError exception when working with SOCKS5 proxy2018-02-25T20:44:56Zl-n-sUnicodeDecodeError exception when working with SOCKS5 proxyMultiple exceptions are thrown when nbxmpp handles SOCKS5 proxy reply with a domain name. See [RFC](https://tools.ietf.org/html/rfc1928#section-6).
Example reply which causes exceptions:
```
0000 05 00 00 03 3c 77 63 34 64 73 67 7a ...Multiple exceptions are thrown when nbxmpp handles SOCKS5 proxy reply with a domain name. See [RFC](https://tools.ietf.org/html/rfc1928#section-6).
Example reply which causes exceptions:
```
0000 05 00 00 03 3c 77 63 34 64 73 67 7a 79 6d 62 73 ....<wc4dsgzymbs
0010 69 78 76 33 73 70 67 6d 61 6b 71 63 72 68 68 79 ixv3spgmakqcrhhy
0020 63 77 65 33 33 74 70 77 6e 64 66 67 73 71 66 65 cwe33tpwndfgsqfe
0030 71 74 67 34 73 69 65 79 71 2e 62 33 32 2e 69 32 qtg4sieyq.b32.i2
0040 70 de 60 p.`
```
Full info [at gajim issue tracker](https://dev.gajim.org/gajim/gajim/issues/8914)https://dev.gajim.org/gajim/python-nbxmpp/-/issues/49python-nbxmpp fails to parse a JID's domainpart expressed as an IP-literal2018-05-08T08:28:31ZChristoph Erhardtpython-nbxmpp fails to parse a JID's domainpart expressed as an IP-literalFirst off, I'm using Gajim 0.16.9 with python2-nbxmpp 0.6.1 on Fedora 27, but the relevant part appears to be unchanged in the current master branch.
The following string, which contains an IP-literal instead of an ifqdn as the domainpa...First off, I'm using Gajim 0.16.9 with python2-nbxmpp 0.6.1 on Fedora 27, but the relevant part appears to be unchanged in the current master branch.
The following string, which contains an IP-literal instead of an ifqdn as the domainpart, should be a valid JID according to the RFC (https://tools.ietf.org/html/rfc7622#section-3.1): `~user@[2001:638:a000:1234::ffff:56]`
Such JIDs are not usually seen in the wild - but the Biboumi IRC-to-XMPP gateway maps IRC hostmasks to JIDs and may thus produce JIDs similar to the above example.
For me, this causes Gajim to frequently throw the following exception, for example when an IRC user whose domainpart is an IP-literal gets their mode changed in a channel (e.g. `+o` or `-o`):
```python
13/03/18 12:34:56 (W) gajim.c.jingle Invalid JID: ~user@[2001:638:a000:1234::ffff:56], ignoring it
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/dispatcher_nb.py", line 498, in dispatch
handler['func'](session, stanza)
File "/usr/share/gajim/src/common/connection_handlers.py", line 1606, in _ErrorCB
stanza=iq_obj))
File "/usr/share/gajim/src/common/nec.py", line 74, in push_incoming_event
if event_object.generate():
File "/usr/share/gajim/src/common/connection_handlers_events.py", line 687, in generate
self.get_jid_resource(check_fake_jid=True)
File "/usr/share/gajim/src/common/connection_handlers_events.py", line 79, in get_jid_resource
self.fjid = helpers.get_full_jid_from_iq(self.stanza)
File "/usr/share/gajim/src/common/helpers.py", line 932, in get_full_jid_from_iq
return parse_jid(str(iq_obj.getFrom()))
File "/usr/share/gajim/src/common/helpers.py", line 115, in parse_jid
return prep(*decompose_jid(str(jidstring)))
File "/usr/share/gajim/src/common/helpers.py", line 191, in prep
raise InvalidFormat, _('Invalid character in hostname.')
common.helpers.InvalidFormat: Invalid character in hostname.
```
When Gajim is launched from a shell, all this spam goes to the terminal - but when I start Gajim from the GUI, an annoying exception window pops up every time.
The above stack trace doesn't contain the relevant part of the call stack because `prep` catches a `UnicodeError` only to throw an `InvalidFormat`. The interesting part is the origin of the `UnicodeError` in `stringprepare.py`:
```
prepare
nameprep
check_prohibiteds
```
All of `[` (0x5b), `:` (0x3a) and `]` (0x5d) are contained in the [list of prohibited characters](nbxmpp/stringprepare.py#L186), which is the cause of the exception.
The error is triggered by the following XMPP traffic.
User discovery after joining the channel via Biboumi:
```xml
<!-- In Tue 13 Mar 2018 12:23:45 CET -->
<presence to='myself@example.org/Gajim_' from='#channel%irc.example.org@biboumi.example.org/User'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='admin' jid='~user@[2001:638:a000:1234::ffff:56]' role='moderator'/>
</x>
</presence>
```
Now somebody demotes `User` to `-o` in `#channel`:
```xml
<!-- In Tue 13 Mar 2018 12:34:56 CET -->
<message to='myself@example.org/Gajim_' from='#channel%irc.example.org@biboumi.example.org' type='groupchat'>
<body>Mode #channel [-o User] by Otheruser</body>
</message>
<!-- In Tue 13 Mar 2018 12:34:56 CET -->
<presence to='myself@example.org/Gajim_' from='#channel%irc.example.org@biboumi.example.org/User'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='participant'/>
</x>
</presence>
<!-- Out Tue 13 Mar 2018 12:34:56 CET -->
<iq xmlns="jabber:client" to="~user@[2001:638:a000:1234::ffff:56]" type="get" id="123a4567-8901-2345-bc6d-ef7a8b901c23">
<vCard xmlns="vcard-temp" />
</iq>
<!-- In Tue 13 Mar 2018 12:34:56 CET -->
<iq xml:lang='en' to='myself@example.org/Gajim_' from='~user@[2001:638:a000:1234::ffff:56]' type='error' id='123a4567-8901-2345-bc6d-ef7a8b901c23'>
<vCard xmlns='vcard-temp'/>
<error code='504' type='wait'>
<remote-server-timeout xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Connection failed: connection refused</text>
</error>
</iq>
```
As far as I can tell, the exception is thrown as a result of the incoming `iq` error response.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/50Error on attempting to connect; no connection established; OSError [WinError ...2020-10-05T07:54:52ZIvan VučicaError on attempting to connect; no connection established; OSError [WinError 10038] An operation was attempted on something that is not a socket## Versions
- OS: Windows 10
- GTK+ Version: 3.22.28
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.4
- Gajim Version: 1.0.0
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_...## Versions
- OS: Windows 10
- GTK+ Version: 3.22.28
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.4
- Gajim Version: 1.0.0
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/gajim/gui_interface.py", line 2386, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/idlequeue.py", line 509, in process
OSError: [WinError 10038] An operation was attempted on something that is not a socket
```
## Steps to reproduce the problem
To reproduce, I just turn on Gajim. I don't know exactly how it got into this state.
On previous version (a 0.16.x) it was opening hundreds of "A programming error has occurred" windows. As they were opening extra fast, I could not even get the backtrace from them.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/51nbxmpp crashes when ca-certificates.crt contains non-ASCII characters2022-11-27T06:45:02ZTobiasGajimnbxmpp crashes when ca-certificates.crt contains non-ASCII charactersOn Arch, the file /etc/ssl/certs/ca-certificates.crt contains comments indicating which authority belongs to which certificate. Some of those comments contain non-ASCII characters like á:
```
[me@imaginatron ~]$ ./gremlins /etc/ssl/cert...On Arch, the file /etc/ssl/certs/ca-certificates.crt contains comments indicating which authority belongs to which certificate. Some of those comments contain non-ASCII characters like á:
```
[me@imaginatron ~]$ ./gremlins /etc/ssl/certs/ca-certificates.crt
# NetLock Arany (Class Gold) Főtanúsítvány
# TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
```
This makes nbxmpp 0.6.4-1 crash on line 345 of tls_nb.py (f.readlines()).
The problem is easily solved by passing encoding='utf-8' to open(). However, this breaks the library on Python 2. One could choose to use the built-in backport of Python 3's open(), io.open, on Python 2. I was unable to create a pull request so hereby my proposed solution:
Old:
```python
f = open(cert_path)
```
New:
```python
import io
```
```python
if sys.version_info[0] > 2:
f = open(cert_path, encoding='utf-8')
else:
f = io.open(cert_path, encoding='utf-8')
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/82Malformed room JID when contains ampersand2020-08-27T20:07:22ZRemi RampinMalformed room JID when contains ampersand## Versions
- OS: Ubuntu 18.04
- Gajim version: 1.0.1-3
- GTK version:
- Python-nbxmpp version:
## Steps to reproduce the problem
1. Accounts > Join Group Chat
1. Enter a JID contained an ampersand `&` sign
![Screenshot...## Versions
- OS: Ubuntu 18.04
- Gajim version: 1.0.1-3
- GTK version:
- Python-nbxmpp version:
## Steps to reproduce the problem
1. Accounts > Join Group Chat
1. Enter a JID contained an ampersand `&` sign
![Screenshot_20180427_153420](/uploads/d9eaf25f492fae93b5f8f8d44d553b72/Screenshot_20180427_153420.png)
## Expected behavior
I can join the #pepper&carrot channel from Gajim (works from Conversations and some other clients)
## Actual behavior
Error `jid-malformed`
![Screenshot_20180427_153436](/uploads/23e029dba41e1b7225b9ec54038e1206/Screenshot_20180427_153436.png)https://dev.gajim.org/gajim/python-nbxmpp/-/issues/52Gajim cant connect to my server2018-05-28T05:40:06ZgerroonGajim cant connect to my server## Versions
- OS: Debian Testing
- Gajim version: 1.0.3
- GTK version:
- Python-nbxmpp version:
My xmpp server is Ejabeberd 18.04. I have LE certs installed for the domain and the server is running at that domain like MYDOMAI...## Versions
- OS: Debian Testing
- Gajim version: 1.0.3
- GTK version:
- Python-nbxmpp version:
My xmpp server is Ejabeberd 18.04. I have LE certs installed for the domain and the server is running at that domain like MYDOMAIN:5222
## Steps to reproduce the problem
1. add account
1. add custom server name (I do not have xmpp url discovery)
1. try to loigin
## Expected behavior
Regular online status
## Actual behavior
Bear in mind that no other client seesm to have any connection issues to the same server with the same user. I tried it with Psi+ and Pidgin.
This is what I get on the terminal when I press "online" or try to login
```
05/27/2018 19:26:29 (E) nbxmpp.tls_nb PlugIn: while trying _startSSL():
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 288, in plugin
res = self._startSSL()
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 327, in _startSSL
result = self._startSSL_pyOpenSSL()
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 455, in _startSSL_pyOpenSSL
logg=False)
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 349, in _load_cert_file
lines = f.readlines()
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 1: invalid start byte
05/27/2018 19:26:29 (E) nbxmpp.tls_nb PlugIn: while trying _startSSL():
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 288, in plugin
res = self._startSSL()
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 327, in _startSSL
result = self._startSSL_pyOpenSSL()
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 455, in _startSSL_pyOpenSSL
logg=False)
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 349, in _load_cert_file
lines = f.readlines()
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 1: invalid start byte
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/67SSL error during connection loss; OpenSSL.SSL.SysCallError (-1, 'Unexpected E...2020-03-07T21:45:01ZAndrey GurskySSL error during connection loss; OpenSSL.SSL.SysCallError (-1, 'Unexpected EOF')* Gajim git master 06.06.2018
* python-nbxmpp 0.6.6
It is already not the first time I saw this (but I don't remember such errors with Gajim 0.16.x).
```
06/17/2018 23:53:40 (I) nbxmpp.transports_nb _do_receive, caught SSL error, got No...* Gajim git master 06.06.2018
* python-nbxmpp 0.6.6
It is already not the first time I saw this (but I don't remember such errors with Gajim 0.16.x).
```
06/17/2018 23:53:40 (I) nbxmpp.transports_nb _do_receive, caught SSL error, got None:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 172, in recv
retval = self.sslobj.recv(bufsize)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1686, in recv
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1541, in _raise_ssl_error
raise SysCallError(-1, "Unexpected EOF")
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')
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 616, in _do_receive
received = self._recv(RECV_BUFSIZE)
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 180, in recv
raise SSLWrapper.Error(self.sock or self.sslobj, e)
nbxmpp.tls_nb.SSLWrapper.Error: <class 'nbxmpp.tls_nb.SSLWrapper.Error'> for 146.255.57.229:5222: [Errno: -1] ((-1, 'Unexpected EOF')), Caused by <class 'OpenSSL.SSL.SysCallError'>((-1, 'Unexpected EOF'))
06/17/2018 23:53:40 (I) nbxmpp.transports_nb Disconnected by remote server: #-1, (-1, 'Unexpected EOF')
06/17/2018 23:53:40 (I) nbxmpp.client_nb Disconnecting NBClient:
06/17/2018 23:53:40 (D) nbxmpp.client_nb Client disconnected..
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/53Unable to get local issuer certificate with LetsEncrypt cert2018-07-20T21:50:06ZGoran MekićUnable to get local issuer certificate with LetsEncrypt cert**Please first check if another issue has been opened for your problem**
## Versions
- OS: FreeBSD 11.2
- Gajim version: 1.0.3
- GTK version: gtk2-2.24.32 and gtk3-3.22.29
- Python-nbxmpp version: 0.6.6
## Steps to reproduce t...**Please first check if another issue has been opened for your problem**
## Versions
- OS: FreeBSD 11.2
- Gajim version: 1.0.3
- GTK version: gtk2-2.24.32 and gtk3-3.22.29
- Python-nbxmpp version: 0.6.6
## Steps to reproduce the problem
1. Try to connect to a server with LetsEncrypt certificate
## Expected behavior
No dialog shown.
## Actual behavior
I get "Unable to get local issuer certificate". I checked with `truss gajim` and /etc/ssl/cert.pem nor /usr/local/etc/ssl/cert.pem are not opened, which belong to ca_root_nss package, so I suppose that's the problem, but I'm not sure. I also suspect it's not a server problem, as https://xmpp.net/result.php?domain=tilda.center&type=client is A.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/54Error in send_ack: 'NoneType' object has no attribute 'send'2020-03-07T21:49:38ZpokamtError in send_ack: 'NoneType' object has no attribute 'send'## Versions
- OS: Windows 10
- GTK+ Version: 3.22.30
- PyGObject Version: 3.28.2
- python-nbxmpp Version: 0.6.6
- Gajim Version: 1.0.3
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_...## Versions
- OS: Windows 10
- GTK+ Version: 3.22.30
- PyGObject Version: 3.28.2
- python-nbxmpp Version: 0.6.6
- Gajim Version: 1.0.3
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/dispatcher_nb.py", line 498, in dispatch
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/smacks.py", line 111, in send_ack
AttributeError: 'NoneType' object has no attribute 'send'
```
## Steps to reproduce the problem
...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::::
_____________
```