Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 12000

Re: Smack 4.0.4 - XmlPullParserException for gtalk MUC message (user status)

$
0
0

This has allowed me to catch the exception, however it seems to be getting stuck in some sort of loop while parsing the stanza.

 

When a gtalk user joins a MUC, my callback is being called as expected.  It gets a UnparsablePacket with this as the content:

<x xmlns='http://jabber.org/protocol/muc#user'><item nick='494d6dbca32b6c6d' status='available' jid='otheruser@gmail.com/gmail.2161CE02'/></x></body><x xmlns='google:nosave' value='disabled'/><record xmlns='http://jabber.org/protocol/archive' otr='false'/></message>

 

I simply take no action and throw no exception, intending for the parser to ignore the packet. However, my callback is them immediately invoked again, with content of "</message>" and exception of "java.lang.IndexOutOfBoundsException: only START_TAG can have attributes END_TAG seen ..."false" xmlns:arc="http://jabber.org/protocol/archive"/></message>... @1:3642".

 

This repeats in an infinite loop - the callback keeps getting called with a new UnparsablePacket of "</message>" as soon as it returns.

 

How should I be recovering inside of handleUnparsablePacket to allow it to ignore the packet and continue on?


Viewing all articles
Browse latest Browse all 12000

Trending Articles