coronapankaj / asmack

Automatically exported from code.google.com/p/asmack
Other
0 stars 0 forks source link

DIGEST-MD5 problem #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I made a simple application to be connected to a private ejabberd server.

ConnectionConfiguration connConfig = new  
ConnectionConfiguration(host,5222,host);
XMPPConnection connection = new XMPPConnection(connConfig);
connection.connect();

connection.login(username, password);

And i have this message on ddms raised by "connection.login(username, 
password);"  : SASL authentication failed using mechanism DIGEST MD5

I tried to find a solution by the Internet but any patch, library or other 
solution seems to fix it.

Using asmack-issue-15 and Android emulator 1.5 and 2.2

Thank you for your help, I can't find a solution by myself and after long hours 
looking for one it's becoming really boring...

Original issue reported on code.google.com by benoit.reulier@gmail.com on 9 Aug 2010 at 6:19

GoogleCodeExporter commented 9 years ago
Please try to enable at least the debugging features of asmack (config.setDebug 
/ xmppconnection.DEBUG)

SASL is send base64 encoded, it's usually easy to debug once you have the 
stanza at hands. Server logs may help as well.

Original comment by rtreffer@gmail.com on 26 Aug 2010 at 6:58

GoogleCodeExporter commented 9 years ago
I am stumped with this too, I can't seem to connect to facebook chat because of 
SASL authentication issues

Original comment by mtpow...@gmail.com on 30 Aug 2010 at 6:59

GoogleCodeExporter commented 9 years ago
It's work finally for me by this way :
ConnectionConfiguration connConfig = new 
ConnectionConfiguration(host,port,host);
connection = new XMPPConnection(connConfig);
connConfig.setSASLAuthenticationEnabled(true);  
connection.connect();

connection.login(userID, password);

Be careful about the userID. 
Instead of using connection.login("username@ejabberdServerIP",password) it's 
work for me only if I use connection.login("username",password).

You have to try different combinaisons and hope one is working.

Good luck...

Original comment by benoit.reulier@gmail.com on 30 Aug 2010 at 7:11

GoogleCodeExporter commented 9 years ago
I think that facebook and asmack don't like each other.  Not working, all other 
xmpp servers work fine

Original comment by mtpow...@gmail.com on 30 Aug 2010 at 9:18

GoogleCodeExporter commented 9 years ago
Here is my debug code
08-30 21:18:25.253: DEBUG/SMACK(874): 09:18:25 PM SENT (1139522504): <auth 
mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"></auth>
08-30 21:18:25.372: DEBUG/SMACK(874): 09:18:25 PM RCV  (1139522504): <challenge 
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImNoYXQuZmFjZWJvb2suY29tIixub25
jZT0iNDNBMEJFQzk4N0RBNzUxNEQ4MjZBMDdB
08-30 21:18:25.382: DEBUG/SMACK(874): 09:18:25 PM RCV  (1139522504): 
NEFGOTJGNDQiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challe
nge>
08-30 21:18:25.452: DEBUG/SMACK(874): 09:18:25 PM SENT (1139522504): <response 
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9Im10cG93ZXJzIixyZWFsbT0iY2h
hdC5mYWNlYm9vay5jb20iLGNub25jZT0iZjRiMGRjYzY0ZjI5ZWVlMTZmOTdlYzZjMTc5YTkxNzcyMmQ
yYTcyMjFhM2RlNTllNTU3ZGVjYjhhNTZhYWZlNCIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXV
yaT0ieG1wcC9jaGF0LmZhY2Vib29rLmNvbSIscmVzcG9uc2U9OWU0YjRjMjQ0MGZjMzM0ZWJlYzkzOGQ
wNzkzMzA0OTAsY2hhcnNldD11dGYtOCxub25jZT0iNDNBMEJFQzk4N0RBNzUxNEQ4MjZBMDdBNEFGOTJ
GNDQi</response>

Here is my code I am using to connect
        ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com", 5222, "chat.facebook.com");
        myConn = new XMPPConnection(config);
        config.setSASLAuthenticationEnabled(true); 
        config.setDebuggerEnabled(true);
myConn.connect();
myConn.login(username, password);

08-30 21:18:25.693: DEBUG/SMACK(874): 09:18:25 PM RCV  (1139522504): <failure 
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

Original comment by mtpow...@gmail.com on 30 Aug 2010 at 9:22

GoogleCodeExporter commented 9 years ago
My solution comes from here: http://community.igniterealtime.org/message/205965
on the voanirges answer.

Can't help you more... Sry

Original comment by benoit.reulier@gmail.com on 30 Aug 2010 at 9:53

GoogleCodeExporter commented 9 years ago
Right but you are not trying to interface with facebook chat are you?

Original comment by mtpow...@gmail.com on 30 Aug 2010 at 10:33

GoogleCodeExporter commented 9 years ago
come no, can't anyone find a solution to this ? i'm developping an XMPP client 
and it's really annoying that it can't log me in to facebook!

Original comment by willyda...@gmail.com on 3 Oct 2010 at 5:33

GoogleCodeExporter commented 9 years ago
 I didn't meet this question,but I meet a confuse issues is that:SSL like somthing...error .But sometime I can login in,sometime it happen error,when I close the emulator and restart again it can execute good perfectly..who know what the reason?

Original comment by zengqin...@gmail.com on 31 Mar 2011 at 3:22

GoogleCodeExporter commented 9 years ago
Have also the same issue, and cant find any solution. Fails to connect to my 
ejabberd service.. I've been looking for a solution to this for days..

Original comment by Pablote...@gmail.com on 4 Feb 2013 at 12:16

GoogleCodeExporter commented 9 years ago
Dear All,

  I was struggling by this issue. I used benoit.reulier@gmail.com's code and asmack-issue15.jar  from http://code.google.com/p/asmack/downloads/list link and XMPPClient from http://davanum.wordpress.com/2008/12/29/updated-xmpp-client-for-android/ link. Finally i connected ejaerd server.

Thank you for this code....

Original comment by kbabusof...@gmail.com on 8 Mar 2013 at 6:11