I ran Uiapth using a script, but the following exception was reported for UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml"

Script:
C:\Users\AppData\Local\UiPath\app-21.4.4\UiRobot.exe execute --file “D:\RPA\MainRPA\Main.xaml”

Exceptions:
MainRPA: RemoteException wrapping UiPath.Core.ElementOperationException: ??? —> RemoteException wrapping System.Runtime.InteropServices.COMException: ???
at UiPath.UiNodeClass.WriteText(String text, UiInputMethod inputMethod)
at UiPath.Core.UiElement.WriteText(String text, InputMethod method)
— End of inner exception stack trace —
at UiPath.Core.Activities.ObsoleteTaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi,

can you try with the below script once ?
start “” /min “C:\Users\AppData\Local\UiPath\app-21.4.4\UiRobot.exe” -f “D:\RPA\MainRPA\Main.xaml”

  • The following commands are not supported for Windows or Portable projects:

    • UiRobot.exe execute --file “C:\UiPath\Automation\Main.xaml”
    • UiRobot.exe execute --file “C:\UiPath\Automation\Project.json”
    • For Windows project check with UiRobot.exe execute --file "C:\UiPath\Automation\Notepad.1.0.6682.21636.nupkg"

Reference: Robot - Command Line Interface

  • If you are using a robot in 2021.4.4, you need to know that is unsupported. You need to upgrade it to a supported version. For example https://download.uipath.com/versions/23.10.0/UiPathStudio.msi

  • Make sure that the project from D:\RPA\MainRPA\Main.xaml was built in a lower or same version as your robot version.