web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Encountered an unexpec...
Power Automate
Unanswered

Encountered an unexpected error during Desktop flow script execution

(0) ShareShare
ReportReport
Posted on by 12

Hi,

 

I am trying to run a simple desktop flow from the cloud flow by Connecting "Directly to machine". The connection to the machine is successful. I am able to select the machine and the desktop flow. I chose to run it in Attended mode.

Though I am able to run the flow in one machine, I keep getting the below error in another machine.

 

Encountered an unexpected error during Desktop flow script execution: 'System.Exception: Host process terminated with unknown exit code -532462766
at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.CheckHostProcessExitCode()
at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.LoadRobotImpl(String packageLocation, Int32 varPreviewChars, Int32 varPreviewLines, Boolean isDebug)
at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.<>c__DisplayClass73_0.<LoadRobotAsync>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Flow.RPA.Agent.Server.Components.ScriptEngines.RobinEngine.RobinEngine.<Execute>d__17.MoveNext()'.

 

Please help me with the issue. I am relatively new to Power Platform. I am using the trial version of Power Platform.

Categories:
  • Edzone Profile Picture
    2 on at

    Having the same issue when running Desktop flow in Power Automate Flows.

    Edzone_0-1636106246678.png

    ncountered an unexpected error during Desktop flow script execution: 'System.Exception: Host process terminated with unknown exit code -532462766
    at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.CheckHostProcessExitCode()
    at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.LoadRobotImpl(RobotOptions options)
    at Microsoft.Flow.RPA.Desktop.Robin.Runtime.Agent.Agent.<>c__DisplayClass73_0.<LoadRobotAsync>b__0()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at Microsoft.Flow.RPA.Agent.Server.Components.ScriptEngines.RobinEngine.RobinEngine.<Execute>d__19.MoveNext()'.

     

    Thanks,

     

  • vishrpa143 Profile Picture
    6 on at

    Have you found any resolution

  • Emils00 Profile Picture
    7 on at

    Having the same issue, any resolution?

  • jsteele64289 Profile Picture
    22 on at

    Hey there!

     

    I believe this is an error that means the Power Automate service has failed. Usually if I either restart that service or restart the computer, this error resolves itself.

     

    I hope this helps!

  • Emils00 Profile Picture
    7 on at

    Hi @jsteele64289 

    Will try your suggestion, but this can't be the solution for long term. As I'm running PAD flow on multiple VM's in unattended mode and restarting that service or VM would be too much time consuming.

  • jsteele64289 Profile Picture
    22 on at

    @Emils00 Let me know how that works! I also have a few more ideas, for longer term solutions.

     

    First, since you're running this unattended, I am assuming you call it from Power Automate (Cloud). If you employ any sophisticated error handling right now, you probably know how to read the output of PAD and use the content of any error message to drive the error handling. If not, please let me know, and I can show you what I do.

     

    That said, if you can place the content (or some portion) of this error message into a conditional, and, when encountered, have this error drive a "restart VM" action <https://docs.microsoft.com/en-us/connectors/azurevm/#restart-virtual-machine>, you could potentially restart the problem VM, while also sending the unattended flow to one of your other machines in the meantime.

     

    One more question: are you using these multiple VMs as part of a machine group? If so, the above idea is very similar to what I do on a high volume automation for a client. I see this type of error handling succeed almost every day, when these various failures would often have required manual intervention.

     

    I hope this is helpful!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard