Can't connect to XMPP server in Smack 3.1.0 beta release

Solution for google talk: Use good passwords!

I had this problem. But the strangeness was, that one account worked, and other accounts gave the error.

The password strength of the account that worked was β€œStrong”

  • and the pw strength of the accoutn that did not work was β€œfair”.

I changed the password to a strong one for the not-working account, and that did the trick.

There is probably a good reason why. :slight_smile:

Best regards

Christian Liljedahl

I’m using the latest smack code from SVN (as of last Friday, May 14, 2010) and I’m unable to get connected to Jabber.org using exactly the code fragment in the post above (with only the username and password changed). The code works for connecting to GoogleTalk, but not Jabber.org. I get an exception on the login call, returning the classic SASL authentication PLAIN failed: invalid-authzid. I’ve decoded the BASE-64 and it looks correct as far as I can see.

Has something changed between the 3.1.0 release and the current code that may have broken this?

(Note that I’ve checked to make sure that Psi and Spark clients are able to connect to jabber.org using the same credentials.)

Anyone have any idea what is going on?

Has anyone gotten this to work at all for the android platform using the asmack libs? I fail on MD-5 sasl authentication no matter what I do

After hours of trial & error, I finally found a way to make all my gtalk accounts work with asmack (3.1.0) !

Problem was, that only some of my google accounts worked, while others didn’t (wrong password/id exception)

Some Accounts work when using β€œgmail.com” as ServiceName, while others only work when using β€œgooglemail.com” !

–> Workaround: Try to connect with β€œgmail.com” first, if an exception is thrown, try to connect again with β€œgooglemail.com”

[…]

mConConfig = new ConnectionConfiguration(β€œtalk.google.com”, β€œ5222”, β€œgmail.com”);

mConConfig.setSASLAuthenticationEnabled(false);

XMPPConnection xmppCon = new XMPPConnection(mConConfig);

try{
xmppCon.connect();
}catch(XMPPException e){
return;
}
try{
xmppCon.login(mUsername, mPassword, mResource);
}catch(XMPPException e){

            if(mService.equalsIgnoreCase("gmail.com")){
                mConConfig.setServiceName("googlemail.com");
                connect();
                return;
            }else if(mService.equalsIgnoreCase("googlemail.com")){
                mConConfig.setServiceName("gmail.com");
                connect();
                return;

}

1 Like