OpenFtpSession ACTIVITY using Key file and SFTP

Hello everyone!

I need to download files from a ftp. I am using the opensessionftp activity so that I can configure the credentials I will use a key file instead of the a password and I checked the option SecureFtp. The problem is that when I test connection a message appears saying “Object reference not set to an instance of an object” I hope someone help me to solve the problem o give me an idea how I can establish connection using a key file and SFTP security.

This is the error

1 Like

Hi @Lucky0906,

Are you passing the correct path in KeyFile property?

Check the guide below :

~Diego Turati

Yes, I am in fact, the image that I attached is the edit connection string, it looks like uipath does not recognise the key file and for this shows the windows message

1 Like

@Lucky0906 did you check the folder permission where this KeyFile is located? It can be something related with access. Looks like the robot is trying to access the file but with no success.

Check this and let me know.

~Diego Turati

Hi
from actvity documentation:
KeyFiles - The path of the files that contain the Private Key that is to be used for a secure connection to the FTP server. This field supports only string variables. - Is this the issue?

Cheers

1 Like

I tried with a string variable and a string directly in both case the flow crashed

1 Like

@Lucky0906 Are you under some proxy connection? If you try to connect in the SFTP manually it works?

Yes It works. I have established connection using winscp i set the same parameters that the first image and the connection is ok. I dont use password I use the keyfile

@Lucky0906, did you try to run your xaml in debug mode? Is your automation crashing in the moment the robot is executing the Open FTP activity?

~Diego Turati

Hi,
do you use string var for user as well?
Username - The Username that is to be used to connect to the FTP session. This field supports only string variables.

do you initialize the output variable FTPSession?
FTPSession - The connection to the FTP server that is stored in an FtpSessionGen variable.

Cheers

Any solution you have found for this? pls share

Hi @Lucky0906 , how are you?

Are you still facing the problem or it’s already fixed?

~Diego Turati

Hi @Lucky0906

Did you get the solution for this?

I am also facing the same issue. It will be useful , if you share the solution.

Thanks in advance!!

-Narmatha

I din´t, I had to do graphically

Same issue for me.
Meanwhile UIPath Docs state that the package is deprecated, is there any successor?

Is anyone able to get this activity “ UiPath.FTP.Activities.OpenFTPSession” ?

A colleague of mine was able to get this working by using a PEM file instead of PKK. If anyone here is still stuck, give that a shot.