B4A Library Android SFTP based on JSch tutorial

AscySoft

Active Member
Licensed User
Longtime User
UPDATE:
I've just capture a new sftp error:
2015.03.30_18.23.09.690 >> sftp1_ListCompleted event: success=false error: (JSchException) com.jcraft.jsch.JSchException: reject HostKey: ... (my server name)
 

Yuretz2

Member
Licensed User
Longtime User
Please try this update (v1.20). It includes a new Mkdir method.
It work's! And fires "CommandCompleted" event, with "Command" and "Success" fields, but "Reply" field is empty. It's not critical for me right now, but my be useful for other user's.
Thank You very much! B4A support is brilliant.
 

Yuretz2

Member
Licensed User
Longtime User
Hi, Erel. As I know, this library uses
version 0.1.49 of JSch. It works great, but sometimes I can see in my server logs error messages like "bad packet". Is it possible to update this library to the latest
version 0.1.53 of JSch? Thank you.
 
Last edited:

Yuretz2

Member
Licensed User
Longtime User
I'm using this lib in a service module. I'm initializing sftp and call yes_no in service_create. sftp.close is in service_destroy . is that correct?
 

Yuretz2

Member
Licensed User
Longtime User
I've updated the library. It is based on version 0.1.54.
With new library got this error while compile:
B4A version: 6.31
Parsing code. (0.06s)
Compiling code. (0.06s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Generating R file. (0.06s)
Compiling generated Java code. (1.97s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/jcraft/jsch/Buffer;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:615)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:570)
at com.android.dx.command.dexer.Main.access$2(Main.java:546)
at com.android.dx.command.dexer.Main$2.processFileBytes(Main.java:514)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:537)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
at com.android.dx.command.dexer.Main.run(Main.java:206)
at com.android.dx.command.dexer.Main.main(Main.java:179)
at com.android.dx.command.Main.main(Main.java:103)
1 error; aborting
 

MarcRB

Active Member
Licensed User
Longtime User
In a big project I still get this error:

An error has occurd in sub:
java.lang.Exception: Sub sftpupdw_listcompleted signature does not match expected signature. Continue? Yes / no



In a small test connected to the same server, I didn't get this error.
But the sFTP part of the code is like identical in both projects and identical to the given example on the first page of this topic. Strange!

Could it be a difference between the stored host file and the real host information? (from early test)
I use sFTPupdw.SetKnownHostsStore(File.DirInternal, "hosts.txt").

I changed already the filename and I deleted the existing file. But still get this error on listcompleted.

Do you have any suggestions?
 

Similar Threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…