AnsweredAssumed Answered

"SASLError using DIGEST-MD5: not-authorized" error with Smack 4.1 in android

Question asked by QuinnChen on Jun 3, 2015
Latest reply on Jun 3, 2015 by QuinnChen

My Gradle

Screen Shot 2015-06-03 at 18.00.00.png

 

 

My Java code

Screen Shot 2015-06-03 at 17.47.55.png

 

The debug info

 

 

06-03 17:46:12.025  22036-22193/com.example.quinn.hellostudio D/SMACK﹕ SENT (0): <stream:stream xmlns='jabber:client' to='10.180.152.74' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='peter@10.180.152.74' xml:lang='en'>

06-03 17:46:12.030  22036-22194/com.example.quinn.hellostudio D/SMACK﹕ RECV (0): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="127.0.0.1" id="eb875d55" xml:lang="en" version="1.0">

06-03 17:46:12.035  22036-22194/com.example.quinn.hellostudio D/SMACK﹕ RECV (0): <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mech anism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>

06-03 17:46:12.040  22036-22193/com.example.quinn.hellostudio D/SMACK﹕ SENT (0): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'>=</auth>

06-03 17:46:12.065  22036-22194/com.example.quinn.hellostudio D/SMACK﹕ RECV (0): <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09IjEyNy4wLjAuMSIsbm9uY2U9Ik5DS3 dFcUNFdUZzNVVXS1BNc3A0VFdXUU9sRyt2NGVSMWRBNkpBdkEiLHFvcD0iYXV0aCIsY2hhcnNldD11dG YtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>

06-03 17:46:12.065  22036-22193/com.example.quinn.hellostudio D/SMACK﹕ SENT (0): <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9InBldGVyIixyZWFsbT0iMTAuMT gwLjE1Mi43NCIsbm9uY2U9Ik5DS3dFcUNFdUZzNVVXS1BNc3A0VFdXUU9sRyt2NGVSMWRBNkpBdkEiLG Nub25jZT0iSGtPZlNHTzNzcTVpMXQ4YThteHVqMjlYcFVQNVVpZk8iLG5jPTAwMDAwMDAxLHFvcD1hdX RoLGRpZ2VzdC11cmk9InhtcHAvMTAuMTgwLjE1Mi43NCIscmVzcG9uc2U9ZDY5Y2M0MGVmZjc4NjNhZD E4ZTg1MDZkYjBkMmZmYTYsY2hhcnNldD11dGYtOA==</response>

06-03 17:46:12.070  22036-22194/com.example.quinn.hellostudio D/SMACK﹕ RECV (0): <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

 

 

The exception stack

 

Screen Shot 2015-06-03 at 17.58.18.png

 

 

I google a lot ,but I have not solved this problem, hope to find some help here.Thx.

Outcomes