UIPath Service hangs when invoking XAML from Outlook using Batfile

Scenario: When a mail comes I need to run UIPath workflow. So wrote a script in outlook to open a bat file when mail comes. It is running fine. But some times the command prompt and UIPath stucks when opening. And during the next run too, it is not running. Please let me know how to avoid this and why this is occurring.

Getting the below Error in the Event Viewer.

{“message”:"StartJob : mscorlib, \n System.AggregateException: One or more errors occurred. —> System.NotSupportedException: Robot already running for user xxxxxxx \r\n at UiPath.Service.Impl.RobotProvider.TryTake(Guid robotKey, UserIdentity identity)\r\n at UiPath.Service.Impl.ExecutionManager.d__10.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at UiPath.Service.Messages.MessageDispatcher.<>c__DisplayClass9_0.<b__0>d.MoveNext()\r\n

====================
If i kill the Command Prompt and UIPath process, it is running fine from the next run.

Steps to reproduce:

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Hello!

Have you tried to kill those processes after executing your script? It’s possible using “Kill Process” activity. It might work :slight_smile:

Regards,

Thanks for your reply. When the process runs successfully, the “UIRobot.exe” Process kills by itself. So after the run it wont be available. so I think we do not need to kill it at the end since it will be killed by itself.

In my scenario, The process runs fine for n times. Again for n+1 time when the batfile starts to open the XAML, both XAML and command Prompt hungs. And it is not executing the XAML and the “UIRobot.exe” and “cmd.exe” process stays. So during the next run, already both the processes are available it is not allowing the new process to run. I do not know why that hungs.