AnsweredAssumed Answered

SMACK 4.2 Beta1 - Connection crashes after recipient declines filetransfer

Question asked by Dustyn on Jul 18, 2016
Latest reply on Jul 19, 2016 by Flow

Hello,

I have a problem with filetransfers in SMACK 4.2 Beta 1.

03:55:52 PM RECV (1): <iq to="USER" type="error" id="2AvMe-107" from="RECIPIENT"><error code="403" type="cancel"><forbidden/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Offer Declined</text></error></iq>
Jul 18, 2016 3:55:52 PM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNUNG: Connection XMPPTCPConnection[USER] (1) closed with error
java.lang.NullPointerException: condition must not be null
        at org.jivesoftware.smack.util.Objects.requireNonNull(Objects.java:23)
        at org.jivesoftware.smack.packet.XMPPError.<init>(XMPPError.java:162)
        at org.jivesoftware.smack.packet.XMPPError$Builder.build(XMPPError.java:336)
        at org.jivesoftware.smack.packet.Stanza.setError(Stanza.java:268)
        at org.jivesoftware.smack.packet.ErrorIQ.<init>(ErrorIQ.java:36)
        at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:655)
        at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:151)
        at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:981)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$500(XMPPTCPConnection.java:146)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:986)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:941)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:956)
        at java.lang.Thread.run(Unknown Source)


03:55:52 PM XMPPConnection closed due to an exception (XMPPTCPConnection[USER] (1))java.lang.NullPointerException: condition must not be null
        at org.jivesoftware.smack.util.Objects.requireNonNull(Objects.java:23)
        at org.jivesoftware.smack.packet.XMPPError.<init>(XMPPError.java:162)
        at org.jivesoftware.smack.packet.XMPPError$Builder.build(XMPPError.java:336)
        at org.jivesoftware.smack.packet.Stanza.setError(Stanza.java:268)
        at org.jivesoftware.smack.packet.ErrorIQ.<init>(ErrorIQ.java:36)
        at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:655)
        at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:151)
        at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:981)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$500(XMPPTCPConnection.java:146)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:986)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:941)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:956)
        at java.lang.Thread.run(Unknown Source)

 

It seems, that the NPE crashes the everything. After that, the automatic reconnect starts.

It only occurs with Gajim as recipient. It sends a valid message. XEP-0095: Stream Initiation  3.2 Example 8

A new test with Spark as recipient works, but ther is a different (maybe wrong?) error-type:

04:25:15 PM RECV (1): <iq id="bBCyJ-109" to="dustyn_s@dresden/Instly" from="marc_v@dresden/Spark 2.6.3" type="error"><error code="403" type="AUTH">
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

 

On that way, anyone else have problems with incorrect filetransferstatus?

My reject or cancel doesn't came through to the recipient and if he cancels, my status is "done" instead of cancled...

 

Thank you and sorry for my very horrible english...

Outcomes