it2be FTP Client: Javascript Error / The socket is EOF
Posted: Tue Mar 20, 2018 3:04 pm
We created basic code to connect to a SFTP folder.
When trying to connect, we get
Before if()
JAVASCRIPT ERROR
The socket is EOF
The "Before if()" is our application.output(), so the jSFTP_Client.connect() seems to fail.
What could be gone wrong?
This is the code we used (quite similar to the sample code):
When trying to connect, we get
Before if()
JAVASCRIPT ERROR
The socket is EOF
The "Before if()" is our application.output(), so the jSFTP_Client.connect() seems to fail.
What could be gone wrong?
This is the code we used (quite similar to the sample code):
- Code: Select all
function testSFTPFunctions(event) {
var sAccountInfo = plugins.it2be_ftp.createPasswordSettings("host", "username", "password");
var jSFTP_Client = plugins.it2be_ftp.createSFTPclient(sAccountInfo);
var aFiles = [];
application.output( "Before if() " );
if ( jSFTP_Client.connect() ) {
application.output( "SFTP connection" );
aFiles = jSFTP_Client.list("test");
application.output( aFiles.length );
jSFTP_Client.disconnect();
}
else {
application.output( "No SFTP connection" );
}