Okay, so I have a flow that navigates to a website and clicks a button that downloads a file. When I run this flow in the Power Automate Desktop editor, it works without any issues. The button gets clicked and the file is downloaded as expected.
However, if I run it from the Power Automate Desktop console or if I trigger the Cloud Flow that calls the Desktop Flow, something different happens. Any time the button is clicked to download the file, the download fails and the Edge Downloads window shows 'Couldn't Download - Couldn't Download' as the message.
Anyone have any explanation on why it would download successfully when the flow is ran from the Desktop Editor, but result in a 'Couldn't Download - Couldn't Download' message when ran from the Desktop Console?
::facepalm::
Welp...I figured it out and it's a real doozy of a non-issue.
My code clicks the file to download it, waits for the file to exist in the download folder and then renames the file.
When you run the code from the editor, the playback speed is significantly reduced to allow you to visually see the code being stepped through.
Well, when I run the code from the console, it runs at full speed, so as soon as the file is downloaded, it gets renamed. This confuses Edge because it doesn't see the file there so it just assumes that the file wasn't downloaded and tells me it couldn't download it. In reality, it did get downloaded.
This issue doesn't occur when I run the code from the editor because the reduced execution speed causes enough of a delay between when the file gets downloaded and renamed that Edge is able to see the file before it is renamed, and thus shows that the file successfully downloaded.
I have literally been troubleshooting this for a week now and I feel like a horses patoot. My only hope is that my suffering will be able to prevent the future suffering of a fellow automater.
I have tried this on several different machines and the issue persists. Can anyone think of any reason why the behavior would be different when running from the console compared to running from the editor?
I changed the service account to the active user and that did not resolve the issue.
I wouldn't change such permissions before not knowing the reason. A download could only fail due to permission issues if the user doesn't have permissions to the download directory or the default download directory doesn't exist. This should be much easier to figure out...
The question is, what is the difference in the runtime mechanism between running from the editor and running from the console?
When I go to the Power Automate machine runtime application I noticed this under 'Troubleshoot'
So that leads to me speculate a possible difference being that when running from the editor the flow runs using the active user's account but when ran from the console the flow runs with this service account. Then there is likely some AD/user policy difference that is causing it to not allow the download when ran from the service account.
I'm going to look at possibly changing that Service Account to a different user and see if I get different behavior.
Which action(s) are you using?
eetuRobo
4
Super User 2025 Season 1
KO-05050229-0
2
stampcoin
2