Hello everyone,
I updated to aSmack 4.0.0-rc1 and now I'm getting org.jivesoftware.smack.SmackException$NoResponseException while i'm logging in. Code works with aSmack 8.10. Server("chatstage.quickblox.com") is runing on Tigase 5.2.0
Code snippet that uses aSmack 8.10(works):
ConnectionConfiguration configuration = new ConnectionConfiguration("chatstage.quickblox.com", 5222);
XMPPConnection connection = new XMPPConnection(configuration);
connection.connect();
connection.login("18551-438", "videoChatUser1");
Code snippet that uses aSmack 4.0.0rc-1(throws exception):
ConnectionConfiguration configuration = new ConnectionConfiguration("chatstage.quickblox.com");
XMPPConnection connection = new XMPPTCPConnection(configuration);
connection.connect();
connection.login("18551-438", "videoChatUser1");
Log:
org.jivesoftware.smack.SmackException$NoResponseException
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 358)
at org.jivesoftware.smack.XMPPTCPConnection.login(XMPPTCPConnection.java:233)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:376)
at com.quickblox.sample.test.chat.chatservice.TestSmack.testConnection(TestSmack.j ava:38)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214 )
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:115)
at junit.framework.TestResult.runProtected(TestResult.java:133)
at junit.framework.TestResult.run(TestResult.java:118)
at junit.framework.TestCase.run(TestCase.java:124)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:5 55)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584 )
D/SMACK﹕ SENT (0): <stream:stream to="chatstage.quickblox.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
D/SMACK﹕ RCV (0): <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='chatstage.quickblox.com' id='0be866ba-97ea-4e14-80e5-e8ebf21ea2a4' version='1.0' xml:lang='en'>
D/SMACK﹕ RCV (0): <stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism >ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
D/SMACK﹕ SENT (0): <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
D/SMACK﹕ RCV (0): <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
D/SMACK﹕ SENT (0): </stream:stream>
Credentials are valid, so everyone can test it.
What I found during debugging: PacketWriter sends closing tag(</stream>) before packetReader gets response from server, but I don't know why.
Please, help me solve this issue.
Thanks!