powered by Jive Software

Reconnection Error Stream Management

Hello everybody,

I discovered a really big problem (probably mine?) about the XMPP reconnection process in smack library v4.1.5 (Android) and openfire v4.0.1. I activated the stream management on the client in this way:

XMPPTCPConnection.setUseStreamManagementDefault(true);
XMPPTCPConnection.setUseStreamManagementResumptionDefault(true);

and activated the automatic reconnection in this way:

ReconnectionManager.getInstanceFor(this.xmppConnection).enableAutomaticReconnection();

After the first successfull connection and login, when the internet connection goes down and the reconnection process starts I get the following error:

W/AbstractXMPPConnection: Connection closed with error org.jivesoftware.smack.XMPPException$StreamErrorException: conflict You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions <stream:error><conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error> at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1003) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:944) at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:959)

The reconnection manager connects and authenticates very well (It sends also the previous unacknowledged message) but then I receive the previous error!

Someone could help me in understanding what is wrong? Or how to resume a stream without this error?

Please enable SmackConfiguration.DEBUG and show us a full XMPP trace of the connection sequence.

Sorry for the delay! It was a bug of Smack 4.1.5, with version 4.1.7 the problem disappears!