powered by Jive Software

XMPPException contains no StreamError or XMPPError object

Hello,

when I try to log in my account, if I set a wrong password (for example), an XMPPException is raised. I would like to get an error code which I could translate into a corresponding message that I wrote myself.

For example:

(En) “You set a wrong password or user id”

(Fr) “Votre identifiant ou mot de passe est erroné”

The problem is that, when I “catch” the XMPPException, XMPPException.getStreamError() and XMPPException.getXMPPError() both return “null”! Therefore, I can’t get any error code. How is it possible?

up

I’m having the same problem!

The most curious thing is that the Spark Java XMPP client, that uses the same Smack version - v3.2.2 - as I do (I even swapped mine with the Spark one) can handle the invalid login credentials using getXMPPError, which returns the actual XMPP error object, not null! How is that even possible?

I went through the Spark source and I could not figure out anything. I tried countless variations - various ConnectionConfiguration settings, connecting to other Jabber/XMPP servers, nothing helped.

I ended up parsing the damn return string “SASL authentication PLAIN failed: not-authorized”…

Can anybody shed some light here?