python-nbxmpp issueshttps://dev.gajim.org/gajim/python-nbxmpp/-/issues2017-10-08T00:04:12Zhttps://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/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/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/38Multiple small fixup2017-10-08T00:04:12ZNooN8Multiple small fixupSome small fixups I made.
They have to be reviewed,
Patches:
* clearstyle: The try to make the really dense code more readable
* hideinternname: Name hides an intern name => renamed it
* comment: adapt different comment styles to...Some small fixups I made.
They have to be reviewed,
Patches:
* clearstyle: The try to make the really dense code more readable
* hideinternname: Name hides an intern name => renamed it
* comment: adapt different comment styles to make them equal
* null: Checks with None should be made with **is** oder **is not**. see http://pythoncentral.io/python-null-equivalent-none/
* addsub: simplify arithmetic
* notin: checks if something is not in a list/dict/.. should be done with 'var **not in** list'
* object: make all classes inherit from object
This is the biggest:
* parametermutable: make all parameter immutable. If you use [] or {} as a default parameter funny things can happen. there will only be one default list per function parameter. if this gets changed in all subsequent calls to the function the changed default parameter will be used. So this patch changes the behaviour to the one I think was intended Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/31XEP-0313: Message Archive Management namespace has changed2017-10-08T00:04:12ZanonymousXEP-0313: Message Archive Management namespace has changedReported by misterX:
Hi,
the namespace has changed to to urn:xmpp:mam:0
Reported by misterX:
Hi,
the namespace has changed to to urn:xmpp:mam:0
https://dev.gajim.org/gajim/python-nbxmpp/-/issues/30SASLHandler fails on binary data for mechanism GSSAPI2017-10-08T00:04:12ZanonymousSASLHandler fails on binary data for mechanism GSSAPIReported by thpo:
# bug description
When using gajim with Kerberos authorization, it fails to utf8-decode and print the data received, because it is binary.
# bug analysis
The SASLHandler in nbxmpp/auth_nb.py assumes the data transmi...Reported by thpo:
# bug description
When using gajim with Kerberos authorization, it fails to utf8-decode and print the data received, because it is binary.
# bug analysis
The SASLHandler in nbxmpp/auth_nb.py assumes the data transmitted by the SASL mechanism is somehow printable.
# fix recommendation
Do not utf8-decode or print the data transmitted for GSSAPI.Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/27Please provide downloads with full file name, including version2017-10-08T00:04:12ZanonymousPlease provide downloads with full file name, including versionReported by Elessar:
# bug description
The download page displays each version file name, e.g. “nbxmpp-0.5.1.tar.gz”, but the download links point to numbers, like https://python-nbxmpp.gajim.org/downloads/6 . The correct file name is ...Reported by Elessar:
# bug description
The download page displays each version file name, e.g. “nbxmpp-0.5.1.tar.gz”, but the download links point to numbers, like https://python-nbxmpp.gajim.org/downloads/6 . The correct file name is only provided as additional information in the download HTTP header.
# bug analysis
This makes it impossible for automated tools like Debian maintainer scripts or the Debian External Health Statut to determine that a new version may be available and what number it has.
# fix recommendation
Put files in a directory directly exposed with the Web server (for instance). That may be a “secondary” download location, with the Trac one being kept as the main one and shown to visitors, but having something with real file names is important for packagers.Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/21MITM Attacks on Client Authentication after Resumption2017-10-08T00:04:12Zfedor.brunnerMITM Attacks on Client Authentication after Resumption# bug description
There is a new TLS Triple Handshakes attack.
https://www.imperialviolet.org/2014/03/03/triplehandshake.html
https://www.ietf.org/mail-archive/web/tls/current/msg11337.html
This could affect client certificate authent...# bug description
There is a new TLS Triple Handshakes attack.
https://www.imperialviolet.org/2014/03/03/triplehandshake.html
https://www.ietf.org/mail-archive/web/tls/current/msg11337.html
This could affect client certificate authentication and the channel binding used in SCRAM-SHA-1-PLUS.
# bug analysis
This attack exploits weaknesses in TLS session resumption.
Details of the attack are described in:
https://secure-resumption.com/tlsauth.pdf
by Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Cedric Fournet, Alfredo Pironti and Pierre-Yves Strub.
# fix recommendation
Disable TLS session resumption. Resumption is used only as performance optimization, but XMPP protocol is using long duration TCP connections and does TLS key exchange only infrequently, so the performance impact should be very, very small. (HTTPS protocol is using many short duration TCP connections, especially if HTTP pipelining is not used).
This also improves forward secrecy, because full handshake resulting in a new session key would have to be calculated on each login. (If the XMPP server supports ciphers with forward secrecy).
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/17Ability to configure minimal supported TLS protocol version2017-10-08T00:04:12Zfedor.brunnerAbility to configure minimal supported TLS protocol version# problem
Currently python-nbxmpp supports TLS 1.0, TLS 1.1, TLS 1.2. But it doesn't allow to restrict the connections to only newest TLS 1.2 for XMPP servers which support this protocol.
According to statistic from https://xmpp.net/ 5...# problem
Currently python-nbxmpp supports TLS 1.0, TLS 1.1, TLS 1.2. But it doesn't allow to restrict the connections to only newest TLS 1.2 for XMPP servers which support this protocol.
According to statistic from https://xmpp.net/ 59.9% of public XMPP servers already support TLS 1.2
# analysis
TLS 1.2 compared with TLS 1.1 provides more security, for example if we take into account the changes made to the PRF and the key derivation process or the replacement of the MD5/SHA-1 combination in the digitally-signed element
http://www.carbonwind.net/blog/post/Random-SSLTLS-101%E2%80%93SSLTLS-version-rollbacks-and-browsers.aspx
This has implication also on the future implementation of SCRAM-SHA-1-PLUS in Gajim #16 , because the TLS channel binding depends on PRF used to calculate the hash of TLS handshake messages.
# enhancement recommendation
Add an configuration option `tls_version`. This option configures the lowest supported version of the TLS protocol to be used for connection.
* Value `1.0` means use TLS 1.0, TLS 1.1, TLS 1.2 and all futher protocol version.
* Value `1.1` means use TLS 1.1, TLS 1.2 and all futher protocol version.
* Value `1.2` means use TLS 1.2 and all futher protocol version.
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/13Unit tests fail because new parameter cipher_list2017-10-08T00:04:12Zfedor.brunnerUnit tests fail because new parameter cipher_list# bug description
Unit tests have to adjusted for the new parameter `cipher_list`
# fix recommendation
diff -r bcfdd6de09ae test/unit/test_xmpp_transports_nb2.py
--- a/test/unit/test_xmpp_transports_nb2.py Sat Dec 14 10:04:51...# bug description
Unit tests have to adjusted for the new parameter `cipher_list`
# fix recommendation
diff -r bcfdd6de09ae test/unit/test_xmpp_transports_nb2.py
--- a/test/unit/test_xmpp_transports_nb2.py Sat Dec 14 10:04:51 2013 +0100
+++ b/test/unit/test_xmpp_transports_nb2.py Mon Dec 16 11:12:26 2013 +0100
@@ -82,6 +82,7 @@
idlequeue=self.idlequeue,
estabilish_tls=establish_tls,
certs=('../data/other/cacerts.pem', 'tmp/cacerts.pem'),
+ cipher_list=None,
proxy_dict=proxy_dict)
self.socket.PlugIn(self)
@@ -215,6 +216,7 @@
idlequeue=self.idlequeue_thread.iq,
estabilish_tls=False,
certs=None,
+ cipher_list=None,
on_http_request_possible=lambda: None,
on_persistent_fallback=None,
http_dict=http_dict,
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/9Disable SSL v3 protocol and use only TLS 1.0, TLS 1.1, TLS 1.22017-10-08T00:04:13Zfedor.brunnerDisable SSL v3 protocol and use only TLS 1.0, TLS 1.1, TLS 1.2# problem
According to public XMPP server statistics on http://xmpp.net/reports.php
99% of all XMPP servers support TLS 1.0, please disable old SSL v3
(The server sslv3.s.xnyhps.nl, is special testing server for SSL v3 compatibility)
...# problem
According to public XMPP server statistics on http://xmpp.net/reports.php
99% of all XMPP servers support TLS 1.0, please disable old SSL v3
(The server sslv3.s.xnyhps.nl, is special testing server for SSL v3 compatibility)
# analysis
TLS 1.0 contains some enhancements over SSL3:
* Expansion of cryptographic keys from the initially exchanged secret was improved
* MAC construction mechanism modified into an HMAC
* Mandatory support for Diffie-Hellman key exchange, the Digital Signature Standard, and Triple-DES encryption
http://seclists.org/basics/2010/Aug/29
# enhancement recommendation
This patch contains code to disable SSL v3, the method _startSSL_pyOpenSSL is a bit simplified.
The default cipher list is changed to HIGH:!aNULL:RC4-SHA , because the HIGH command disables all null ciphers (therefor !eNULL is not necessary) .
You can check the output of
openssl ciphers 'HIGH:!aNULL:RC4-SHA'
openssl ciphers 'HIGH:!aNULL:!eNULL:RC4-SHA'
it's the same list of ciphers
The _dumpX509 method will output SHA2-256 digest of the certificate instead of MD5.
MD5 for certificates was broken: http://www.win.tue.nl/hashclash/rogue-ca/
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/39Support XEP-0198 revision 32017-10-08T00:04:13ZanonymousSupport XEP-0198 revision 3Reported by orivej:
nbxmpp and consequently Gajim support only the second revision of the XEP-0198 protocol, and can not enable stream management with servers that support only the third and latest revision (released in the specificatio...Reported by orivej:
nbxmpp and consequently Gajim support only the second revision of the XEP-0198 protocol, and can not enable stream management with servers that support only the third and latest revision (released in the specification version 1.2 in 2011).
Some changes are summarized in the specification revision history [1], but the main change seems to be that sent stanzas count begins ticking on the client after it sends \\<enable>, and on the server after it sends \\<enabled>, rather than from the beginning of the session.
[1] https://xmpp.org/extensions/xep-0198.html#appendix-revsYann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/36smacks resends *all* message since session startup on every reconnect2017-10-08T00:04:13ZYann Leboulangersmacks resends *all* message since session startup on every reconnectsee [gajim:ticket:8202]see [gajim:ticket:8202]0.5.4Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/34Fix tests and running without glib on python 32017-10-08T00:04:13ZanonymousFix tests and running without glib on python 3Reported by sphalerite:
This patch changes python2-specific syntax to remain compatible with python2 while also working in python3.
It also adds "or not HAVE_GLIB" to several conditionals that switch between constants and values define...Reported by sphalerite:
This patch changes python2-specific syntax to remain compatible with python2 while also working in python3.
It also adds "or not HAVE_GLIB" to several conditionals that switch between constants and values defined through glib, allowing nbxmpp to work in python3 without glib (not tested beyond the test suite, however).0.5.4Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/33pyopenssl 0.15.1 breaks encoding?2017-10-08T00:04:13ZYann Leboulangerpyopenssl 0.15.1 breaks encoding?original report: [gajim:ticket:8070 Gajim's trac]
# Bug description
After upgrading pyopenssl to 0.15.1 gajim couldn't connect to one of the servers
saying that
Traceback (most recent call last):
File "/usr/lib/pyth...original report: [gajim:ticket:8070 Gajim's trac]
# Bug description
After upgrading pyopenssl to 0.15.1 gajim couldn't connect to one of the servers
saying that
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/dispatcher_nb.py", line 497, in dispatch
handler['func'](session, stanza)
File "/usr/lib/python2.7/site-packages/nbxmpp/auth_nb.py", line 426, in SASLHandler
+ self.channel_binding)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x85 in position 0: invalid start byte
# Steps to reproduce
Install gajim on archlinux, upgrade pyopenssl to 0.15.1
downgrading back to 0.14 fixes the error.
# Software versions
OS version:
Archlinux w/ testing repositories
GTK version:
2.44.1
PyGTK version:
2.24.0
Gajim version:
0.16.1Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/32entry missing in secure_tuple's default value in client_nb.py2017-10-08T00:04:13Zanonymousentry missing in secure_tuple's default value in client_nb.pyReported by jurek:
# bug description
The library errors out when trying to create a new XMPP connection
without specifying an explicit secure_tuple.
# bug analysis
There is one entry missing in the default value of secure_tuple in th...Reported by jurek:
# bug description
The library errors out when trying to create a new XMPP connection
without specifying an explicit secure_tuple.
# bug analysis
There is one entry missing in the default value of secure_tuple in the
connect method of NonBlockingClient.
When unpacking secure_tuple, five entries are expected, but only four
are given in the default value in the method declaration.
# fix recommendation
Add another None entry in the method declaration.Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/28Use the new syntax for raise statements2017-10-08T00:04:13ZanonymousUse the new syntax for raise statementsReported by Elessar:
Hello,
The file nbxmpp/xmpp_stringprep.py uses an old syntax for several raise statements: raise Exception, "text". This syntax is apparently incompatible with Python 3.4.
You should use the new syntax instead: ra...Reported by Elessar:
Hello,
The file nbxmpp/xmpp_stringprep.py uses an old syntax for several raise statements: raise Exception, "text". This syntax is apparently incompatible with Python 3.4.
You should use the new syntax instead: raise Exception("text"). This syntax is compatible with all current versions of Python 2 and 3.
Here is a patch that fixes this issue.Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/24NonBlockingClient instance has no attribute 'NonBlockingRoster'2017-10-08T00:04:13ZanonymousNonBlockingClient instance has no attribute 'NonBlockingRoster'Reported by Maxime:
# bug description
When starting gajim, happened only once. Except from the popup, I see no functional issue.
Traceback (most recent call last):
File "/usr/local/share/gajim/src/roster_window.py"...Reported by Maxime:
# bug description
When starting gajim, happened only once. Except from the popup, I see no functional issue.
Traceback (most recent call last):
File "/usr/local/share/gajim/src/roster_window.py", line 2927, in on_roster_treeview_motion_notify_event
roster = connection.connection.getRoster()
File "/usr/local/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 608, in getRoster
return self.NonBlockingRoster.getRoster(on_ready, force)
AttributeError: NonBlockingClient instance has no attribute 'NonBlockingRoster'
Could it be a race condition? Because the code is:
if 'NonBlockingRoster' in self.__dict__:
return self.NonBlockingRoster.getRoster(on_ready, force)
return None
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/23A programming error has been detected2017-10-08T00:04:13ZDarlanA programming error has been detected# bug description
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 534, in _process_events
return IdleQueue._process_events(self, fd, flags)
Fil...# bug description
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 534, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python2.7/site-packages/nbxmpp/idlequeue.py", line 395, in _process_events
obj.pollin()
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 426, in pollin
self._do_receive()
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 612, in _do_receive
self._on_receive(received)
File "/usr/lib/python2.7/site-packages/nbxmpp/transports_nb.py", line 626, in _on_receive
self.on_receive(data)
File "/usr/lib/python2.7/site-packages/nbxmpp/dispatcher_nb.py", line 488, in dispatch
handler['func'](session, stanza)
File "/usr/share/gajim/src/common/jingle.py", line 109, in _JingleCB
self._sessions[sid].on_stanza(stanza)
File "/usr/share/gajim/src/common/jingle_session.py", line 343, in on_stanza
call(stanza=stanza, jingle=jingle, error=error, action=action)
File "/usr/share/gajim/src/common/jingle_session.py", line 574, in __broadcast
cn.on_stanza(stanza, content, error, action)
File "/usr/share/gajim/src/common/jingle_content.py", line 117, in on_stanza
callback(stanza, content, error, action)
File "/usr/share/gajim/src/common/jingle_ft.py", line 275, in __on_transport_info
if not gajim.socks5queue.listener.connections:
AttributeError: 'NoneType' object has no attribute 'connections'
# bug analysis
# fix recommendationYann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/20Authentication mechanism downgrade attack2017-10-08T00:04:13Zfedor.brunnerAuthentication mechanism downgrade attack# bug description
If the server specifies following SASL authentication mechanism:
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>SCRAM-SHA-1</mechanism>
<mechanism>SCRA...# bug description
If the server specifies following SASL authentication mechanism:
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>SCRAM-SHA-1</mechanism>
<mechanism>SCRAM-SHA-1-PLUS</mechanism>
The authentication in Gajim will proceed with SCRAM-SHA-1-PLUS mechanism, if this fails the authentication will proceed with SCRAM-SHA-1 mechanism, then DIGEST-MD5 and if this fails finally PLAIN.
During the last PLAIN authentication the password will be send as plain text.
This behavior defeats the whole purpose of DIGEST-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS mechanisms.
# bug analysis
The purpose of DIGEST-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS mechanisms is to not send password as plain text. If an active attacker can affect the authentication by modifying the data in DIGEST-MD5, SCRAM-SHA-1 authentication, or simply by disabling DIGEST-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS methods, he can get the password.
# fix recommendation
XMPP core protocol as defined in [RFC 6120](https://xmpp.org/rfcs/rfc6120.html) specifies the behavoir of client. [6.3.3. Mechanism Preferences](https://xmpp.org/rfcs/rfc6120.html#sasl-rules-preferences)
Any entity that will act as a SASL client or a SASL server MUST maintain an ordered list of its preferred SASL mechanisms according to the client or server, where the list is ordered according to local policy or user configuration (which SHOULD be in order of perceived strength to enable the strongest authentication possible). The initiating entity MUST maintain its own preference order independent of the preference order of the receiving entity. A client MUST try SASL mechanisms in its preference order. For example, if the server offers the ordered list "PLAIN SCRAM-SHA-1 GSSAPI" or "SCRAM-SHA-1 GSSAPI PLAIN" but the client's ordered list is "GSSAPI SCRAM-SHA-1", the client MUST try GSSAPI first and then SCRAM-SHA-1 but MUST NOT try PLAIN (since PLAIN is not on its list).
It should be possible to disable weak authentication mechanisms such as DIGEST-MD5, PLAIN in Gajim.Yann LeboulangerYann Leboulangerhttps://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/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/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::::
_____________
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/56Error in parse_http_message, KeyError: 'Content-Length'2020-03-07T21:41:07Zkelly grantError in parse_http_message, KeyError: 'Content-Length'## 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/gajim/gui_interface.py", line 2397, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/idlequeue.py", line 518, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 451, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 676, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 750, in _on_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 833, in parse_http_message
KeyError: 'Content-Length'
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/57UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 2822: in...2018-09-23T18:38:56ZEddy CremerUnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 2822: invalid start byte## 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/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 661, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 2822: invalid start byte
During handling of the above exception, another exception occurred:
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 2397, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/idlequeue.py", line 518, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 451, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 671, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 2822: invalid start byte
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/58OMEMO usage for non-gajim nbxmpp clients2019-12-06T21:34:29ZJelmer VernooijOMEMO usage for non-gajim nbxmpp clientsOMEMO is currently a plugin to gajim. Unless I'm mistaken, there is no easy way for other apps that use nbxmpp to easily enable communicate using OMEMO. It would be great if this was possible.OMEMO is currently a plugin to gajim. Unless I'm mistaken, there is no easy way for other apps that use nbxmpp to easily enable communicate using OMEMO. It would be great if this was possible.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/60Python2 build error with tls_nb.py2018-11-26T17:16:15ZnicoPython2 build error with tls_nb.py```
byte-compiling /home/user/.cache/yay/python-nbxmpp-git/pkg/python2-nbxmpp-git/usr/lib/python2.7/site-packages/nbxmpp/tls_nb.py to tls_nb.pyc
File "usr/lib/python2.7/site-packages/nbxmpp/tls_nb.py", line 44
print("=" * 79, file=...```
byte-compiling /home/user/.cache/yay/python-nbxmpp-git/pkg/python2-nbxmpp-git/usr/lib/python2.7/site-packages/nbxmpp/tls_nb.py to tls_nb.pyc
File "usr/lib/python2.7/site-packages/nbxmpp/tls_nb.py", line 44
print("=" * 79, file=sys.stderr)
^
SyntaxError: invalid syntax
byte-compiling /home/user/.cache/yay/python-nbxmpp-git/pkg/python2-nbxmpp-git/usr/lib/python2.7/site-packages/nbxmpp/features_nb.py to features_nb.pyc
writing byte-compilation script '/tmp/tmpr69fsZ.py'
/usr/bin/python2 -O /tmp/tmpr69fsZ.py
File "usr/lib/python2.7/site-packages/nbxmpp/tls_nb.py", line 44
print("=" * 79, file=sys.stderr)
^
SyntaxError: invalid syntax
```
When installing python-nbxmpp-git from the aur package. Gajim still functions at least afaik.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/61Drop support for TLS 1.1 and older2019-01-20T17:15:08ZAndréDrop support for TLS 1.1 and olderto meet the [PCI Data Security Standard](https://blog.pcisecuritystandards.org/are-you-ready-for-30-june-2018-sayin-goodbye-to-ssl-early-tls)
TLS 1.2 exists for 10 years now, so it should be available everywhere.to meet the [PCI Data Security Standard](https://blog.pcisecuritystandards.org/are-you-ready-for-30-june-2018-sayin-goodbye-to-ssl-early-tls)
TLS 1.2 exists for 10 years now, so it should be available everywhere.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/62KeyError: 'NonBlockingBind'2018-12-03T19:56:32ZpitchumKeyError: 'NonBlockingBind'## Versions
- OS: Arch Linux
- GTK+ Version: 3.24.1
- PyGObject Version: 3.30.4
- GLib Version : 2.58.1
- python-nbxmpp Version: 0.9.90
- Gajim Version: 1.1.91+gajim@fd6dec1208dd6c5dd7bd2e2cf7785e893b3c3adf
## Traceback
```
Traceback (m...## Versions
- OS: Arch Linux
- GTK+ Version: 3.24.1
- PyGObject Version: 3.30.4
- GLib Version : 2.58.1
- python-nbxmpp Version: 0.9.90
- Gajim Version: 1.1.91+gajim@fd6dec1208dd6c5dd7bd2e2cf7785e893b3c3adf
## Traceback
```
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 "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/idlequeue.py", line 563, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/idlequeue.py", line 411, in _process_events
obj.pollin()
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/transports_nb.py", line 451, in pollin
self._do_receive()
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/transports_nb.py", line 676, in _do_receive
self._on_receive(received)
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/transports_nb.py", line 690, in _on_receive
self.on_receive(data)
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/dispatcher_nb.py", line 531, in _WaitForData
resp(_iq)
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/auth_nb.py", line 658, in _on_session
self.PlugOut()
File "/home/pitchum/code/pub/gajim-family/python-nbxmpp/nbxmpp/plugin.py", line 80, in PlugOut
del self._owner.__dict__[self.__class__.__name__]
KeyError: 'NonBlockingBind'
```
## What happens
I use gajim with two different accounts. Account A has no problem. The issue only occur when trying to activate account B: connection fails and a popup with the above error traceback.
I don't if it's relevant but account A is hosted on an ejabberd 18.09 and account B is hosted on an ejabberd 16.09.
Here is the content of the [xml-console.xml](/uploads/162995ba88a9eea0c7b1b1089bd1de09/xml-console.xml).https://dev.gajim.org/gajim/python-nbxmpp/-/issues/63Gajim in endless loop trying to reconnect if networking has been stopped and ...2020-03-07T21:43:58ZAndrey GurskyGajim in endless loop trying to reconnect if networking has been stopped and then started manually- Gajim git master gajim@d129f5559a88249f350bc6a0665f87610f79671d
- python-nbxmpp git master c58e9751d77
How to reproduce:
- stop network (```/etc/init.d/networking stop```)
- Gajim starts timeout (if start network until it expires, it ...- Gajim git master gajim@d129f5559a88249f350bc6a0665f87610f79671d
- python-nbxmpp git master c58e9751d77
How to reproduce:
- stop network (```/etc/init.d/networking stop```)
- Gajim starts timeout (if start network until it expires, it is all OK)
- Gajim tries to reconnect and fails
- Gajim tries to reconnect and fails for the second time
- start network (```/etc/init.d/networking start```)
- Gajim goes into endless loop
Log: [BUG-gajim-manually-stop-start-networking-for-upload.txt](/uploads/4368b9c39468a03f9f6ca9590ba928a2/BUG-gajim-manually-stop-start-networking-for-upload.txt)https://dev.gajim.org/gajim/python-nbxmpp/-/issues/64Stream Management error unexpected-request not handled correctly2019-01-08T19:30:57ZPhilipp Höristphilipp@hoerist.comStream Management error unexpected-request not handled correctlyWe should initiate a bind, instead we just quit
nbxmpp 0.6.8We should initiate a bind, instead we just quit
nbxmpp 0.6.8https://dev.gajim.org/gajim/python-nbxmpp/-/issues/65Don't force disconnect when receiving invalid XML from server2019-02-10T21:34:16ZAve Ozkalgajimgit@ave.zoneDon't force disconnect when receiving invalid XML from serverAs title says, not forcing disconnect when an invalid XML is received from server would be nice, as it can break people's connection (and prevent them from reconnecting) to their XMPP servers if for some reason server is returning invali...As title says, not forcing disconnect when an invalid XML is received from server would be nice, as it can break people's connection (and prevent them from reconnecting) to their XMPP servers if for some reason server is returning invalid XML (which is exactly what's weirdly happening with one of our MUCs at the moment. I'm trying to figure out what it's caused by (might be ejabberd, pidgin or nbxmpp), but in any case [here's 3 cases of this causing a DoS on gajim](https://mystb.in/raw/woyedorumo)).
Relevant code: https://dev.gajim.org/gajim/python-nbxmpp/blob/master/nbxmpp/dispatcher_nb.py#L300https://dev.gajim.org/gajim/python-nbxmpp/-/issues/66[modules/omemo] AttributeError: 'NoneType' object has no attribute 'getTag'2019-12-11T18:01:18ZAndrey Gursky[modules/omemo] AttributeError: 'NoneType' object has no attribute 'getTag'Updated all to git master.
## Versions
- OS: Linux
- GTK+ Version: 3.24.1
- PyGObject Version: 3.30.4
- GLib Version : 2.58.1
- python-nbxmpp Version: 0.9.90.4
- Gajim Version: 1.1.91.1+a944e7e6e19a
## Traceback
```
Traceback (most rec...Updated all to git master.
## Versions
- OS: Linux
- GTK+ Version: 3.24.1
- PyGObject Version: 3.30.4
- GLib Version : 2.58.1
- python-nbxmpp Version: 0.9.90.4
- Gajim Version: 1.1.91.1+a944e7e6e19a
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 662, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 555, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 406, in _process_events
obj.pollin()
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports_nb.py", line 444, in pollin
self._do_receive()
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports_nb.py", line 665, in _do_receive
self._on_receive(received)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports_nb.py", line 679, in _on_receive
self.on_receive(data)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/dispatcher_nb.py", line 658, in _WaitForData
resp(self._owner, _iq, **args)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 173, in func_wrapper
result = func(self, stanza, **kwargs)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/modules/omemo.py", line 217, in _devicelist_received
return self._parse_devicelist(item)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/modules/omemo.py", line 174, in _parse_devicelist
list_node = item.getTag('list', namespace=NS_OMEMO_TEMP)
AttributeError: 'NoneType' object has no attribute 'getTag'
```
Gajim still queries device list from many irrelevant users, e.g.:
```
02/16/2019 00:58:13 (D) nbxmpp.smacks: IN, presence
02/16/2019 00:58:13 (I) gajim.plugin_system.omemo: SOME_JID@SOME_SERVER not in Roster, query devicelist...
```
Since tracebacks, for which GUI pop-up appears, are printed not using logging module they do not appear in the redirected output to the file synchronously. That's why having log I still cannot see after what stanza this happened.
P.S. feel free to add "+git hash" to the python-nbxmpp version like for gajim.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/68Traceback in OpenPGP plugin2019-02-24T16:20:46ZMaxime BuquetTraceback in OpenPGP pluginIt seems nbxmpp assumes there is always a key available?
I'm sorry I am not entirely sure of the steps. I think that's pretty much on startup, probably a PEP push? correct me if I'm wrong.
## Versions
- OS: ArchLinux
- Gajim versi...It seems nbxmpp assumes there is always a key available?
I'm sorry I am not entirely sure of the steps. I think that's pretty much on startup, probably a PEP push? correct me if I'm wrong.
## Versions
- OS: ArchLinux
- Gajim version: 1.1.91.1 (gajim@e3f8f050c02b48f79766bb5b812f9fb9eb7c49a6)
- GTK version: N/A
- Python-nbxmpp version: python-nbxmpp@e83b5d4d
## Steps to reproduce the problem
1. Enable OpenPGP (OX) plugin
2. Login
## Expected behavior
N/A.
## Actual behavior
```
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/idlequeue.py", line 555, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3.7/site-packages/nbxmpp/idlequeue.py", line 406, in _process_events
obj.pollin()
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 444, in pollin
self._do_receive()
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 665, in _do_receive
self._on_receive(received)
File "/usr/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 679, in _on_receive
self.on_receive(data)
File "/usr/lib/python3.7/site-packages/nbxmpp/dispatcher_nb.py", line 660, in _WaitForData
resp(self._owner, _iq, **args)
File "/usr/lib/python3.7/site-packages/nbxmpp/util.py", line 173, in func_wrapper
result = func(self, stanza, **kwargs)
File "/usr/lib/python3.7/site-packages/nbxmpp/modules/openpgp.py", line 238, in _keylist_received
keylist = self._parse_keylist(jid, item)
File "/usr/lib/python3.7/site-packages/nbxmpp/modules/openpgp.py", line 131, in _parse_keylist
keylist_node = item.getTag('public-keys-list', namespace=NS_OPENPGP)
AttributeError: 'NoneType' object has no attribute 'getTag'
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/69ValueError: JID must contain at least domain name2020-02-29T23:34:29ZJohn SmithValueError: JID must contain at least domain nameGajim version: 6c06d2c49740b7431764924e4d57071860fef02a
nbxmpp version: 1abe1eab36b389bf2138ef894873b1f3b8a28860
This traceback appears after I launch Gajim:
```Traceback (most recent call last):
File "/home/mrdoctorwho/Gajim/lib/py...Gajim version: 6c06d2c49740b7431764924e4d57071860fef02a
nbxmpp version: 1abe1eab36b389bf2138ef894873b1f3b8a28860
This traceback appears after I launch Gajim:
```Traceback (most recent call last):
File "/home/mrdoctorwho/Gajim/lib/python3.6/site-packages/nbxmpp-0.9.91-py3.6.egg/nbxmpp/dispatcher_nb.py", line 620, in dispatch
File "/home/mrdoctorwho/Gajim/lib/python3.6/site-packages/nbxmpp-0.9.91-py3.6.egg/nbxmpp/modules/presence.py", line 53, in _process_presence_base
File "/home/mrdoctorwho/Gajim/lib/python3.6/site-packages/nbxmpp-0.9.91-py3.6.egg/nbxmpp/protocol.py", line 797, in bareMatch
File "/home/mrdoctorwho/Gajim/lib/python3.6/site-packages/nbxmpp-0.9.91-py3.6.egg/nbxmpp/protocol.py", line 706, in __init__
ValueError: JID must contain at least domain name
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/70Fail to load2019-02-25T20:36:03ZDavid VillasmilFail to load# python
Python 2.7.9 (default, Sep 25 2018, 20:42:16)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nbxmpp
Traceback (most recent call last):
File "<stdin>", line 1, in <module...# python
Python 2.7.9 (default, Sep 25 2018, 20:42:16)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nbxmpp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "nbxmpp/__init__.py", line 12, in <module>
from . import simplexml, protocol, auth, transports_nb, roster_nb
File "nbxmpp/auth.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file nbxmpp/auth.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>>>https://dev.gajim.org/gajim/python-nbxmpp/-/issues/71Examples2019-02-25T21:44:35ZDavid VillasmilExamplesHello,
Do you have any examples to receive messages?
Thanks!Hello,
Do you have any examples to receive messages?
Thanks!https://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/73xsend.py errors2019-09-17T14:12:40ZGabriel R.xsend.py errorsWhen attempting to use the xsend.py file using python-nbxmpp tag 0.6.10
I get the following error;
Traceback (most recent call last):
File "xsend.py", line 8, in <module>
from nbxmpp.const import Realm
ImportError: No module named...When attempting to use the xsend.py file using python-nbxmpp tag 0.6.10
I get the following error;
Traceback (most recent call last):
File "xsend.py", line 8, in <module>
from nbxmpp.const import Realm
ImportError: No module named const
OS: Debian 9.8
Python: 2.7.13
Python: 3.5.3https://dev.gajim.org/gajim/python-nbxmpp/-/issues/74AttributeError in _on_sasl_auth 'NonBlockingClient' object has no attribute '...2020-03-07T21:41:44Zehm8?AttributeError in _on_sasl_auth 'NonBlockingClient' object has no attribute 'onreceive'**Please first check if another issue has been opened for your problem**
## Versions
- OS: Windows 8.1
- Gajim version: 1.1.2
- GTK version: 3.24.1
- Python-nbxmpp version: 0.6.9
## Traceback
```
Traceback (most recent call l...**Please first check if another issue has been opened for your problem**
## Versions
- OS: Windows 8.1
- Gajim version: 1.1.2
- GTK version: 3.24.1
- Python-nbxmpp version: 0.6.9
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/gajim/gui_interface.py", line 2251, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/idlequeue.py", line 518, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 451, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 676, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 690, in _on_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/dispatcher_nb.py", line 533, in _WaitForData
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/auth_nb.py", line 761, in _on_bound
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.7/site-packages/nbxmpp/client_nb.py", line 536, in _on_sasl_auth
AttributeError: 'NonBlockingClient' object has no attribute 'onreceive'
```
## Steps to reproduce the problem
1. Not sure, wasn't doing anything relating to Gajim, the error came out of no where. The client was opened and not minimized at the time.
## Expected behavior
## Actual behaviorhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/75gajim/nbxmpp tune: ValueError: too many values to unpack2019-04-22T13:01:00ZMaxim Britovgajim/nbxmpp tune: ValueError: too many values to unpackgajim/nbxmpp from git
```
Traceback (most recent call last):
File "/home/maxim/git/gajim/gajim/gui_interface.py", line 1847, in music_track_changed
TuneData(artist=artist, title=title, source=source))
File "/home/maxim/git/gajim...gajim/nbxmpp from git
```
Traceback (most recent call last):
File "/home/maxim/git/gajim/gajim/gui_interface.py", line 1847, in music_track_changed
TuneData(artist=artist, title=title, source=source))
File "/home/maxim/git/gajim/gajim/common/modules/util.py", line 76, in func_wrapper
return func(self, *args, **kwargs)
File "/home/maxim/git/gajim/gajim/common/modules/user_tune.py", line 69, in set_tune
self._nbxmpp('Tune').set_tune(tune)
File "/usr/lib/python3.7/site-packages/nbxmpp/modules/tune.py", line 70, in set_tune
for tag, value in data:
ValueError: too many values to unpack (expected 2)
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/76[BEGINNER] Request an example for socks5 connection to a server2019-06-28T07:10:43ZJean Dupuit[BEGINNER] Request an example for socks5 connection to a serverHello,
Sorry, I did not know or posted it, so I'm doing it here.
I need to write a program that remotely connects to a jabber server via a socks5 proxy.
But I am a little lost with this library and I can not find how to do it.
Can yo...Hello,
Sorry, I did not know or posted it, so I'm doing it here.
I need to write a program that remotely connects to a jabber server via a socks5 proxy.
But I am a little lost with this library and I can not find how to do it.
Can you give me a simple example that connects to a remote xmpp server via a socks5 proxy and sends a message?
Sorry, I'm aware that this is assistant ship, but I do not find how to do it and there is not really much documentation on this library. I looked in the gadjim code, but it's too complex and I do not get out of it.
Thank you so much.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/77Document supported XEPs2020-06-27T10:48:22ZMarcin MielniczukDocument supported XEPsYou can reuse a similar list in babbler's [README.md](https://bitbucket.org/sco0ter/babbler/src/master/readme.md)You can reuse a similar list in babbler's [README.md](https://bitbucket.org/sco0ter/babbler/src/master/readme.md)https://dev.gajim.org/gajim/python-nbxmpp/-/issues/78Stream parsing error; xml.parsers.expat.ExpatError XML or text declaration no...2020-07-05T20:36:59ZKein BedarfStream parsing error; xml.parsers.expat.ExpatError XML or text declaration not at start of entity## Versions
- OS: Ubuntu 19.04
- GTK+ Version: 3.24.8
- PyGObject Version: 3.32.0
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3+gajim@b63dd2ed86789f870beeb98a31acca7e48f1c34d
## Traceback
```
Traceback (most recent call last):
...## Versions
- OS: Ubuntu 19.04
- GTK+ Version: 3.24.8
- PyGObject Version: 3.32.0
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3+gajim@b63dd2ed86789f870beeb98a31acca7e48f1c34d
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher_nb.py", line 231, in ProcessNonBlocking
self.Stream.Parse(data)
xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 362
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 662, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 563, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 411, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 451, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 676, in _do_receive
self._on_receive(received)
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 690, in _on_receive
self.on_receive(data)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher_nb.py", line 238, in ProcessNonBlocking
self._owner.Connection.disconnect()
AttributeError: 'NoneType' object has no attribute 'Connection'
```
## Steps to reproduce the problem
...
It was idling. Didn't do nothing and disconnected from the internet (don't know why) and after 15-20 minutes later the error occurred.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/79UnicodeDecodeError 'utf-8' codec can't decode byte 0xca in position 2022020-03-07T21:50:22ZBogazkiUnicodeDecodeError 'utf-8' codec can't decode byte 0xca in position 202## Versions
- OS: Windows 7
- GTK+ Version: 3.24.1
- PyGObject Version: 3.32.1
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_r...## Versions
- OS: Windows 7
- GTK+ Version: 3.24.1
- PyGObject Version: 3.32.1
- python-nbxmpp Version: 0.6.10
- Gajim Version: 1.1.3
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 661, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 202: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/gajim/gui_interface.py", line 2251, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/idlequeue.py", line 518, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 451, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 671, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.7/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 202: invalid continuation byte
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/80Network disconnect throws TypeError: disconnect() got an unexpected keyword a...2020-03-08T12:45:06ZMark TetrodeNetwork disconnect throws TypeError: disconnect() got an unexpected keyword argument 'err_message'## Versions
- OS: Linux
- GTK+ Version: 3.22.30
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.4
- Gajim Version: 1.0.1
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GL...## Versions
- OS: Linux
- GTK+ Version: 3.22.30
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.4
- Gajim Version: 1.0.1
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 747, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 563, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 422, in _process_events
obj.pollend()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 476, in pollend
(self.server, self.port))
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 218, in _on_connect_failure
self.on_connect_failure(err_message=err_message)
TypeError: disconnect() got an unexpected keyword argument 'err_message'
```
## Steps to reproduce the problem
...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/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/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/84XEP0070 error2019-09-09T08:30:40ZThomas LegayXEP0070 error## Versions
- OS: Linux
- GTK Version: 3.22.30
- PyGObject Version: 3.26.1
- GLib Version : 2.56.1
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@c51e8498563fb99cfef68bf4ca8820bc3e6807a1+761bf4e54b2c
## Traceback
```
Trac...## Versions
- OS: Linux
- GTK Version: 3.22.30
- PyGObject Version: 3.26.1
- GLib Version : 2.56.1
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@c51e8498563fb99cfef68bf4ca8820bc3e6807a1+761bf4e54b2c
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 629, in dispatch
handler['func'](session, stanza, properties)
File "/usr/lib/python3/dist-packages/nbxmpp/modules/http_auth.py", line 50, in _process_http_auth
properties.http_auth = HTTPAuthData(**http_auth)
TypeError: __new__() got an unexpected keyword argument 'xmlns'
```
when receive XEP0070 query on gajim
...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.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/87idlequeue.py probably doesn't work without GLIB2019-10-16T17:42:18ZSaltyBonesidlequeue.py probably doesn't work without GLIBIn `idlequeue.py` the import of GLib is allowed to fail but then it is used in a class definition. I don't think this can work without GLib. Is that use-case no longer supported?
```
27 # needed for get_idleqeue ...In `idlequeue.py` the import of GLib is allowed to fail but then it is used in a class definition. I don't think this can work without GLib. Is that use-case no longer supported?
```
27 # needed for get_idleqeue
28 try:
29 from gi.repository import GLib
30 HAVE_GLIB = True
31 except ImportError:
32 HAVE_GLIB = False
[...]
526 class GlibIdleQueue(IdleQueue):
527 """
528 Extends IdleQueue to use glib io_add_wath, instead of select/poll In another
529 'non gui' implementation of Gajim IdleQueue can be used safetly
530 """
[...]
574
575 current_time = GLib.get_real_time
```https://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/89AttributeError: 'NoneType' object has no attribute 'getTagData'2019-11-17T18:56:03ZAndrey GurskyAttributeError: 'NoneType' object has no attribute 'getTagData'* gajim gajim@3898f165aa617a8c58a260d74f5b596d250b36a3
* python-nbxmpp 1a844d5042f
```
11/08/2019 17:40:34 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
<iq to='MYJID@MYSERVER/gajim.MY...* gajim gajim@3898f165aa617a8c58a260d74f5b596d250b36a3
* python-nbxmpp 1a844d5042f
```
11/08/2019 17:40:34 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
<iq to='MYJID@MYSERVER/gajim.MYRESOURCE' from='prosody@conference.prosody.im/nonlinear' type='error' id='0e38d7c2-968b-4202-8747-a0c86613eb2b'><query xmlns='http://jabber.org/protocol/disco#info' node='http://coccinella.sourceforge.net/protocol/caps#BcGNW35SAoxeSyNa9AjY38WiXHU='><error code='404' type='cancel'><item-not-found xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/></error><x xmlns='jabber:x:data' type='result'><field var='FORM_TYPE' type='hidden'><value>http://coccinella.sourceforge.net/protocol/servers</value></field><field var='putget_port'><value>8235</value></field><field var='http_port'><value>8077</value></field><field var='ip'><value>10.0.1.111</value></field></x></query></iq>
_____________
11/08/2019 17:40:34 (D) nbxmpp.smacks | IN, iq
```
## Versions
- OS: Debian GNU/Linux stretch/sid
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.60.6
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+3898f165aa61
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 559, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 410, in _process_events
obj.pollin()
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports.py", line 443, in pollin
self._do_receive()
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports.py", line 664, in _do_receive
self._on_receive(received)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports.py", line 678, in _on_receive
self.on_receive(data)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/dispatcher.py", line 692, in _WaitForData
resp(self._owner, _iq, **args)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 105, in func_wrapper
result = func(self, stanza, **kwargs)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/modules/discovery.py", line 52, in _disco_info_received
return raise_error(log.info, stanza)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 155, in raise_error
error = error_factory(stanza, condition, text)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 146, in error_factory
return error_classes.get(app_namespace, CommonError)(stanza)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/structs.py", line 394, in __init__
self.condition_data = self._error_node.getTagData(self.condition)
AttributeError: 'NoneType' object has no attribute 'getTagData'
```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/91'NonBlockingClient' object has no attribute 'Resource'2020-03-07T21:47:21ZJohn Leach'NonBlockingClient' object has no attribute 'Resource'## Versions
- OS: Ubuntu 19.10
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.0
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@1ac852f0cd3382f944806ba6a1594fed52cfe57d
## Tracebacks
```
Tracebac...## Versions
- OS: Ubuntu 19.10
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.0
- python-nbxmpp Version: 0.9.92
- Gajim Version: 1.1.92+gajim@1ac852f0cd3382f944806ba6a1594fed52cfe57d
## Tracebacks
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 554, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 405, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 443, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 664, in _do_receive
self._on_receive(received)
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 678, in _on_receive
self.on_receive(data)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 690, in _WaitForData
resp(_iq)
File "/usr/lib/python3/dist-packages/nbxmpp/bind.py", line 121, in _on_session
self._on_bind_successful()
File "/usr/lib/python3/dist-packages/nbxmpp/bind.py", line 132, in _on_bind_successful
self._owner.Dispatcher.Event(Realm.CONNECTING, Event.CONNECTION_ACTIVE)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 506, in Event
self._eventHandler(realm, event, data)
File "/usr/lib/python3/dist-packages/gajim/common/connection.py", line 663, in _event_dispatcher
self._on_connection_active()
File "/usr/lib/python3/dist-packages/gajim/common/connection.py", line 1307, in _on_connection_active
self.server_resource = self.connection.Resource
AttributeError: 'NonBlockingClient' object has no attribute 'Resource'
```
and
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 554, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 405, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 443, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 664, in _do_receive
self._on_receive(received)
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 678, in _on_receive
self.on_receive(data)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 325, in ProcessNonBlocking
self._owner.disconnect(self.Stream.streamError)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 188, in disconnect
i()
File "/usr/lib/python3/dist-packages/gajim/common/connection.py", line 561, in _on_disconnect
self.connection.disconnect_handlers = []
AttributeError: 'NoneType' object has no attribute 'disconnect_handlers'
```
## Steps to reproduce the problem
connect to jabber server (I am actually connected to 2) suspend computer. when resuming several hours later, the exceptions are raised.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/92Proxy SOCKS5 fail to connect2020-03-07T21:47:08ZЕвгений ДомбровскийProxy SOCKS5 fail to connect## Versions
- OS:Windows 7 x64
- Gajim version: 1.1.3
- GTK version: 3.24.1
- Python-nbxmpp version: 0.6.10
## Steps to reproduce the problem
1. install socks5 proxy (Dante)
2. in connections setup proxy type socks5 (ip/p...## Versions
- OS:Windows 7 x64
- Gajim version: 1.1.3
- GTK version: 3.24.1
- Python-nbxmpp version: 0.6.10
## Steps to reproduce the problem
1. install socks5 proxy (Dante)
2. in connections setup proxy type socks5 (ip/port) no auth
3. try to connect to server
## Expected behavior
Successful connection (Pidgin does)
## Actual behavior
Client are closing tcp session to proxy server[socks5.pcap](/uploads/deeaf425bd45ea611541e739506019dc/socks5.pcap)[debug.txt](/uploads/f64e9474d0e6ddcb216a8a81bf490d8d/debug.txt)https://dev.gajim.org/gajim/python-nbxmpp/-/issues/93AttributeError: 'NonBlockingClient' object has no attribute 'start_disconnect'2019-12-03T20:39:04ZpitchumAttributeError: 'NonBlockingClient' object has no attribute 'start_disconnect'## Versions
- OS: Arch Linux
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.2
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92
## Steps to reproduce the problem
1. Add an account on a server using an i...## Versions
- OS: Arch Linux
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.2
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92
## Steps to reproduce the problem
1. Add an account on a server using an invalid certificate.
1. You should see a warning popup.
![screenshot_gajim_certificate_error](/uploads/6564db5a8e149867e9933c72a879310f/screenshot_gajim_certificate_error.png)
1. Click "Abort".
## Expected behavior
The popup should be closed.
## Actual behavior
The popup is still there and the above Exception is raised.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/94OMEMO: 'NoneType' object has no attribute 'getTag'2019-12-11T20:15:11ZAntonio MoraisOMEMO: 'NoneType' object has no attribute 'getTag'## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/a...## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/gajim/gui_interface.py", line 1867, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/idlequeue.py", line 512, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 443, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 664, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 678, in _on_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 323, in ProcessNonBlocking
File "E:/mingwbuild/mingw-w64-python3/src/Python-3.8.0/Modules/pyexpat.c", line 459, in EndElement
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/simplexml.py", line 642, in endtag
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 616, in dispatch
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/util.py", line 105, in func_wrapper
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/modules/omemo.py", line 214, in _devicelist_received
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/modules/omemo.py", line 171, in _parse_devicelist
AttributeError: 'NoneType' object has no attribute 'getTag'
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/95AttributeError: 'NonBlockingClient' object has no attribute 'NonBlockingBind'2020-03-07T21:46:26ZbodqhrohroAttributeError: 'NonBlockingClient' object has no attribute 'NonBlockingBind'## Versions
- OS: Debian GNU/Linux bullseye/sid
- GTK+ Version: 3.24.13
- 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/dist...## Versions
- OS: Debian GNU/Linux bullseye/sid
- GTK+ Version: 3.24.13
- 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/dist-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 563, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 411, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 451, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 676, in _do_receive
self._on_receive(received)
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 690, in _on_receive
self.on_receive(data)
File "/usr/lib/python3/dist-packages/nbxmpp/client_nb.py", line 600, in _on_auth_bind
if self.NonBlockingBind.bound is None:
AttributeError: 'NonBlockingClient' object has no attribute 'NonBlockingBind'
```
## Steps to reproduce the problem
I connected to Prosody just after it was restarted.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/96[OMEMO] TypeError: 'NoneType' object is not iterable2020-01-26T20:12:06ZMarzanna[OMEMO] TypeError: 'NoneType' object is not iterable## Versions
- OS: Ubuntu 19.10
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.0
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92+e86951bd4
## Traceback
```
Traceback (most recent call last):
File "/usr...## Versions
- OS: Ubuntu 19.10
- GTK Version: 3.24.12
- PyGObject Version: 3.34.0
- GLib Version : 2.62.0
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.92+e86951bd4
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 664, in <lambda>
func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 554, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 405, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 443, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 664, in _do_receive
self._on_receive(received)
File "/usr/lib/python3/dist-packages/nbxmpp/transports.py", line 678, in _on_receive
self.on_receive(data)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 325, in ProcessNonBlocking
self.Stream.Parse(data)
File "../Modules/pyexpat.c", line 469, in EndElement
File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 642, in endtag
self.dispatch(self._mini_dom)
File "/usr/lib/python3/dist-packages/nbxmpp/dispatcher.py", line 618, in dispatch
cb(self, stanza, **args)
File "/usr/lib/python3/dist-packages/nbxmpp/util.py", line 112, in func_wrapper
cb()(result, user_data)
File "/home/marza/.local/share/gajim/plugins/omemo/modules/omemo.py", line 481, in _devicelist_received
self._process_devicelist_update(jid, devicelist)
File "/home/marza/.local/share/gajim/plugins/omemo/modules/omemo.py", line 499, in _process_devicelist_update
self.backend.update_devicelist(jid, list(devicelist))
TypeError: 'NoneType' object is not iterable
```
## Steps to reproduce the problem
It happens every time when I start Gajim
If I switch OMEMO off it doesn't happen.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/97Error Message at startup2020-02-07T18:57:57ZStefan ReutterError Message at startup## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.93
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/a...## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.93
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/gajim/gui_interface.py", line 1869, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/idlequeue.py", line 512, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 443, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 664, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 678, in _on_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 325, in ProcessNonBlocking
File "E:/mingwbuild/mingw-w64-python/src/Python-3.8.1/Modules/pyexpat.c", line 459, in EndElement
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/simplexml.py", line 642, in endtag
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 618, in dispatch
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/util.py", line 109, in func_wrapper
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/modules/bookmarks.py", line 238, in _bookmarks_received
AttributeError: 'NoneType' object has no attribute 'getChildren'
```
## Steps to reproduce the problem
...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. https://dev.gajim.org/gajim/python-nbxmpp/-/issues/99Permanent Disconnect / Reconnect2020-02-17T07:40:35ZMatthias KretschmarPermanent Disconnect / Reconnect## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.93
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/a...## Versions
- OS: Windows 10
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.1
- python-nbxmpp Version: 0.9.93
- Gajim Version: 1.1.93
## Traceback
```
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/gajim/gui_interface.py", line 1866, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/idlequeue.py", line 512, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 443, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 664, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/transports.py", line 678, in _on_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 325, in ProcessNonBlocking
File "E:/mingwbuild/mingw-w64-python/src/Python-3.8.1/Modules/pyexpat.c", line 459, in EndElement
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/simplexml.py", line 642, in endtag
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/dispatcher.py", line 618, in dispatch
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/util.py", line 109, in func_wrapper
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.8/site-packages/nbxmpp/modules/blocking.py", line 50, in _blocking_list_received
AttributeError: 'NoneType' object has no attribute 'getTags'
```
## Steps to reproduce the problem
...https://dev.gajim.org/gajim/python-nbxmpp/-/issues/100'GTlsClientConnectionGnutls' object has no attribute 'set_advertised_protocols'2020-03-12T18:39:46ZJohn Doe'GTlsClientConnectionGnutls' object has no attribute 'set_advertised_protocols'## Versions
- OS: Debian GNU/Linux 10 (buster)
- GTK Version: 3.24.5
- PyGObject Version: 3.34.0
- GLib Version : 2.58.2
- python-nbxmpp Version: 0.9.94
- Gajim Version: 1.1.94+gajim@b38772216f7da25e5a1d5726f56203968abd0b0c
## Traceback...## Versions
- OS: Debian GNU/Linux 10 (buster)
- GTK Version: 3.24.5
- PyGObject Version: 3.34.0
- GLib Version : 2.58.2
- python-nbxmpp Version: 0.9.94
- Gajim Version: 1.1.94+gajim@b38772216f7da25e5a1d5726f56203968abd0b0c
## Traceback
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/tcp.py", line 135, in _on_connect_finished
self._on_connected()
File "/usr/lib/python3/dist-packages/nbxmpp/tcp.py", line 138, in _on_connected
self.notify('connected')
File "/usr/lib/python3/dist-packages/nbxmpp/util.py", line 492, in notify
func(self, signal_name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 387, in _on_connected
self.set_state(StreamState.CONNECTED)
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 218, in set_state
self._xmpp_state_machine()
File "/usr/lib/python3/dist-packages/nbxmpp/client.py", line 528, in _xmpp_state_machine
self._con.start_tls_negotiation()
File "/usr/lib/python3/dist-packages/nbxmpp/tcp.py", line 166, in start_tls_negotiation
tls_client.set_advertised_protocols(['xmpp-client'])
AttributeError: 'GTlsClientConnectionGnutls' object has no attribute 'set_advertised_protocols'
```
## Steps to reproduce the problem
Start Gajimhttps://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/102Authentication failed: no-password2020-03-24T16:21:27ZAndrey GurskyAuthentication failed: no-password## 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. Ensure Gajim setup: no auto-connect, no pa...## 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. Ensure Gajim setup: no auto-connect, no password saved.
1. Start Gajim.
1. In roster right-click on an account and choose "Status" --> "Available".
1. Window pops up with password prompt.
1. But simultaneously also a notification pops up: "Authentication failed: no-password".
## Expected behavior
No notification with failure, since user hadn't yet an opportunity to enter a password.
## Actual behavior
The notification pops up.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/104Failed to reconnect2020-06-01T20:14:22ZAndrey GurskyFailed to reconnect## Versions
- OS: Debian GNU/Linux stretch/sid
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.4
- python-nbxmpp Version: 0.9.94+1b04b14de418
- Gajim Version: 1.1.94+df2f93c08603
Gajim can reconnect with jabber....## Versions
- OS: Debian GNU/Linux stretch/sid
- GTK Version: 3.24.13
- PyGObject Version: 3.34.0
- GLib Version : 2.62.4
- python-nbxmpp Version: 0.9.94+1b04b14de418
- Gajim Version: 1.1.94+df2f93c08603
Gajim can reconnect with jabber.ccc.de but fails with trashserver.net.
```
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) OUT, iq
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) Request ack
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Ping
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) OUT, iq
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) Request ack
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Ping
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) OUT, iq
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) Request ack
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Ping
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) OUT, iq
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) Request ack
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Ping
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) OUT, iq
03/25/2020 12:38:52 (D) nbxmpp.smacks | (trashserver.net) Request ack
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Ping
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) Send keepalive
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<iq xmlns="jabber:client" to="MYJID@trashserver.net" type="get" id="50538b82-f3f9-46a9-9de0-05e93e1faaa9"><ping xmlns="urn:xmpp:ping" /></iq>
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) Signal: data-sent
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-sent
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<r xmlns="urn:xmpp:sm:3" />
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<iq xmlns="jabber:client" to="MYJID@trashserver.net" type="get" id="d2e4d7df-43e9-498e-a3d2-4f1fbcd92c5a"><ping xmlns="urn:xmpp:ping" /></iq>
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<r xmlns="urn:xmpp:sm:3" />
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<iq xmlns="jabber:client" to="MYJID@trashserver.net" type="get" id="18aad74f-a221-4296-b19a-ab078b42cb2c"><ping xmlns="urn:xmpp:ping" /></iq>
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<r xmlns="urn:xmpp:sm:3" />
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<iq xmlns="jabber:client" to="MYJID@trashserver.net" type="get" id="bcaa8342-ba00-43c8-8612-3c86bb4cf9b4"><ping xmlns="urn:xmpp:ping" /></iq>
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<r xmlns="urn:xmpp:sm:3" />
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<iq xmlns="jabber:client" to="MYJID@trashserver.net" type="get" id="f57f4faa-7127-4198-b868-94e9f5813500"><ping xmlns="urn:xmpp:ping" /></iq>
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<r xmlns="urn:xmpp:sm:3" />
03/25/2020 12:38:52 (I) nbxmpp.connection | (trashserver.net) Signal: data-sent
03/25/2020 12:38:52 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-sent
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<iq xml:lang='en' to='MYJID@trashserver.net/gajim.35OH1K12BA8IP7UZ' from='MYJID@trashserver.net' type='result' id='50538b82-f3f9-46a9-9de0-05e93e1faaa9'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) IN, iq
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Pong
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<r xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Send ack, h: 471
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA SENT ::::
<a xmlns="urn:xmpp:sm:3" h="471" />
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-sent
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-sent
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<a h='456' xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Ack received, h: 456
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Validate ack, our h: 460, server h: 456, queue: 5
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Removing 1 stanzas from queue
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<a h='457' xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Ack received, h: 457
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Validate ack, our h: 460, server h: 457, queue: 4
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Removing 1 stanzas from queue
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<a h='458' xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Ack received, h: 458
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Validate ack, our h: 460, server h: 458, queue: 3
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Removing 1 stanzas from queue
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<a h='459' xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Ack received, h: 459
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Validate ack, our h: 460, server h: 459, queue: 2
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Removing 1 stanzas from queue
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<a h='460' xmlns='urn:xmpp:sm:3'/>
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: stanza-received
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Ack received, h: 460
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Validate ack, our h: 460, server h: 460, queue: 1
03/25/2020 12:38:53 (D) nbxmpp.smacks | (trashserver.net) Removing 1 stanzas from queue
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Remove ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Start ping timer
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Ping timeout
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Set state: StreamState.DISCONNECTING
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Set Connection State: TCPState.DISCONNECTING
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Set Connection State: TCPState.DISCONNECTED
03/25/2020 12:38:53 (I) nbxmpp.connection | (trashserver.net) Signal: disconnected
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Set state: StreamState.DISCONNECTED
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Signal: disconnected
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Ping timeout
03/25/2020 12:38:53 (I) nbxmpp.stream | (trashserver.net) Set state: StreamState.DISCONNECTING
Traceback (most recent call last):
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/dispatcher.py", line 488, in _timeout_check
func(self._client, StanzaTimeoutError(id_), **user_data)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/client.py", line 784, in _on_pong
self._disconnect(immediate=True)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/client.py", line 407, in _disconnect
self._con.disconnect()
AttributeError: 'NoneType' object has no attribute 'disconnect'
03/25/2020 12:38:54 (I) nbxmpp.connection | (trashserver.net) ::::: DATA RECEIVED ::::
<iq xml:lang='en' to='MYJID@trashserver.net/gajim.35OH1K12BA8IP7UZ' from='MYJID@trashserver.net' type='result' id='d2e4d7df-43e9-498e-a3d2-4f1fbcd92c5a'/>
03/25/2020 12:38:54 (I) nbxmpp.connection | (trashserver.net) Signal: data-received
Traceback (most recent call last):
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/tcp.py", line 244, in _on_read_async_finish
self._read_async()
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/tcp.py", line 183, in _read_async
self._con.get_input_stream().read_bytes_async(
AttributeError: 'NoneType' object has no attribute 'get_input_stream'
03/25/2020 12:38:55 (I) nbxmpp.connection | (jabber.ccc.de) Send keepalive
03/25/2020 12:38:56 (E) nbxmpp.stream | (trashserver.net) Stream can't reconnect, stream state: StreamState.DISCONNECTING
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/105Connection fails with exception after "Write Error: g-io-error-quark: Stream ...2023-03-21T15:49:29ZAndrey GurskyConnection fails with exception after "Write Error: g-io-error-quark: Stream has outstanding operation (20)"## Versions
- OS: Debian GNU/Linux stretch/sid
- GTK Version: 3.24.14
- PyGObject Version: 3.34.0
- GLib Version : 2.62.4
- python-nbxmpp Version: 0.9.94+087a2798bb
- Gajim Version: 1.1.94+df2f93c08603
## Steps to reproduce the problem
...## Versions
- OS: Debian GNU/Linux stretch/sid
- GTK Version: 3.24.14
- PyGObject Version: 3.34.0
- GLib Version : 2.62.4
- python-nbxmpp Version: 0.9.94+087a2798bb
- Gajim Version: 1.1.94+df2f93c08603
## Steps to reproduce the problem
1. If network connectivity gets unstable during connection establishment.
## Expected
No operation is expected to succeed, so that continuing leads to follow-up exceptions. Instead a failed operation will be retried.
## Log
```
03/28/2020 16:00:27 (I) nbxmpp.stream | (jabber.ccc.de) Connect
03/28/2020 16:00:27 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.RESOLVE
03/28/2020 16:00:28 (I) nbxmpp.resolver | g-resolver-error-quark: No DNS record of the requested type for “_xmppconnect.jabber.ccc.de” (0)
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Domain resolved
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) ServerAddress(domain='jabber.ccc.de', service='xmpps-client', host=None, uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.DIRECT_TLS: 'DIRECT TLS'>, proxy=None)
ServerAddress(domain='jabber.ccc.de', service='xmpp-client', host=None, uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.START_TLS: 'START TLS'>, proxy=None)
ServerAddress(domain='jabber.ccc.de', service='xmpp-client', host=None, uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.PLAIN: 'PLAIN'>, proxy=None)
ServerAddress(domain='jabber.ccc.de', service=None, host='jabber.ccc.de:5222', uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.START_TLS: 'START TLS'>, proxy=None)
ServerAddress(domain='jabber.ccc.de', service=None, host='jabber.ccc.de:5222', uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.PLAIN: 'PLAIN'>, proxy=None)
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.RESOLVED
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Current address: ServerAddress(domain='jabber.ccc.de', service='xmpps-client', host=None, uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.DIRECT_TLS: 'DIRECT TLS'>, proxy=None)
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.CONNECTING
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Set Connection State: TCPState.CONNECTING
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Connect Error: g-resolver-error-quark: No DNS record of the requested type for “_xmpps-client._tcp.jabber.ccc.de” (0)
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Set Connection State: TCPState.DISCONNECTED
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Signal: connection-failed
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.DISCONNECTED
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Current address: ServerAddress(domain='jabber.ccc.de', service='xmpp-client', host=None, uri=None, protocol=<ConnectionProtocol.TCP: 0>, type=<ConnectionType.START_TLS: 'START TLS'>, proxy=None)
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.CONNECTING
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Set Connection State: TCPState.CONNECTING
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Connecting to jabber.ccc.de (146.255.57.229:5222)
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Set Connection State: TCPState.CONNECTED
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Connected to jabber.ccc.de (146.255.57.229:5222)
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Signal: connected
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.CONNECTED
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Execute state machine
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Start stream
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.WAIT_FOR_STREAM_START
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) ::::: DATA SENT ::::
<?xml version='1.0'?><stream:stream xmlns="jabber:client" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" to="jabber.ccc.de" xml:lang="en">
03/28/2020 16:00:28 (I) nbxmpp.connection | (jabber.ccc.de) Signal: data-sent
03/28/2020 16:00:28 (I) nbxmpp.stream | (jabber.ccc.de) Signal: stanza-sent
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) ::::: DATA RECEIVED ::::
<?xml version='1.0'?><stream:stream id='1234567890123456789' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' from='jabber.ccc.de' xmlns='jabber:client'><stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls></stream:features>
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) Signal: data-received
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Signal: stanza-received
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Execute state machine
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.WAIT_FOR_FEATURES
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Signal: stanza-received
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Execute state machine
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.WAIT_FOR_TLS_PROCEED
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) ::::: DATA SENT ::::
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) Signal: data-sent
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Signal: stanza-sent
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) ::::: DATA RECEIVED ::::
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) Signal: data-received
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Signal: stanza-received
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Execute state machine
03/28/2020 16:00:29 (I) nbxmpp.connection | (jabber.ccc.de) Start TLS negotiation
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Start stream
03/28/2020 16:00:29 (I) nbxmpp.stream | (jabber.ccc.de) Set state: StreamState.WAIT_FOR_STREAM_START
03/28/2020 16:00:29 (E) nbxmpp.connection | (jabber.ccc.de) Write Error: g-io-error-quark: Stream has outstanding operation (20)
Traceback (most recent call last):
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 403, in utf8_decode
return data.decode(), b''
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 13: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/tcp.py", line 235, in _on_read_async_finish
data, self._read_buffer = utf8_decode(self._read_buffer)
File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/util.py", line 409, in utf8_decode
return data[:i].decode(), data[i:]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 13: invalid start byte
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/106does not connect - zero data on _read_async / Broken pipe2020-03-31T05:55:39Zgenofiredoes not connect - zero data on _read_async / Broken pipeDoes not connect ...
Version: 0.6.8.r335.gdd3108e-1
```
31/03/20 07:31:16 (W) nbxmpp.connection (example.org) Reveived zero data on _read_async()
31/03/20 07:31:27 (E) nbxmpp.connection (example.org) Write Error: g-io...Does not connect ...
Version: 0.6.8.r335.gdd3108e-1
```
31/03/20 07:31:16 (W) nbxmpp.connection (example.org) Reveived zero data on _read_async()
31/03/20 07:31:27 (E) nbxmpp.connection (example.org) Write Error: g-io-error-quark: Error sending data: Broken pipe (44)
```https://dev.gajim.org/gajim/python-nbxmpp/-/issues/107Auto-reconnect is missing exponential backoff timeout2020-04-16T16:11:42ZAndrey GurskyAuto-reconnect is missing exponential backoff timeout* Gajim 1.1.94+bc72da81fccf
* python-nbxmpp 0.9.94+d792d6c0e19286c
Trashserver was down for more than 10 minutes and looking in the logs I've noticed Gajim keeping reconnecting without exponential backoff delays inbetween. Seems a regre...* Gajim 1.1.94+bc72da81fccf
* python-nbxmpp 0.9.94+d792d6c0e19286c
Trashserver was down for more than 10 minutes and looking in the logs I've noticed Gajim keeping reconnecting without exponential backoff delays inbetween. Seems a regression since the network refactoring.https://dev.gajim.org/gajim/python-nbxmpp/-/issues/2global name 'basestring' is not defined2013-02-08T07:48:28ZDicsonglobal name 'basestring' is not defined
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 533, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 533, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python3/dist-packages/nbxmpp/idlequeue.py", line 394, in _process_events
obj.pollin()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 423, in pollin
self._do_receive()
File "/usr/lib/python3/dist-packages/nbxmpp/transports_nb.py", line 584, in _do_receive
received = self._recv(RECV_BUFSIZE)
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 176, in recv
raise SSLWrapper.Error(self.sock or self.sslobj, e)
File "/usr/lib/python3/dist-packages/nbxmpp/tls_nb.py", line 73, in __init__
if not isinstance(strerror, basestring):
NameError: global name 'basestring' is not defined
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/3trouble with connection2013-02-09T20:44:18Zanonymoustrouble with connectionReported by x11term:
*I have no direct connection to the Internet. Only http proxy. Plugins, via
customized inside gajim proxy, do not work. Therefore,
I run gajim through proxychains:
$ proxychains gajim
}}}
...Reported by x11term:
*I have no direct connection to the Internet. Only http proxy. Plugins, via
customized inside gajim proxy, do not work. Therefore,
I run gajim through proxychains:
$ proxychains gajim
}}}
Connecting to corporate serevere works without a proxy. When you connect
to google, get the following:
{{{
term@fort ~/soft/gajim3 $ ./launch.sh
18:50:47 (W) gajim.c.check_X509 Import of PyOpenSSL or pyasn1 failed. Cannot correctly check SSL certificate
/home/users/staff/terminator/soft/gajim3/src/nbxmpp/transports_nb.py:343: ResourceWarning: unclosed <socket.socket object, fd=28, family=2, type=2049, proto=6>
self._recv = self._sock.recv
TB: start
getsockaddrarg: bad family
('getsockaddrarg: bad family',)
TB: end
Traceback (most recent call last):
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/transports_nb.py", line 362, in connect
self._sock.connect((self.server, self.port))
socket.error: getsockaddrarg: bad family
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2343, in change_status
change(account, status)
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2334, in change
self.get_status_message(status, on_response)
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2320, in get_status_message
on_response('', empty_pep)
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2332, in on_response
self.send_status(account, status, message)
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2134, in send_status
self.send_status_continue(account, status, txt, auto, to)
File "/home/users/staff/terminator/soft/gajim3/src/roster_window.py", line 2183, in send_status_continue
gajim.connections[account].change_status(status, txt, auto)
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 642, in change_status
self.connect_and_init(show, msg, sign_msg)
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1647, in connect_and_init
self.connect_and_auth()
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1642, in connect_and_auth
self.connect()
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1084, in connect
self._on_resolve('', [])
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1097, in _on_resolve
self._connect_to_next_host()
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1127, in _connect_to_next_host
self.connect_to_next_type()
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1193, in connect_to_next_type
self.on_client_cert_passphrase('', con, port, secure_tuple)
File "/home/users/staff/terminator/soft/gajim3/src/common/connection.py", line 1210, in on_client_cert_passphrase
secure_tuple = secure_tuple)
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/client_nb.py", line 241, in connect
on_success=self._try_next_ip)
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/client_nb.py", line 256, in _resolve_hostname
on_success()
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/client_nb.py", line 273, in _try_next_ip
on_connect_failure=self._try_next_ip)
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/transports_nb.py", line 380, in connect
(self.server, self.port, errnum, errstr))
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/transports_nb.py", line 197, in _on_connect_failure
self.on_connect_failure(err_message=err_message)
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/client_nb.py", line 273, in _try_next_ip
on_connect_failure=self._try_next_ip)
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/transports_nb.py", line 368, in connect
errnum, errstr = exc.args
ValueError: need more than 1 value to unpack
Traceback (most recent call last):
File "/home/users/staff/terminator/soft/gajim3/src/gui_interface.py", line 2405, in process_connections
gajim.idlequeue.process()
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/idlequeue.py", line 550, in process
self._check_time_events()
File "/home/users/staff/terminator/soft/gajim3/src/nbxmpp/idlequeue.py", line 314, in _check_time_events
for timeout, func in timeouts.items():
RuntimeError: dictionary changed size during iteration
}}}
If you configure in gajim proxy, all works.
= Software versions =
gentoo
Gajim 0.15.2.0-3f8001c9d5c1 (branch: default)
plugins c879559860ee
python-nbxmpp 36031c4c739e
GTK+ Version: 2.24.14
PyGTK Version: 2.24.0
"TB: start" and "TB: end" , it gave additional code inserted in the 364th row:
{{{
print('TB: start');
print(exc);
print(exc.args);
print('TB: end');0.2Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/5Repository checkout info missing2013-03-07T13:55:16ZanonymousRepository checkout info missingReported by kparal:
The main page [1] is missing information how to access the code repository. It can be browsed in "Browse Source" tab, but how to clone it? No information is given.
[1] http://python-nbxmpp.gajim.org/Reported by kparal:
The main page [1] is missing information how to access the code repository. It can be browsed in "Browse Source" tab, but how to clone it? No information is given.
[1] http://python-nbxmpp.gajim.org/Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/6nbxmpp is not on PyPI2013-08-13T12:14:42Zanonymousnbxmpp is not on PyPIReported by kparal:
By uploading this library to PyPI [1] you allow developers easy access to this library. Downloading archives and manually installing it is PITA. Pip or other tools can automatically search, install, update and uninst...Reported by kparal:
By uploading this library to PyPI [1] you allow developers easy access to this library. Downloading archives and manually installing it is PITA. Pip or other tools can automatically search, install, update and uninstall packages from PyPI.
Please push the library to PyPI.
[1] https://pypi.python.org/pypiYann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/14nbxmpp/auth_nb.py:437 should be rndg insted of rngd2013-12-16T14:57:02Zanonymousnbxmpp/auth_nb.py:437 should be rndg insted of rngdReported by ungifted:
# bug description
# bug analysis
Currently:
self.resp['cnonce'] = '%x' % rngd.getrandbits(196)
# fix recommendation
Should be:
self.resp['cnonce'] = '%x' % rndg.getrandbits(196)
Reported by ungifted:
# bug description
# bug analysis
Currently:
self.resp['cnonce'] = '%x' % rngd.getrandbits(196)
# fix recommendation
Should be:
self.resp['cnonce'] = '%x' % rndg.getrandbits(196)
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/12Mersenne Twister used nonce values2013-12-30T20:18:51Zfedor.brunnerMersenne Twister used nonce values# bug description
In auth_nb.py and bosh.py the random number generator from Python `random` module is used to generate nonce values. This values must be both unpredictable and nonrepeating.
http://www.xmpp.org/extensions/xep-0124.html...# bug description
In auth_nb.py and bosh.py the random number generator from Python `random` module is used to generate nonce values. This values must be both unpredictable and nonrepeating.
http://www.xmpp.org/extensions/xep-0124.html#security-sidrid
But Python uses the Mersenne Twister as the core generator. However, being completely deterministic, it is completely unsuitable for cryptographic purposes.
http://docs.python.org/2/library/random.html
# bug analysis
One possible solution is to use `random.SystemRandom`. But this generator uses `os.urandom` which on Windows platform uses `CryptGenRandom` and has some issues.
http://docs.python.org/2/library/random.html#random.SystemRandom
https://en.wikipedia.org/wiki/CryptGenRandom#Security
Better solution is to use OpenSSL PRNG when possible.
https://trac.gajim.org/ticket/7550
https://wiki.openssl.org/index.php/Random_Numbers
# fix recommendation
new module `rndg` which uses OpenSSL PRNG, if OpenSSL is available. If OpenSSL is not available use `random.SystemRandom`Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/7Connection with Gtalk fails2013-12-30T20:18:51ZYann LeboulangerConnection with Gtalk fails# bug description
Gtalk changed their behaviour and connection to gtalk fails
# bug analysis
see [https://trac.gajim.org/ticket/7342] and [https://trac.gajim.org/ticket/7346]# bug description
Gtalk changed their behaviour and connection to gtalk fails
# bug analysis
see [https://trac.gajim.org/ticket/7342] and [https://trac.gajim.org/ticket/7346]0.3Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/10BOSH connection error2013-12-30T20:18:51Zfedor.brunnerBOSH connection error# bug description
The same problem as described in [https://trac.gajim.org/ticket/7567] . BOSH connection is not working.
# bug analysis
This bug was caused by Changeset 65:a7f633ee2fc2
The call for `NonBlockingHTTPBOSH` in `NonBlocking...# bug description
The same problem as described in [https://trac.gajim.org/ticket/7567] . BOSH connection is not working.
# bug analysis
This bug was caused by Changeset 65:a7f633ee2fc2
The call for `NonBlockingHTTPBOSH` in `NonBlockingBOSH.get_new_http_socket` is missing the `cipher_list` parameter.
# fix recommendation
Add the missing parameter.
diff -r a7f633ee2fc2 nbxmpp/bosh.py
--- a/nbxmpp/bosh.py Sun Nov 03 17:55:20 2013 +0100
+++ b/nbxmpp/bosh.py Fri Nov 29 13:07:26 2013 +0000
@@ -68,6 +68,7 @@
self.bosh_secure = 'true'
else:
self.bosh_secure = 'false'
+ self.cipher_list = cipher_list
self.use_proxy_auth = bosh_dict['useauth']
self.proxy_creds = proxy_creds
self.wait_cb_time = None
@@ -450,6 +451,7 @@
on_disconnect=self.disconnect,
idlequeue = self.idlequeue,
estabilish_tls = self.estabilish_tls,
+ cipher_list = self.cipher_list,
certs = self.certs,
on_http_request_possible = self.on_http_request_possible,
http_dict = http_dict,Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/8ephemeral key exchange and enable TLS 1.1 and TLS 1.2 when connecting using c...2013-12-30T20:18:51Zfedor.brunnerephemeral key exchange and enable TLS 1.1 and TLS 1.2 when connecting using client cert authentification# problem
If client cert/key pair is used for authentication, only TLS 1 is used. New protocols TLS 1.1 and TLS 1.2 are not enabled during connection to the server.
# analysis
Replace OpenSSL.SSL.TLSv1_METHOD with OpenSSL.SSL.SSLv23_M...# problem
If client cert/key pair is used for authentication, only TLS 1 is used. New protocols TLS 1.1 and TLS 1.2 are not enabled during connection to the server.
# analysis
Replace OpenSSL.SSL.TLSv1_METHOD with OpenSSL.SSL.SSLv23_METHOD in OpenSSL.SSL.Context. and use OpenSSL.SSL.OP_NO_SSLv3 flag to disable SSL v3.
Please enable also ephemeral key exchange for "forward secrecy", use flag OP_SINGLE_DH_USE
https://www.openssl.org/docs/ssl/SSL_CTX_set_tmp_dh_callback.html
# enhancement recommendation
diff -r cabaea232b6e nbxmpp/tls_nb.py
--- a/nbxmpp/tls_nb.py Mon Sep 09 16:56:14 2013 +0200
+++ b/nbxmpp/tls_nb.py Sun Nov 03 08:07:21 2013 +0100
@@ -356,7 +356,10 @@
# FIXME make a checkbox for Client Cert / SSLv23 / TLSv1
# If we are going to use a client cert/key pair for authentication,
# we choose TLSv1 method.
- tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
+ tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
+ flags = (OpenSSL.SSL.OP_NO_SSLv2 | OpenSSL.SSL.OP_NO_SSLv3
+ | OpenSSL.SSL.OP_SINGLE_DH_USE)
+ tcpsock._sslContext.set_options(flags)
log.debug('Using client cert and key from %s' % conn.client_cert)
try:
p12 = OpenSSL.crypto.load_pkcs12(open(conn.client_cert).read(),
@@ -385,7 +388,7 @@
else:
# See http://docs.python.org/dev/library/ssl.html
tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
- flags = OpenSSL.SSL.OP_NO_SSLv2
+ flags = OpenSSL.SSL.OP_NO_SSLv2 | OpenSSL.SSL.OP_SINGLE_DH_USE
try:
flags |= OpenSSL.SSL.OP_NO_TICKET
except AttributeError, e:Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/11SSL certificate verification for untrusted CA2013-12-30T20:18:51Zfedor.brunnerSSL certificate verification for untrusted CA# bug description
If the xmpp server is using SSL certificate which is signed with untrusted CA, this xmpp server can't be used in Gajim because on login Gajim will again and again ask for confirmation of the certificate. The Pidgin cli...# bug description
If the xmpp server is using SSL certificate which is signed with untrusted CA, this xmpp server can't be used in Gajim because on login Gajim will again and again ask for confirmation of the certificate. The Pidgin client has not problem with this xmpp server and after initial confirmation of the certificate the logins are without any error message.
How to reproduce this bug in Gajim using Prosody XMPP server
1. generate the CA and xmpp server certificate:
a. Generate the CA certificate with private key.
b. Generate a certificate request for XMPP server together with private key.
c. Sign the XMPP server certificate request using CA and generate the XMPP certificate from the request.
openssl req -x509 -nodes -days 100 \
-newkey rsa:4096 -out ca.crt -keyout ca.priv -sha1 \
-subj '/CN=Demo Certification Authority/'
openssl req -new -nodes -days 100 -newkey rsa:2048 -out localhost.req \
-keyout localhost.priv -sha1 -subj '/CN=localhost/O=xmpp server/'
openssl x509 -req -in localhost.req -out localhost.crt \
-CA ca.crt -CAkey ca.priv -set_serial 10 -sha1
2. Set the certificates in prosody configuration files
ssl = {
cafile = "/etc/prosody/certs/ca.crt";
key = "/etc/prosody/certs/localhost.priv";
certificate = "/etc/prosody/certs/localhost.crt";
}
3. After starting Prosody check the certificate using OpenSSL s_client
openssl s_client -connect 'localhost:5222' -starttls xmpp
4. The output of this command should contain the SSL certificate chain
CONNECTED(00000003)
depth=1 CN = Demo Certification Authority
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
0 s:/CN=localhost/O=xmpp server
i:/CN=Demo Certification Authority
1 s:/CN=Demo Certification Authority
i:/CN=Demo Certification Authority
5. Now try to login multiple times to the localhost server using Gajim. On each login you get a SSL error, SSL error: Self signed certificate in certificate chain, or SSL certificate fingerprint has changed.
Setting "Ignore this error for this certificate" will not correct this problem and updating the SSL certificate fingerprint will not correct this problem.
# bug analysis
The problem is in `_ssl_verify_callback`, this method is called for each certificate in certificate chain. For the server certificate, for intermediate CAs and root CAs.
In Gajim source code in src/common/connection.py the method `Connection.connection_accepted` assumes that only single fingerprint is present. But `_ssl_verify_callback` causes multiple fingerprints. The only fingerprint which is interesting for Gajim and should be display to user is the xmpp server certificate not the CA certificate fingerprints.
# fix recommendation
Store only the fingerprint of the xmpp server in `_ssl_verify_callback`, ignore CA fingerprints
diff -r e88ec6cb0884 nbxmpp/tls_nb.py
--- a/nbxmpp/tls_nb.py Sat Nov 30 11:29:05 2013 +0100
+++ b/nbxmpp/tls_nb.py Mon Dec 02 11:36:10 2013 +0100
@@ -446,10 +446,11 @@
def _ssl_verify_callback(self, sslconn, cert, errnum, depth, ok):
# Exceptions can't propagate up through this callback, so print them here.
try:
- self._owner.ssl_fingerprint_sha1.append(cert.digest('sha1'))
- self._owner.ssl_certificate.append(cert)
- self._owner.ssl_errnum.append(errnum)
- self._owner.ssl_cert_pem.append(OpenSSL.crypto.dump_certificate(
+ if depth == 0:
+ self._owner.ssl_fingerprint_sha1.append(cert.digest('sha1'))
+ self._owner.ssl_certificate.append(cert)
+ self._owner.ssl_errnum.append(errnum)
+ self._owner.ssl_cert_pem.append(OpenSSL.crypto.dump_certificate(
OpenSSL.crypto.FILETYPE_PEM, cert))
return True
except:
https://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/15Fails to verify SSL certificates2014-02-17T15:43:29Zfedor.brunnerFails to verify SSL certificates# bug description
1. create an account for a XMPP server with self-signed certificate. The has to be a new certificate which was not used for previous connections.
2. try to connect to this XMPP server
3. An confirmation window should b...# bug description
1. create an account for a XMPP server with self-signed certificate. The has to be a new certificate which was not used for previous connections.
2. try to connect to this XMPP server
3. An confirmation window should be displayed "Error verifying SSL certificate". But this window is not displayed and connection proceeds without warning. This is a bug.
# bug analysis
The `_ssl_verify_callback` is called twice for every certificate in certificate chain: First time with ok=0 and non-zero errnum. Second time then with ok=1 and zero errnum. The changeset 2d6e5d6949e854509c9a145cf97ab0fdf1d8ccce caused that `self._owner.ssl_errnum` was overwritten twice: first time with non-zero value and second time with zero.
The two calls of callback are correct and documented. See *preverify_ok* in [SSL_CTX_set_verify](https://wiki.openssl.org/index.php/Manual:SSL_CTX_set_verify%283%29)
# fix recommendation
Check the value of `ok` parameter in `_ssl_verify_callback`
Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/18TLS broken in Ubuntu 12.04.4 in latest nightly, ticket #76402014-03-27T12:21:45Zfedor.brunnerTLS broken in Ubuntu 12.04.4 in latest nightly, ticket #7640Reported as ticket https://trac.gajim.org/ticket/7640
OpenSSL.SSL.OPENSSL_VERSION_NUMBER not present in the module object
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
_____________
29/01/2014 14...Reported as ticket https://trac.gajim.org/ticket/7640
OpenSSL.SSL.OPENSSL_VERSION_NUMBER not present in the module object
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
_____________
29/01/2014 14:42:15 (D) gajim.c.ged stanza-received
Args: (<common.connection_handlers_events.StanzaReceivedEvent object at 0x2002c50>,)
29/01/2014 14:42:15 (I) nbxmpp.simplexml STARTTAG.. DEPTH -> 2 , tag -> proceed, attrs -> {u'xmlns': u'urn:ietf:params:xml:ns:xmpp-tls'}
29/01/2014 14:42:15 (I) nbxmpp.simplexml DEPTH -> 2 , tag -> proceed
29/01/2014 14:42:15 (D) nbxmpp.dispatcher_nb Got urn:ietf:params:xml:ns:xmpp-tls/proceed stanza
29/01/2014 14:42:15 (I) nbxmpp.client_nb -------------tls_negotiaton_handler() >> tag: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
29/01/2014 14:42:15 (I) nbxmpp.client_nb Got starttls proceed response. Switching to TLS/SSL...
29/01/2014 14:42:15 (I) nbxmpp.plugin Plugging <nbxmpp.tls_nb.NonBlockingTLS instance at 0x141d0e0> __INTO__ <nbxmpp.transports_nb.NonBlockingTCP instance at 0x13a39e0>
29/01/2014 14:42:15 (I) nbxmpp.tls_nb Starting TLS estabilishing
29/01/2014 14:42:15 (D) nbxmpp.tls_nb _startSSL called
29/01/2014 14:42:15 (D) nbxmpp.tls_nb _startSSL_pyOpenSSL called
29/01/2014 14:42:15 (E) nbxmpp.tls_nb PlugIn: while trying _startSSL():
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nbxmpp/tls_nb.py", line 280, in plugin
res = self._startSSL()
File "/usr/lib/python2.7/dist-packages/nbxmpp/tls_nb.py", line 318, in _startSSL
result = self._startSSL_pyOpenSSL()
File "/usr/lib/python2.7/dist-packages/nbxmpp/tls_nb.py", line 374, in _startSSL_pyOpenSSL
if OpenSSL.SSL.OPENSSL_VERSION_NUMBER >= 0x1000104f:
AttributeError: 'module' object has no attribute 'OPENSSL_VERSION_NUMBER'
As this shows:
~$ python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenSSL
>>> for k in dir(OpenSSL.SSL):
... print(k)
...
Connection
ConnectionType
Context
ContextType
Error
FILETYPE_ASN1
FILETYPE_PEM
OP_ALL
OP_CIPHER_SERVER_PREFERENCE
OP_COOKIE_EXCHANGE
OP_DONT_INSERT_EMPTY_FRAGMENTS
OP_EPHEMERAL_RSA
OP_MICROSOFT_BIG_SSLV3_BUFFER
OP_MICROSOFT_SESS_ID_BUG
OP_MSIE_SSLV2_RSA_PADDING
OP_NETSCAPE_CA_DN_BUG
OP_NETSCAPE_CHALLENGE_BUG
OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
OP_NO_QUERY_MTU
OP_NO_SSLv2
OP_NO_SSLv3
OP_NO_TICKET
OP_NO_TLSv1
OP_PKCS1_CHECK_1
OP_PKCS1_CHECK_2
OP_SINGLE_DH_USE
OP_SSLEAY_080_CLIENT_DH_BUG
OP_SSLREF2_REUSE_CERT_TYPE_BUG
OP_TLS_BLOCK_PADDING_BUG
OP_TLS_D5_BUG
OP_TLS_ROLLBACK_BUG
RECEIVED_SHUTDOWN
SENT_SHUTDOWN
SSL_CB_ACCEPT_EXIT
SSL_CB_ACCEPT_LOOP
SSL_CB_ALERT
SSL_CB_CONNECT_EXIT
SSL_CB_CONNECT_LOOP
SSL_CB_EXIT
SSL_CB_HANDSHAKE_DONE
SSL_CB_HANDSHAKE_START
SSL_CB_LOOP
SSL_CB_READ
SSL_CB_READ_ALERT
SSL_CB_WRITE
SSL_CB_WRITE_ALERT
SSL_ST_ACCEPT
SSL_ST_BEFORE
SSL_ST_CONNECT
SSL_ST_INIT
SSL_ST_MASK
SSL_ST_OK
SSL_ST_RENEGOTIATE
SSLv23_METHOD
SSLv2_METHOD
SSLv3_METHOD
SysCallError
TLSv1_METHOD
VERIFY_CLIENT_ONCE
VERIFY_FAIL_IF_NO_PEER_CERT
VERIFY_NONE
VERIFY_PEER
WantReadError
WantWriteError
WantX509LookupError
ZeroReturnError
_C_API
__doc__
__file__
__name__
__package__Yann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/19The SCRAM-SHA-1 authentication mechanism2014-03-27T12:21:45Zfedor.brunnerThe SCRAM-SHA-1 authentication mechanism# bug description
The python-nbxmpp allows choosen nonce attacks in SCRAM-SHA-1 authentication mechanism, because it doesn't check the nonce returned from server during SCRAM-SHA-1 authentication. According to the [RFC 5802 section-5.1]...# bug description
The python-nbxmpp allows choosen nonce attacks in SCRAM-SHA-1 authentication mechanism, because it doesn't check the nonce returned from server during SCRAM-SHA-1 authentication. According to the [RFC 5802 section-5.1](https://tools.ietf.org/html/rfc5802) the following check have to be done for attribute *r*
The client MUST verify that the initial part of the nonce used in subsequent messages is the same as the nonce it initially specified.
# bug analysis
The check is missing in nbxmpp/auth_nb.py, there is a remark
# TODO: Should check cnonce here.
# fix recommendation
add the missing checkYann LeboulangerYann Leboulangerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/16Add SCRAM-SHA-1-PLUS authentication mechanisms2014-03-31T19:25:10Zfedor.brunnerAdd SCRAM-SHA-1-PLUS authentication mechanisms# phenomenon
The current implementation of SSL/TLS in python-nbxmpp uses CA certificates for PKI mechanism. There is currently 141 CA certificates in cacerts.pem in Gajim, any of these CA can sign certificate which can used to do MiTM a...# phenomenon
The current implementation of SSL/TLS in python-nbxmpp uses CA certificates for PKI mechanism. There is currently 141 CA certificates in cacerts.pem in Gajim, any of these CA can sign certificate which can used to do MiTM attack on any XMPP servers. There have been instances where Certificate Authorities have issued fraudulent certificates:
[Comodo](https://en.wikipedia.org/w/index.php?title=Comodo_Group&oldid=591966784#2011_breach_incident)
[DigiNotar](https://en.wikipedia.org/w/index.php?title=DigiNotar&oldid=591964487#Issuance_of_fraudulent_certificates)
[TurkTrust](https://blog.mozilla.org/security/2013/01/03/revoking-trust-in-two-turktrust-certficates/)
# background analysis
The SCRAM-SHA-1-PLUS authentication mechanisms [RFC 5802](https://tools.ietf.org/html/rfc5802) supports channel binding to the TLS channel. So any tampering with TLS connection will cause authentication failure, allows to detect MiTM attack.
# implementation recommendation
Server jabber.org supports SCRAM-SHA-1-PLUS authentication mechanisms, so it can be used for testing of the implementation.
SSL in Python 3.3 supports Channel binding data
http://docs.python.org/3/library/ssl.html#ssl.SSLSocket.get_channel_bindingfedor.brunnerfedor.brunnerhttps://dev.gajim.org/gajim/python-nbxmpp/-/issues/22get_channel_binding is not defined for BOSH connection2014-04-09T15:26:34Zfedor.brunnerget_channel_binding is not defined for BOSH connection# bug description
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nbxmpp/idlequeue.py", line 534, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr...# bug description
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nbxmpp/idlequeue.py", line 534, in _process_events
return IdleQueue._process_events(self, fd, flags)
File "/usr/lib/python2.7/dist-packages/nbxmpp/idlequeue.py", line 395, in _process_events
obj.pollin()
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 426, in pollin
self._do_receive()
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 612, in _do_receive
self._on_receive(received)
File "/usr/lib/python2.7/dist-packages/nbxmpp/transports_nb.py", line 718, in _on_receive
self.on_receive(data=httpbody, socket=self)
File "/usr/lib/python2.7/dist-packages/nbxmpp/bosh.py", line 476, in on_received_http
self.current_recv_handler(data)
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 331, in <lambda>
self.onreceive(lambda _data:self._xmpp_connect_machine(mode, _data))
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 366, in _xmpp_connect_machine
self._xmpp_connect_machine(mode='STREAM_STARTED')
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 388, in _xmpp_connect_machine
self._on_stream_start()
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 424, in _on_stream_start
self._on_connect()
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 461, in _on_connect
self.on_connect(self, self.connected)
File "/usr/share/gajim/src/common/connection.py", line 1375, in _connect_success
return self.connection_accepted(con, con_type)
File "/usr/share/gajim/src/common/connection.py", line 1458, in connection_accepted
resource=self.server_resource, sasl=True, on_auth=self.__on_auth, auth_mechs=auth_mechs)
File "/usr/lib/python2.7/dist-packages/nbxmpp/client_nb.py", line 499, in auth
self._channel_binding = self.Connection.NonBlockingTLS.get_channel_binding()
AttributeError: NonBlockingBOSH instance has no attribute 'NonBlockingTLS'
# bug analysis
`get_channel_binding` is not defined for BOSH connection
# fix recommendation
Add channel binding for BOSH connections
fedor.brunnerfedor.brunner