powered by Jive Software

File Transfer Error while using Ejabberd and Smack


#1

I am using Smack 4.3.2 (Android client) and Ejabberd Server. When I send a text it works very well. But I have a problem with File Transfer. When I’m trying send file I get this error.

I can get File info like fileName , fileSize but can’t get file. When I am sending from =User1 to =User2 I get the attached error.

But when I am sending from =User1 to =User1 it’s successful.

How can i fix that?

is anybody was have error like this? is any example with fileTransfer with ejabberd_18+smack4.3.2+android?

fileTransferManager.addFileTransferListener(
new FileTransferListener() {

@Override
public void fileTransferRequest(final FileTransferRequest request) {
IncomingFileTransfer transfer = request.accept();
final File file = new File( “/storage/sdcard/Download/” + transfer.getFileName());
try {
transfer.receiveFile(file);
} catch(Exception e)
{
e.printStackTrace();
}
Here’s the error:

myapplication1 W/System.err: org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: item-not-found - cancel [Could not establish socket with any provided host]
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest.cancelRequest(Socks5BytestreamRequest.java:289)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest.accept(Socks5BytestreamRequest.java:255)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator.negotiateIncomingStream(Socks5TransferNegotiator.java:102)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.FaultTolerantNegotiator.createIncomingStream(FaultTolerantNegotiator.java:72)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$2.call(IncomingFileTransfer.java:191)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$2.call(IncomingFileTransfer.java:186)
05-04 21:54:21.190 9864-9924/com.example.myapplication1 W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
05-04 21:54:21.191 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.negotiateStream(IncomingFileTransfer.java:194)
05-04 21:54:21.192 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.access$100(IncomingFileTransfer.java:58)
05-04 21:54:21.192 9864-9924/com.example.myapplication1 W/System.err: at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$1.run(IncomingFileTransfer.java:132)
05-04 21:54:21.192 9864-9924/com.example.myapplication1 W/System.err: at java.lang.Thread.run(Thread.java:818)