Wait for Download: The {file} was found but it's in use

I have created a library to use the Save As download screen (screen shown in capture).
image
This works perfectly when downloading most any file from the web. However, in this case, the website (constructed in Java) is forcing me to open the pdf first, which automatically opens Acrobat Reader, then save the file.
By doing a Save As command from Acrobat, and then selecting “Choose a Different Folder” I get the “Save As” screen indicated in my screenshot - this is good. But when I actually click save, the Wait for Download activity downloads the file but then throws the exception “Wait for Download: The {file} was found but it’s in use.”
I know this is due to the open file, but I don’t know how to get around it.
using Studio Enterprise v. 2020.10.2

Hello @grubright ,

Was this issue resolved? If so what is the resolution?

We are seeing this issue on our end as well, but our download is from a webpage and the file is downloaded as a pdf file without any extra steps.

If this hasn’t been resolved, the issue might be the FileInfo object itself. When the file is downloaded, it’s assigned to the FileInfo object set in the Downloaded file property.

Is it possible that this object is actually locking the file and not releasing it as it should which is causing this error?

If that’s the case, do we have to set this File Info object to Nothing explicitly to release the hold on the downloaded file?

Let me know if you have solved it in any other way.

Thanks!

Yep! This seems to be working for me.

I added a step to set the FileInfo object to Nothing at the end of each file download step.

Then I ran a few more tests and downloaded almost 200 PDF files and there wasn’t a single failure.

But let me test some more before I can be absolutely sure.

:+1:

Could you elaborate? Where did you put the assign activity? Inside the “wait for download” activity or after?

Hi @chase.owen,

I will look at the code later and confirm. But you cannot put it inside Wait for Download because this activity waits for file info object to be valid before it can exit the activity and process the file that has been downloaded.

Therefore you need to put it outside (and after) the Wait for file download activity .

Wait for Download minitors fileinfo

Wait for Download exits when fileinfo object becomes valid

Flow processes the downloaded file

Flow sets the fileInfo object to nothing

Hope this works.