AnsweredAssumed Answered

PacketParserUtils.parseSASLFailure throws an exception if there is a 'text' element inside the 'failure'

Question asked by Igor Khomenko on Dec 11, 2014
Latest reply on Dec 11, 2014 by Igor Khomenko

According to XMPP doc it's possible to have the OPTIONAL descriptive text in inside 'failure' element


but smack throws an exception


for example, here is an example of 'failure' which causes an exception in asmack

D/SMACK﹕ RCV (0): <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text xml:lang='en'>Password not verified</text></failure>


12-11 12:37:06.311    1709-1856/com.ben.snippets W/SASLError﹕ Could not transform string 'text' to SASLError

    java.lang.IllegalArgumentException: text is not a constant in org.jivesoftware.smack.sasl.SASLError

            at java.lang.Enum.valueOf(

            at org.jivesoftware.smack.sasl.SASLError.valueOf(

            at org.jivesoftware.smack.sasl.SASLError.fromString(

            at org.jivesoftware.smack.sasl.SASLMechanism$SASLFailure.<init>( :357)

            at org.jivesoftware.smack.util.PacketParserUtils.parseSASLFailure(PacketParserUtil

            at org.jivesoftware.smack.tcp.PacketReader.parsePackets(

            at org.jivesoftware.smack.tcp.PacketReader.access$000(

            at org.jivesoftware.smack.tcp.PacketReader$


I use asmack 4.0.6