Workflow js library timesout

I added a js library to one of our workflows. The implementation is timing out, even though outside of retool the same setup works. Any thoughts?

console.log('file content', {fileName:value.name, value:value.base64Data, client: ssh2SftpClient})
// Send off to server via SFTP
// Code below timesout

const Client = ssh2SftpClient;
const sftp = new Client();
console.log('client', sftp.connect)
sftp.connect({
  host: 'us-east-1.sftpcloud.io',
  port: '22',
  username: '59bd149ccd7a47d38c01a2bdee56d30f',
  password: '5zFqlGHJXFMMoWJZWpvzyIOYCGJRkuRo'
}).then(() => {
  console.log('dirs', sftp.list('/test'))
  return sftp.list('/test');
}).then(data => {
  console.log('the data info', data);
}).catch(err => {
  console.log('error', err);
});

return value

Hi @Matias_Mariani! Libraries in Retool are a bit tricky since there's no real confirmation of them working or not after you paste them into the external libraries section of your org or app.

Would you mind sharing the link to the library you're using?

In Workflows, there are only a select number of external libraries supported at the moment (we're working on extending this!).

In apps, "Retool recommends you load the minified, UMD build, usually named with the format <library>.min.js. Non-minified builds usually require @require or import statements. Some libraries are not compatible with Retool, and you may need to use these in custom components."

@victoria , the OP did add a library from the Workflow "supported" list... there's also another thread I just posted on about this particular library giving errors, even though the code works outside of Retool.

Ssh2-ftp-client not working in workflow

Ack got it—thank you, @pyee! Looks like Joe is on the case in the thread you linked :saluting_face: