Hello,
I managed to create a workaround for this issue.
Turns out that the built-in xmpp server doesn't handle XEP-0199: XMPP Ping specification correctly.
The XMPP ping protocol is extremely simple:
The pinging entity (in our case the pidgin client) sends an IQ-get containing a <ping/> element qualified by the 'urn:xmpp:ping' namespace.
The pinged entity (in our case the zimbra-chat server) returns either an IQ-result (if it supports the namespace) or an IQ-error (if it does not).
Unfortunately the built-in zimbra-chat server never sends a response to the xmpp ping.
The way pidgin works is it sends a ping every 60 seconds as long as there's a response.
If there isn't a response after 120 seconds, the client will disconnect.
For example pidgin sends the ping:
<iq type='get' id='id1'><ping xmlns='urn:xmpp:ping'/></iq>
..but nothing back
Fortunately pidgin doesn't care what the response is as long as it receives one!
The zimbra-chat server does handle XEP-0030: Service Discovery specification correctly.
It appears that it doesn't support discovery items, but it correctly sends a 'feature-not-implemented' error.
For example pidgin sends the discovery items query:
<iq type='get' id='id1' to='example.com'><query xmlns='
http://jabber.org/protocol/disco#items'/></iq>
the server correctly responds with a feature-not-implemented error:
<iq xmlns="jabber:client" type="error" id="id1" from="example.com" to="
test@example.com"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></iq>
I edited the source for pidgin 2.14.1 so it sends the discovery items query instead of the ping.
The server responds back so pidgin is happy and doesn't disconnect.
This only works with pidgin 2.14.1 for windows, which is the latest stable version at this time.
After installing pidgin 2.14.1, replace the libjabber.dll file found in the install directory with the one attached to this post.
The default install directory is C:\Program Files (x86)\Pidgin
For more info regarding XEP-0199: XMPP Ping specification:
https://xmpp.org/extensions/xep-0199.html
For more info regarding XEP-0030: Service Discovery specification:
https://xmpp.org/extensions/xep-0030.html
Here are the changes if anyone wants to build it for another platform.
Just two files need to be patched.
./libpurple/protocols/jabber/namespaces.h
./libpurple/protocols/jabber/ping.c
Here are the patches.
--- namespaces.h 2020-06-09 19:41:32.000000000 -0700
+++ namespaces_fix.h 2020-07-23 18:31:54.705983270 -0700
@@ -75,7 +75,7 @@
#define NS_STREAM_MANAGEMENT "urn:xmpp:sm:3"
/* XEP-0199 Ping */
-#define NS_PING "urn:xmpp:ping"
+#define NS_PING "
http://jabber.org/protocol/disco#items"
/* XEP-0202 Entity Time */
#define NS_ENTITY_TIME "urn:xmpp:time"
--- ping.c 2020-06-09 19:41:32.000000000 -0700
+++ ping_fix.c 2020-07-23 18:32:34.338011851 -0700
@@ -73,7 +73,7 @@
xmlnode *ping;
iq = jabber_iq_new(js, JABBER_IQ_GET);
- ping = xmlnode_new_child(iq->node, "ping");
+ ping = xmlnode_new_child(iq->node, "query");
xmlnode_set_namespace(ping, NS_PING);
jabber_iq_set_callback(iq, jabber_keepalive_pong_cb, NULL);
@@ -89,7 +89,7 @@
if (jid)
xmlnode_set_attrib(iq->node, "to", jid);
- ping = xmlnode_new_child(iq->node, "ping");
+ ping = xmlnode_new_child(iq->node, "query");
xmlnode_set_namespace(ping, NS_PING);
jabber_iq_set_callback(iq, jabber_ping_result_cb, NULL);