onDownload/true doesn't wait for download to finish and doesn't rename properly

Hello guys. I have a problem with the onDownload function on Chrome. I set it to change the name of the download file reading it from a CSV. I have 3 files that are being downloaded from a single page which i want to rename to their corresponding columns. The first issue is that when i run this in a loop of multiple pages after the 2nd or 3rd loop the renaming stops working properly. Only 2 of 3 files are being renamed and the other one downloads with the original name. The other issue i observe is that the onDownload / true doesn’t wait for the download to finish before continuing to the next command. I’ve tried the onDownload demo macro and runs well. Also i’ve tried separating the 3 downloads from 1 loop to 3 different loops but the renaming issue is still present. Any advises here? Here is the ondownload code:

{
  "Command": "onDownload",
  "Target": "${date}-${!COL4}",
  "Value": "true"
},

// {date} is an attribute i get from the page where i download the files from and {!COL4} is the column from the CSV where i get the desired new name from.

Hi, can you please retest this with the new V5.6.5 version?

I will try as soon as the version is released for Chrome since the Firefox onDownload is still not fully supported in Firefox.

Ah, correct - ondownload is limited in Firefox.

Can the new 5.6.5 version be installed manually to Chrome or to the new Edge Chromium? I need this onDownload function to work as soon as possible but the update you mentioned still haven’t appeared in the Chrome extension store :confused:

Hi, yeah, the Chrome store review process is very slow these days. But the new version is available already in the Edge store: https://microsoftedge.microsoft.com/addons/detail/goapmjinbaeomoemgdcnnhoedopjnddd

Also note the new variable: !Last_Downloaded_File_Name (read only) Get the name of the downloaded file. This requires ONDOWNLOAD to be inside the macro.