ChatStates No working

When reporting issues include

  • The used Smack version, which can be retrieved viaSmackConfiguration.getVersion()
  • The full exception and its stacktrace
  • An XMPP trace of the exchanged stream elements between client and server, which can be obtained by setting SmackConfiguration.DEBUG to true
  • The relevant code parts (please do not post whole source files!)

Please also read “How to report an issue”

Smack Version: 4.1.0
StackTrace:
W/AbstractXMPPConnection: Connection closed with error
java.lang.IllegalArgumentException: No enum constant org.jivesoftware.smack.packet.Message.Type.chatstates
at java.lang.Enum.valueOf(Enum.java:254)
at org.jivesoftware.smack.packet.Message$Type.valueOf(Message.java:607)
at org.jivesoftware.smack.packet.Message$Type.fromString(Message.java:644)
at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:229)
at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:151)
at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:952)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$400(XMPPTCPConnection.java:139)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:980)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:935)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:950)
at java.lang.Thread.run(Thread.java:761)

XMPP Packet with type chatstate:
Offline StorageOffline Storage

Now i dont understand, that, if the ChatStates are int the package
org.jivesoftware.smackx.chatstates
so, why the chatstate type is being looked into, org.jivesoftware.smack.packet.Message.Type.chatstates, is it beacause of the message type being set as chatstate and, message types are fetched from, the Message.Type, and in order to achieve the functionality of chat state what should i do?

That looks like you received a message with type set to ‘chatstates’.

<message type='chatstates' … >…</message>

If you had done that, we would have been able to verify my hypothesis.

yeah its correct i am getting the chatstates in the message type top level xml,

Depending on what that actually means, it could be right or wrong.

I mean to say that i getting exactly this kind of xml <message type=‘chatstates’ … >… and this xml has a child node <active …> or other chat states, and i am getting this, xml packet from IOS client

Which iOS client is it?

A post was split to a new topic: Support for custom top level stanza attributes

our iOS team, created a mobile app similar to whatspp, and that uses swift with xmpp framework and i am creating the android app, using smack and receiving these packets.