AnsweredAssumed Answered

android compression

Question asked by A on Feb 13, 2016

Hello.

My Problem: when i enable compression on smack connection configuration i get an error.

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

LOG: D/SMACK﹕ SENT (2): http://etherx.jabber.org/streams' version='1.0' xml:lang='en'> 02-14 09:20:26.490 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): http://etherx.jabber.org/streams' id='287995719462948844' from='aaaaaa.ir' version='1.0' xml:lang='en'>http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/>http://jabber.org/features/iq-register'/>http://jabber.org/features/compress'>zlibPLAINDIGEST-MD5X-OAUTH2SCRAM-SHA-1 02-14 09:20:26.510 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): 02-14 09:20:26.520 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): 02-14 09:20:26.530 5707-5713/com.main.smack.agh.smacktest D/dalvikvm﹕ GC_CONCURRENT freed 205K, 9% free 10464K/11463K, paused 12ms+2ms, total 36ms 02-14 09:20:26.540 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): http://etherx.jabber.org/streams' version='1.0' xml:lang='en'> 02-14 09:20:26.550 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): http://etherx.jabber.org/streams' id='10507945389033263380' from='aaaaaa.ir' version='1.0' xml:lang='en'> 02-14 09:20:26.550 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): http://jabber.org/protocol/caps' hash='sha-1' node='www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/>http://jabber.org/features/iq-register'/>http://jabber.org/features/compress'>zlibPLAINDIGEST-MD5X-OAUTH2SCRAM-SHA-1 02-14 09:20:26.550 5707-6533/com.main.smack.agh.smacktest E/SmackManager﹕ ConnectionListener connected 02-14 09:20:26.560 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): biwsbj05ODkyMTk2MzAxMzIscj00QSZFUj5pLjZrTG0yWG43YjNMJzclcm5mX0BCLioufg== 02-14 09:20:26.600 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): cj00QSZFUj5pLjZrTG0yWG43YjNMJzclcm5mX0BCLioufmYwenc3M2Q3bUpiTUFjdkFVeldhaWc9PSx zPXdHVlhHbUJScS9RU2J1YW1MeGs3bWc9PSxpPTQwOTY= 02-14 09:20:26.640 5707-5719/com.main.smack.agh.smacktest D/dalvikvm﹕ null clazz in OP_INSTANCE_OF, single-stepping 02-14 09:20:26.780 5707-5713/com.main.smack.agh.smacktest D/dalvikvm﹕ GC_CONCURRENT freed 464K, 10% free 10476K/11591K, paused 13ms+2ms, total 39ms 02-14 09:20:26.950 5707-5713/com.main.smack.agh.smacktest D/dalvikvm﹕ GC_CONCURRENT freed 469K, 10% free 10475K/11591K, paused 13ms+3ms, total 36ms 02-14 09:20:27.060 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): Yz1iaXdzLHI9NEEmRVI+aS42a0xtMlhuN2IzTCc3JXJuZl9AQi4qLn5mMHp3NzNkN21KYk1BY3ZBVXp XYWlnPT0scD1qTnE1Q25QQlZ4bVNCanA4UVFhMnordjNuN0E9 02-14 09:20:27.090 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): dj1aeEZKMUJ5M1dLRGNYN1dqTngvTFhsSjVpUnc9 02-14 09:20:27.090 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): http://etherx.jabber.org/streams' version='1.0' id='10507945389033263380' xml:lang='en'> 02-14 09:20:27.100 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): http://etherx.jabber.org/streams' id='3061147538117786778' from='aaaaaa.ir' version='1.0' xml:lang='en'> 02-14 09:20:27.100 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): http://jabber.org/protocol/caps' hash='sha-1' node='www.process-one.net/en/ejabberd/' ver='gqEKPEQ6D2wLkHzRb4kfxnCjqsA='/> 02-14 09:20:27.100 5707-6533/com.main.smack.agh.smacktest W/XMPPTCPConnection﹕ Could not enable compression because no matching handler/method pair was found 02-14 09:20:27.110 5707-6534/com.main.smack.agh.smacktest D/SMACK﹕ SENT (2): Smack 02-14 09:20:27.120 5707-6535/com.main.smack.agh.smacktest D/SMACK﹕ RECV (2): 989219630132@aaaaaa.ir/Smack

My Code:

mXmppConnectionConfiguration = XMPPTCPConnectionConfiguration.builder();  mXmppConnectionConfiguration.setSendPresence(true).setCompressionEnabled(true).setDebuggerEnabled(true).setSecurityMode(ConnectionConfiguration.SecurityMode.required).setCustomSSLContext(createSSLContext()).setHost(chatConfig.getmServerIp()).setPort(chatConfig.getmServerPort()).setServiceName(chatConfig.getmServerDomain()).setHostnameVerifier(mHostnameVerifier);  
if (mXMPPTCPConnection != null) { mXMPPTCPConnection.disconnect(); } 
mXmppConnectionConfiguration.setCompressionEnabled(true); 
mXMPPTCPConnection = new XMPPTCPConnection(mXmppConnectionConfiguration.build());

I was wondering if any one could help me. TNX

Outcomes