AnsweredAssumed Answered

Smack comprehension does not work with ejabberd

Question asked by moh_mov on Feb 17, 2016
Latest reply on Feb 18, 2016 by Flow

Hi

I want to connect to ejabbed V 16.01 with smack in android.

everything worked fine but when i enable comprehension with below codes :

.setCompressionEnabled(true) and compile 'org.igniterealtime.smack:smack-compression-jzlib:4.1.6'

in gradle.

but i get this warning(but every think worked fine with no error and NO COMPREHSNSION):

Could not enable compression because no matching handler/method pair was found

Messages between client and server :

 

SENT (0): <stream:stream xmlns='jabber:client' to='soroush.ir' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV (0): <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3232247674216297200' from='soroush.ir' version='1.0' xml:lang='en'><stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/><register xmlns='http://jabber.org/features/iq-register'/><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism >DIGEST-MD5</mechanism><mechanism>X-OAUTH2</mechanism><mechanism>SCRAM-SHA-1</me chanism></mechanisms></stream:features>

SENT (0): <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'></starttls>

RECV (0): <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>

SENT (0): <stream:stream xmlns='jabber:client' to='soroush.ir' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV (0): <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7607251502826688586' from='soroush.ir' version='1.0' xml:lang='en'>

RECV (0): <stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/><register xmlns='http://jabber.org/features/iq-register'/><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism >DIGEST-MD5</mechanism><mechanism>X-OAUTH2</mechanism><mechanism>SCRAM-SHA-1</me chanism></mechanisms></stream:features>

SENT (0): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='SCRAM-SHA-1'>biwsbj11c2VyMSxyPSs2RVdeIlBrTyU2JlFgfUg0bEZXRFs4JyJMT0F 8Wlk3</auth>

RECV (0): <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>XXXXXXXXXXXXX</challenge>

SENT (0): <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>XXXXXXXXXXXXX</response>

RECV (0): <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>XXXXXXXXXXXXX</success>

SENT (0): <stream:stream xmlns='jabber:client' to='soroush.ir' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' id='7607251502826688586' xml:lang='en'>

RECV (0): <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='17102287704880150656' from='soroush.ir' version='1.0' xml:lang='en'>

RECV (0): <stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><sm xmlns='urn:xmpp:sm:2'/><sm xmlns='urn:xmpp:sm:3'/><csi xmlns='urn:xmpp:csi:0'/></stream:features>

W/XMPPTCPConnection: Could not enable compression because no matching handler/method pair

was found

 

thanks

Outcomes