Smack 4.2.3 SASL Authentiction failure

Hi All,
I managed to connect to a XMPP server using SMack 4.2.3 through websocket successfully via AbstractXMPPConnection/connect command.

Then I am trying to login using

saslAuthentication.authenticate(username,password,null,null);

It seems SASLPlainMechanism is used.
I am getting an exception as below because SASL authentication is failing.Any clue is highly appreciated

org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for successful SASL authentication
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:93)
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:224)
at com.testsmack.xmpp.XMPPWebSocketConnection.loginNonAnonymously(XMPPWebSocketConnection.java:434)
at com.testsmack.xmpp.XMPPConnection.connected(XMPPConnection.java:107)
at org.jivesoftware.smack.AbstractXMPPConnection.callConnectionConnectedListener(AbstractXMPPConnection.java:1261)
at com.testsmack.xmpp.XMPPWebSocketConnection.connectInternal(XMPPWebSocketConnection.java:868)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:380)
at com.testsmack.xmpp.XMPPConnection.connect(XMPPConnection.java:74)
at com.testsmack.xmpp.XmppConnectionTest.main(XmppConnectionTest.java:115)

THanks
Isuru

You are getting a timeout. Maybe check server logs for errors.

Hi paul
Thanks for the reply.I am connecting to public api sandbox.rainbow.com.So
obtaining server logs is not an option.
Couldnt it be due to Saslmechanism which is plain in my case?
Thanks
Isuru

I’m not a SASL expert :confused:

This issue is resolved by downgrading the smack jar files to 4.1.8 from 4.2.3 for SASL authentication.Thanks all for the inputs and time