Can not login to server, when android app is killed and restore state

first login is ok.

there is log from my login.

11-19 03:51:28.644    7483-7531/com.rd.motherbaby D/SMACK﹕ SENT (3): <stream:stream to="datang" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
11-19 03:51:28.660    7483-7532/com.rd.motherbaby D/SMACK﹕ RCV (3): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="magic-pc" id="45570af" xml:lang="en" version="1.0">
11-19 03:51:28.672    7483-7532/com.rd.motherbaby D/SMACK﹕ RCV (3): <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>JIVE-SHAREDSECRET</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
11-19 03:51:28.672    7483-7531/com.rd.motherbaby D/SMACK﹕ SENT (3): <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"></auth>
11-19 03:51:28.684    7483-7532/com.rd.motherbaby D/SMACK﹕ RCV (3): <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09Im1hZ2ljLXBjIixub25jZT0ieENSQXRTa0FqODdLR1djTklzMHQzRHFqWHRPRS9WajBvSHc3S1dWRSIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
11-19 03:51:28.688    7483-7531/com.rd.motherbaby D/SMACK﹕ SENT (3): <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9IjEzNTU1NTU1NTU1IixyZWFsbT0ibWFnaWMtcGMiLGNub25jZT0iNGYyMzgzN2ZjNDgyMWM4YzE0MTYyMTBkN2JmMjI4ZjJmNmFmMzRlZGY3NTg3ZmY2ZmJhMjZkM2RjZTkyMmZhZiIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9tYWdpYy1wYyIscmVzcG9uc2U9ZTYxNTZlNDJjNWI1MzZjZjgyM2Q0YjYxMTNkNTIzMGYsY2hhcnNldD11dGYtOCxub25jZT0ieENSQXRTa0FqODdLR1djTklzMHQzRHFqWHRPRS9WajBvSHc3S1dWRSI=</response>
11-19 03:51:28.716    7483-7532/com.rd.motherbaby D/SMACK﹕ RCV (3): <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

I have googled a whole day today and can not get a solution.

asmack version 4.0.1

does anyone have suggestion?

not-authorized means that your credentials are wrong (given there is no bug in the sasl implementation).

I have no idea about this case.

because I can succeed to login to server(openfire) everytime in normal case,

but failed when app is kill by android and restoring is finished, and always got the failed message in log.

Could you give me more detailed information about SASL? thanks advance!