Uipath download inconsistent

Hi all, at times my bot works fine, but at times there will be download error due to no ran faster than system’s download of huge file. How can I make the bot more stable? Add Try and catch?

1 Like

Hey @winnie_toh

Yes, these scenarios happen often.

Please try using Wait for download activity - https://docs.uipath.com/activities/docs/get-last-downloaded-file

  • First you configure the activity, with timeout (by default it is 5mins)

  • If the file download doesn’t happens within the time mentioned, it will throw an exception

  • Same exception can be captured and handled with required steps

Hope this helps

Thanks
#nK

1 Like

hi! Thank you very much for your advise!!
already using wait for download when i download file, but at times, it seems like the bot run very fast, while the file is still downloading. Could only add some delays at certain steps to slow it down. Will add a try catch! Thank you!

1 Like

Yep @winnie_toh

Are you saying the bot passes the above activity even before the file download completes ?

That’s because the wait for file download activity is poorly designed. When you download a file, the browser creates a tmp file - and the wait for file activity detects that. You’ll need to write your own code to wait for the file to download. Use a Do While and inside it check if the file exists. The condition of your Do While would be that the file doesn’t exist.

1 Like

Is it so…

I have been using it for a while and its fine

It doesnt pick any temp files.

1 Like