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 http://jabber.org/protocol/bytestreams & http://jabber.org/protocol/ibb

B->A: IQ http://jabber.org/protocol/bytestreams & http://jabber.org/protocol/ibb

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:

=====

Initial

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?

thanks,

augusto.

Hi Augusto,

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

Walter

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.

walter-

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

augusto.

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?

Thanks,

Shiv

Hi Shivprasad,

Can you send me the Android file transfer code?

Thanks in advance.

Regards,

Vikash

Hi Vikash,

I am using code from this http://community.igniterealtime.org/message/215063#215063 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);

connConfig.setSASLAuthenticationEnabled(false);

connConfig.setReconnectionAllowed(true);

configure(ProviderManager.getInstance());

connection = new XMPPConnection(connConfig);

connection.connect();

connection.login(username, password);

Thanks,

Shivprasad

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.

Regards,

Vikash

Hi Vikash,

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

Thanks & Regards,

Shivprasad

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 vkshrivastva@gmail.com

Regards,

Vikash

hi-

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?

thanks,

augusto.