ClassCastException StandardExtensionElement cannot be cast as NodeExtension

I found some problems when I received some messages from server:
I received:

<message to='0f6660ed-29b6-4848-a5e6-54d9b127b647@stage...app.com' from='533f6bf6-d2a8-408b-8462-f179edfaf046@grouper...app.planoutapp.com' id='563a01f7-cc46-4efc-ba1f-8a6e21214720'>
    <archived by='0f6660ed-29b6-4848-a5e6-54d9b127b647@stage...app.com' id='1614017358335802'
        xmlns='urn:xmpp:mam:tmp'/>
    <stanza-id by='0f6660ed-29b6-4848-a5e6-54d9b127b647@stage...app.com' id='1614017358335802'
        xmlns='urn:xmpp:sid:0'/>
    <event xmlns='http://jabber.org/protocol/pubsub#event'>
        <items xmlns='urn:xmpp:mix:admin:0' node='urn:xmpp:mix:nodes:config'>
            <item id='2021-02-22T17:38:21Z'>
                <x xmlns='jabber:x:data' type='result'>
                    <field type='hidden' var='FORM_TYPE'>
                        <value>urn:xmpp:mix:admin:0</value>
                    </field>
                    <field var='Owner'>
                        <value>2c5c6b28-6332-477f-af8f-5f330a661a24@stage...app.com</value>
                    </field>
                    <field var='Administrator'>
                        <value>0f6660ed-29b6-4848-a5e6-54d9b127b647@stage...app.com</value>
                        <value>2c5c6b28-6332-477f-af8f-5f330a661a24@stage...app.com</value>
                    </field>
                </x>
            </item>
        </items>
    </event>
    <mix xmlns='urn:xmpp:mix:core:1'>
        <nick>TestUser1</nick>
        <jid>2c5c6b28-6332-477f-af8f-5f330a661a24@stage..app.com</jid>
    </mix>
    <store xmlns='urn:xmpp:hints'/>
</message>

And I found this error, that it’s imposible to avoid without replace all current PubSub logic.

2021-02-22 19:09:19.358 7210-7526/com.planout.app.debug W/System.err: java.lang.ClassCastException: org.jivesoftware.smack.packet.StandardExtensionElement cannot be cast to org.jivesoftware.smackx.pubsub.NodeExtension
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smackx.pubsub.provider.EventProvider.createReturnExtension(EventProvider.java:39)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smackx.pubsub.provider.EventProvider.createReturnExtension(EventProvider.java:35)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.provider.EmbeddedExtensionProvider.parse(EmbeddedExtensionProvider.java:105)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.provider.EmbeddedExtensionProvider.parse(EmbeddedExtensionProvider.java:82)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.provider.Provider.parse(Provider.java:43)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.util.PacketParserUtils.parseExtensionElement(PacketParserUtils.java:918)
2021-02-22 19:09:19.359 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.util.PacketParserUtils.addExtensionElement(PacketParserUtils.java:989)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:264)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:155)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1084)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1300(XMPPTCPConnection.java:155)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1144)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$1000(XMPPTCPConnection.java:1092)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1112)
2021-02-22 19:09:19.360 7210-7526/com.planout.app.debug W/System.err:     at java.lang.Thread.run(Thread.java:764)

I am using Smack for Android with 4.3.5, but it’s still happened in 4.4.0

Thank you in advance.
Best Regards

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.