powered by Jive Software

Failed to parse extension packet in Presence packet

Hello,

PacketParserUtils﹕ Failed to parse extension packet in Presence packet.

occures when i add carbon support to my app.

try {

if(CarbonManager.getInstanceFor(getConnection()).isSupportedByServer()){

Log.i(TAG, "Message Carbons Supported ");

CarbonManager.getInstanceFor(getConnection()).enableCarbons();

}

} catch (XMPPException e) {

e.printStackTrace();

} catch (SmackException e) {

e.printStackTrace();

}

I tested asmack-android-8-4.0.4-SNAPSHOT-2014-08-18.jar and

asmack-android-8-4.0.1-SNAPSHOT-2014-06-22.jar

Please always post the full stacktrace of the exception.

I get no exception. It just fails to update the presence information in the roster.

I have SmackConfiguration.DEBUG_ENABLED = true, and the above is all i get.

I will try it with a debugger now.

Found nothing with the debugger, then again it is hard to debug without the source. Have to investigate how to provide the Android Studio Debugger with the sources. Sometimes a few roster entries seem to update, but messaging anyone fails with a nullpointer in ChatManager(139).

the content of the line is:

139 “connection.addPacketListener(new PacketListener() {”

If i do not execute the code from the first post everything works and i can message people all day.

If you would like me to do something specific, to provide more information that is no problem.

My source can be found here: https://github.com/meisterfuu/AnimexxApp/blob/master/animexxApp/src/main/java/de /meisterfuu/animexx/xmpp/ChatConnection.java

Sorry for two posting

Have to investigate how to provide the Android Studio Debugger with the sources.
AFAIK this is not possible. That’s the main reason I don’t use Android’s gradle-plugin. With the standard Android Ant build and Eclipse I can easily debug the source of libraries of my project.

PacketParserUtils﹕ Failed to parse extension packet in Presence packet.

occures when i add carbon support to my app.

I don’t think that these two are releated. Look at https://github.com/igniterealtime/Smack/blob/7277eb553ae601984f1fc4cbc78d7b29b4a 806c4/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.jav a#L446 Smack does simply skip the extension but continues processing the presence.

OTOH it could be that enabling carbons somehow adds a packet extension to some presences, a packet extensions that is causing the exception. But that would be news for me

So besides the Warning, which is usually not fatal, what’s the problem with carbons?

but messaging anyone fails with a nullpointer inChatManager(139).
Again, a full stacktrace would be helpful

Okay, i found the cause for “PacketParserUtils﹕ Failed to parse extension packet in Presence packet.”: Miranda IM. The status text is causing this i think.

The problem seems to be multiple clients/ressources active at the same tim, some with carbon support, some without.

a custom webclient, miranda, spark, and my app. When my app with carbon support is online, the other clients crash/disconnect when sending messages from itself. the target user dont receive the message, but the carbon copy shows up in my app. the app with carbon support enabled doesnt die. something doesnt work right here.(Server is Openfire 3.9.3)

Another thing is, the roster doesnt work as expected with carbonmanager enabled. the roster is not correct after connecting. everytime a client later on changes presence, the roster entry for this client is ok again. I will investigate what the cause of this is tomorrow.

Thanks for your time so far

Edit:

According to the smack log, the presence pakets arrive correct at the client.

the other clients crash/disconnect when sending messages from itself.
Does the client disconnect or the server? If the later, then you may find the reason in the openfire logs.