Smack 3.2.2 alpha: Fixes IBB transfer

Would this bug also then cover my issue (posted in the forumn) where once IBB is selected only IBB will ever be used? The current assumption seems to be that IBB is always selected correctly and that hte app is of limited lifespan which is not always the case.

No unfortunately not, we have not seen this problem happening in Spark 2.6.3.

BTW: Do you manage to get IBB with IQ stanza working? Spark can not do that…

I have tried file transfer with smack 3.2.2 alpha on android client. I am able to transfer the files upto 500kb but if the file size is more than 500kb then file transfer is not successful. Is it a known issue? Please help me.

@Nicholas, we will test this way the next days and try to fix the issue.

@Shivprasad, can you describe the problem in detail? Any error messages? Is the progress bar full when the error occurs?

If the bar is full, there is a problem with the receiving thread which is closed to soon after filetransfer. Smack says there was an error while file transfer, but the file should be ok (Check with md5 checksum for example).

Thanks for quick reply. Actually it was my mistake that i put onfiletransfer method at wrong place.I have fixed it now. I am able to transfer images and mp3 files. Sorry for inconvenience.

Is your transfer a bytestream or IBB?

I am using IBB for file transfer.

ibb transfers are not working for me. i’m using the smack jars attached to this thread, but i’m not using spark but using the smack jars directly on my two clients.

i have two clients logged into the same xmpp account connected to the same server (openfire 3.7.0). i have both "smack debug window"s open. the “smack info” tab on each displays “smack version: 3.2.2a_fixedFileTransferV2”, so i know i’m using the latest patched jars mentioned here. here is a summary of the messages:

A->B: IQ &

B->A: IQ &

A->B: IQ query disco#info

A->B: IQ bytestreams.ibb.packet.Open

B->A: IQ smack.util.PacketParserUtils$2

A->B: Message sent (encoded file)

A->B: IQ ibb.packet.Close (end of transfer)

i see the 2nd to last message above in client B’s “raw received packet” tab but not in the “all packets” tab of the “smack debug window”.

on client B i have an IncomingFileTransfer instance that i’m polling - checking when IncomingFileTransfer#isDone returns true or IncomingFileTransfer#getStatus returns error, refused or cancelled. none of these conditions occur. when i periodically print the status, it shows up as:



Negotiating Stream

In Progress progress

In Progress progress

In Progress progress

In Progress progress


it never makes progress, even though it seems it received the xmpp messages with my file.

so a couple questions:

  1. how come it didn’t choose bytestreams even though both clients are on the same local network? (do i need to enable this somehow locally or at the server?)

  2. why does the IncomingFileTransfer object never download my file, even though the “smack debug window” displays that the encoded file was transfered over ibb?



Hi Augusto,

what kind of clients are you using? Is this Spark or “own” codes ?


BTW we’ve done lots of testing with the thread leak. 2 files a second at 1k each for hours and don’t have the same problem. That should probably be incorporated in the trunk.


this is my own code, i’m not using spark. i have two java clients that are using the smack api embedded.


I am using the same libs for android client and file transfer is working perfectly fine. One issue was there the files were not shown until i reboot the device but i fixed it using some android trick.

Hi Walter,

Is there any xmpp library for i-phone which supports file transfer?



Hi Shivprasad,

Can you send me the Android file transfer code?

Thanks in advance.



Hi Vikash,

I am using code from this link. Use configure method inside ur service if ur trying it for android. And login user as shown below.

ConnectionConfiguration connConfig = new ConnectionConfiguration(“host”, port);




connection = new XMPPConnection(connConfig);


connection.login(username, password);



Hi Shivprasad,

Thanks for your prompt response. But I am not able to transfer the file.

Can you please provide me a demo version of filetransfer app for android.



Hi Vikash,

Please send me your code. I will go through it and let you know if something needs to be changed.

Thanks & Regards,


Hi Shiv,

I am unable to send the code as attachment. Can you give me your personal email id so that I can send the code on that. My email is




the issue i was having above back in september is still an issue. to recap:

  1. i’m initiaiting a file transfer between two clients, requesting over bytestreams or ibb.

  2. the clients negotiate to use ibb and the first client transfers the file via ibb

  3. the second client receives the messages (viewing raw messages in the debug console)

  4. i poll IncomingFileTransfer to see the status, but it stays always “In Progress”

does anyone else have this problem?