FTP-Unable to Upload/Download Files

Hi all, I am working on downloading files from FTPS. The server config should be correct, as I can read the files and folders in FTPS.

But when I tried to download the file, I receive an error message:

20.4.3

Source: Download files

Message: One or more errors occurred.

Exception Type: System.AggregateException

RemoteException wrapping System.AggregateException: One or more errors occurred.  ---> RemoteException wrapping FluentFTP.FtpException: Error while downloading the file from the server. See InnerException for more info.  ---> RemoteException wrapping System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 34.223.39.251:56075 
   at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpSocketStream.<ConnectAsync>d__78.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at FluentFTP.FtpClient.<OpenPassiveDataStreamAsync>d__364.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpClient.<OpenDataStreamAsync>d__369.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpClient.<OpenReadAsync>d__384.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpClient.<DownloadFileInternalAsync>d__310.MoveNext()
	--- End of inner exception stack trace ---
   at FluentFTP.FtpClient.<DownloadFileInternalAsync>d__310.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpClient.<DownloadFileToFileAsync>d__302.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentFTP.FtpClient.<DownloadFileAsync>d__300.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.FTP.FtpSession.<UiPath-FTP-IFtpSession-DownloadAsync>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.FTP.Activities.DownloadFiles.<ExecuteAsync>d__20.MoveNext()
	--- End of inner exception stack trace ---
   at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

The file was created, but the content in the txt file was not:

I also tried to download file with python, and it works fine. So I think it should not be an issue with the server.

Thank you for your help!

@loginerror Could you please help me with it? Thanks!

Just to have the full picture - what is your version of the FTP activity package?

Thanks Maciej, it is 1.0.7495.12930.

1 Like

Thank you, I will register a ticket in our system. I will update this topic when more information becomes available.

1 Like

Hello please I have similar issues now , any solution

Our team is currently working on a fix for this issue. Next release for the FTP activity package will have the fix :slight_smile:

1 Like

Hi @loginerror

I was using New version (2.2.0) in my project , but still facing the same issue

can you please assist me on this

Thanks in advance.

hI @Bachali

I Think you can try also with normal workaround in FTP Server like Right click Download for delete click Send Hot key Delete

Screen Scrapp and check Screescrapped variable.Contains any file with it like that

Just a suggestion and give it a try

Regards
Gokul

Hi,
I’m facing the same issue. Can any one please help me out.

Could you please share a sample project that reproduces the issue for you?