powered by Jive Software

Not-acceptable during File transfer using XEP-0047

Take two Smack XMPP Chat clients, let them send files to each other using the IBB protocol (XEP-0047: In-Band Bytestreams (IBB))

  • First time file transfer is successful
  • Restart XMPP server (Openfire)
  • Wait until Clients reconnect
  • Resend file
  • Transfer is not successful.

A empty file is generated at the receiving site.

Errors in the messages are:

<error type='modify'><not-acceptable> in response on a
<open xmlns="http://jabber.org/protocol/ibb">

<error type='cancel'><item-not-found> in response on a
<data xmlns="http://jabber.org/protocol/ibb" >' or '<close xmlns="http://jabber.org/protocol/ibb" >

Empty file is caused by the client not capable of handling the errors correctly. The xmpp errors however are caused by a duplicate InBandBytestreamManager which is initiated on the reconnect. The IBBTransferNegotiator however has still a reference to the original InBandBytestreamManager.

A possible solution has been provided by https://github.com/igniterealtime/Smack/pull/370.
Alternative is rewriting the InBandBytestreamManager and don’t clean up when disconnecting.