FileTransfer on smack client

Hi there,

I’ve dev xmpp client with smack lib and I met with one problem on filetransfer. When I trying send any file from (ie Adium) to my client Adium says “user does not support file transfer”.

In my code configure I’ve follow:

pm.addIQProvider(“si”, “http://jabber.org/protocol/si”,

new StreamInitiationProvider());

pm.addIQProvider("query", "[http://jabber.org/protocol/bytestreams](http://jabber.org/protocol/bytestreams)",

new BytestreamsProvider());

pm.addIQProvider("open", "[http://jabber.org/protocol/ibb](http://jabber.org/protocol/ibb)",

new IBBProviders.Open());

pm.addIQProvider("close", "[http://jabber.org/protocol/ibb](http://jabber.org/protocol/ibb)",

new IBBProviders.Close());

pm.addExtensionProvider("data", "[http://jabber.org/protocol/ibb](http://jabber.org/protocol/ibb)",

new IBBProviders.Data());

after success connection I create FileTransferManager also I set serviceenabled to true on FiletransferNegotiator but problem is still appear.

Can someone help me or say whats problem ?

Thx a million

Probably because of SMACK-338.

Hi Rcollier,

Are there any updates on the smack-338 issue? I am having issues in file transfer with smack 3.2.1.

Thanks,

Shiv

Please check the experimental Smack 3.2.2 on www.igniterealtime.org

Hi Walter,

Thanks for your quick reply. I have tried file transfer with smack 3.2.2 experimental jar and still having the same problem. I am facing the issue SMACK-338 regarding file transfer. There is no update on SMACK-338 in experimental 3.2.2 jar. Please let me know if there is any other way to achieve file transfer. I have tested the same on nightly builds as well but I am having same response.

Thanks & Regards,

Shiv

The experimental build is not fixing the IBB issue in the moment. A developer tries to track the issue down. Can you report the last send/received IQ stanza and messages of your client prior the crash? We are seeing an error message being send to the sender and a subsequent failure.

The same for you?

Hi Walter,

I am not getting any crash while performing file transfer. I am getting the output like this.

Sender side:-

0.0 is done!

Negotiating TransferProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

0.0 is done!

Negotiating StreamProgress0.0

At the receiver side:-

addFileTransferListener method is called.

0.0 is done!

Initial

File Received 4880.jpg 1839

In the logs it is showing the received file name and size but file is not received. Please guide me on the same as I am not able to track the issue. I am testing this for android client.

Thanks,

Shiv

Sorry,

i find no 3.2.2 newer build. I tried the nightly buld of 3.2.0 …nothing changes…

Still transfer starts, progress gets stuck at some point …

but file is transferred 100% ok

Senders progress looks okay…

Please advice where to get the latest 3.2.2 build and what to send as debug ouput

Hi Herald,

Smack 3.2.2 is experimental build and available on http://community.igniterealtime.org/blogs/ignite/2011/08/26/experimental-smack-3 22-fixes-jabberd2-and-file-transfer. I am not able to transfer a file using 3.2.1 or 3.2.2. If you are able to achieve file transfer then can you please send me the code snippets you used. Are you testing it on real devices or android emulator?

Thanks,

Shiv

HI

i may be dumb, but i find not newer 3.2.2 build as from last week or so…

This one i tried yesterday. I got a notice last night about a 3.2.2 build, which i cannot find anywhere.

…maybe i post this in a wrong thread, but i am referring to a Windows Spark 2.6.3 … not an android client…

Guys,

please use the smack debugger available in the login screen after clicking the advanced button. You will be able to monitor the data stream between the spark clients. This will give much more information than the chat window.

The 3.2.2. Samck library is located at this document: http://community.igniterealtime.org/blogs/ignite/2011/08/26/experimental-smack-3 22-fixes-jabberd2-and-file-transfer

1 Like

Hi Walter,

Is Smack file transfer working on android clients? I am working on android based XMPP client. So, I need information about file transfer on android using smack.

Thanks,

Shiv

As far as I know: Yes, but not in IBB mode with 3.2.0

Hi Walter,

Thanks for your quick reply. I am trying to achieve file transfer using filetransfermanager from smackx. If you have some code snippets for file transfer in other modes rather than IBB, it will be helpful for me.

Thanks,

Shiv

Hi Walter,

Any updates on the new official build for smack? Are there any plans to fix IBB file transfer issue(SMACK-338) in the new release? When it(Smack 3.2.2) is supposed to release? If you have any information about it please let me know. Otherwise I can start looking out for other solution.

Thanks,

Shiv

I am targeting mid to late September for a 3.2.2 release. Walter has someone working on a fix for the file transfer issues, that will be included.

Hi Shivprasad,

you are highly welcome to assist the bug hunt. A student is tracking down the issue, but it is far from simple. The IBB transfer has two modes (IQ stanzas versus message stanzas). Both are buggy and it is far from simple to fix it. We are currently hunting the bugs related to message stanza

By the way, this is an open source community run by volunteers. If you do not want to use the lib, you may choose to do so. But we are not scared, if you use something different.

Hi Walter,

Please don’t get me wrong, I was saying that I will try some other way for getting file transfer done. Actually this forum has helped me a lot while developing the chat client. So, I am really thankful to this community.

Thanks,

Shiv

Hi Shivprasad,

Are you able to make File Transfer using Smack on Android? if yes please send me a demo app.

Regards,

Vikash