SASL auth error - smack 3.1 beta

I’ve posted this once to the Spark Dev list, but I now realize that the problem is within Smack.

While testing beta 2 of spark, I found i could not connect to my server (ejabberd 2.0.1). I started debugger window to see what traffic looked like between the client and server and found the following:

Raw Sent Packets:

<stream:stream to=“” xmlns=“jabber:client” xmlns:stream="" version=“1.0”>

<stream:stream to=“” xmlns=“jabber:client” xmlns:stream="" version=“1.0”>

Raw Recieved Packets:

<?xml version='1.0'?>


<?xml version='1.0'?>


I looks to me that Spark is trying to use an auth mechanism that the server is not advertising. Spark 2.5.8 works correctly by using auth method PLAIN, which the server does advertise, however, the beta is trying to use CRAM-MD5, which the server does not advertise.

Please let me know if I you have any other tests that I can run to get this fixed.


After more digging around trying to find the source of my problem (and I’m by no means a java programmer), I think I found my problem.

This is where the extra SASL methods were added to smack. In looking into the Digest-MD5 file, I noticed on line 54 that the getName method returns “CRAM-MD5” as opposed to “DIGEST-MD5”, and that that method is used to generate the response string to the server. This appears to be fixed in the 3.1.0 version of smack (I think), but it appears that this error may have been picked up in the 2.6.0 beta 2 version of Spark.

I tried dropping the release versions of the smack jar files into my libs folder in Spark, but I guess that doesn’t work.

See this for help . The problem is in Smack 3.1.0 authentication (I think Spark 2.6.0 beta is using Smack 3.1.0). You have to use PLAIN authentiation, if you want to connect to ejabberd server.