---> Thats the point where I get the error:
I don't think so. For more info about the warning, see SMACK-390. But let's have look at the stacktrace:
- 08-07 14:08:23.990: E/ConnectionAdapterXMPP(4375): java.lang.ClassCastException: org.jivesoftware.smack.packet.Presence cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard
- 08-07 14:08:23.990: E/ConnectionAdapterXMPP(4375): at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560)
- 08-07 14:08:23.990: E/ConnectionAdapterXMPP(4375): at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:555)
- 08-07 14:08:23.990: E/ConnectionAdapterXMPP(4375): at com.anderscore.anderchat.service.ConnectionAdapterXMPP.fetchRosterEntries(Connec tionAdapterXMPP.java:174)
So the CCE is thrown in a call stack where your code calls VCard.load() and happens in the doLoad() method which reads
VCard result = (VCard) connection.createPacketCollectorAndSend(this).nextResultOrThrow();
this causes Smack to send the following stanza
<iq id='wyHKH-19' to='ralf.bommersbach@gmail.com' type='get'><vCard xmlns='vcard-temp'/></iq>
From your log we see that the next received stanza is in fact a presence stanza
<presence from="anderscorechat@gmail.com/50A80A35" to="anderscorechat@gmail.com/SmackAE0E4866"><priority>1</priority><c node="http://pidgin.im/" hash="sha-1" ver="71LAP/wlWGfun7j+Q4FCSSuAhQw=" xmlns="http://jabber.org/protocol/caps"/><x xmlns="vcard-temp:x:update"><photo/></x></presence>
Now we could infer that this presence stanza get's in fact collected by collector and is returned as result of nextResultOrThrow(). This match which the CCE, which says that Presence can not be cast to VCard.
But I have no idea how the collector would collect the presence stanza, since the collector only collects iq stanzas.
Furthermore I don't see "WARNING: Failed to parse extension packet in Presence packet." in the pastebin log.
What is at com.anderscore.anderchat.service.ConnectionAdapterXMPP.fetchRosterEntries(Connec tionAdapterXMPP.java:174)?