UiPath 18.2 cmd line execution failing to initiate

Hi all,

Until the recent update to 18.2.2 I had been using 18.1.3 and 18.1.4 on a series of projects. In order to initiate them I had been executing them by .bat file from the task scheduler with the following lines per an old how-to that I can no longer locate:

“C:\Program Files (x86)\app-18.1.3\UiRobot.exe” /file:“C:\Users\Admin\Documents\UiPath\Puppet_Master\Main.xaml”

With the update to 18.2.2 this method fails to initiate any applications despite my ability to run the process from Studio just fine.

I have tried a variety of commands to initiate the start, varying which executor is being used (“C:\Program Files (x86)\UiPath\app-18.2.2\UiPath.Executor.exe” vs. C:\Program Files (x86)\UiPath\UiPath.Executor.exe") with no real discernible difference. Below are several cmd attempts and associated returns. Note that none of these launch an application.

Per the UiPath 18.2 Release Notes I tried switching from ‘Main.xaml’ to ‘project.json’ to no avail

"C:\Program Files (x86)\UiPath\app-18.2.2\UiPath.Executor.exe" /file:"C:\Users\Admin
\Documents\UiPath\Puppet_Master\project.json"

(The above returns nothing and no applications launch)

"C:\Program Files (x86)\UiPath\UiPath.Executor.exe /file:"C:\Users\Admin\Documents\UiPath\Puppet_Master\project.json"
The application has failed to start because its side-by-side configuration is in
correct. Please see the application event log or use the command-line sxstrace.exe tool for more detail. 
"C:\Program Files (x86)\UiPath\app-18.2.2\UiRobot.exe" /file:"C:\Users\Admin\Docu
ments\UiPath\Puppet_Master\project.json"
Puppet_Master System.Xaml.XamlObjectWriterException: Cannot create unknown type
'{http://schemas.uipath.com/workflow/activities}SendMail'.
   at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
   at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlW
riter, Boolean closeWriter)
   at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
   at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEm
ptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindin
gs, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childAct
ivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallSt
ack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options,
ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity
currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions optio
ns, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, L
ocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options,
 ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstan
ceExtensionManager extensionManager)
   at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(Workfl
owInstanceExtensionManager extensionManager)
   at System.Activities.WorkflowApplication.EnsureInitialized()
   at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation,
 Boolean push)
   at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeS
pan timeout)
   at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Obj
ect state)
   at UiPath.Executor.RobotRunner.<>c__DisplayClass54_0.<OnInvokeJob>b__0()
"C:\Program Files (x86)\UiPath\app-18.2.2\UiRobot.exe" /file:"C:\Users\Admin\Docu
ments\UiPath\Puppet_Master\Main.xaml"
Puppet_Master System.Xaml.XamlObjectWriterException: Cannot create unknown type
'{http://schemas.uipath.com/workflow/activities}SendMail'.
   at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
   at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlW
riter, Boolean closeWriter)
   at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
   at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEm
ptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindin
gs, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childAct
ivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallSt
ack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options,
ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity
currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions optio
ns, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, L
ocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options,
 ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstan
ceExtensionManager extensionManager)
   at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(Workfl
owInstanceExtensionManager extensionManager)
   at System.Activities.WorkflowApplication.EnsureInitialized()
   at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation,
 Boolean push)
   at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeS
pan timeout)
   at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Obj
ect state)
   at UiPath.Executor.RobotRunner.<>c__DisplayClass54_0.<OnInvokeJob>b__0()

So far I’m at a loss of how to successfully execute one of these bots from cmd with the newest update as the release notes indicate should still be working. I’m sure that I’m just missing something obvious and would really appreciate any insight onto the issue.

Thanks!

1 Like

It works for me. Could you rename the execution file name to UiRobot.exe and try?

Am using UiPath 2018.2.3 and executed the command line “C:\Program Files (x86)\UiPath\Studio\UiRobot.exe”/file:“C:\Project1\Main.xaml”

1 Like

Which executable file are you referring to?

With the new update the UiRobot.exe and the UiPath.Executor.exe are now located in a few different locations. The relevant file structures are pictured below:

Base Level UiPath folder

Within each specific version subfolder there are no executable files.

In the older versions UiRobot.exe was the executable that launched when UiPath was running a process. 18.2.2 and 18.2.3 both appear to be running UiPath.Executor.exe instead. Which of these accepts files as parameters and which one can be executed from cmd?

To follow up - Within each specific version subfolder the executable files are as follows:

Capture2

The only discernible difference being 18.2.2 vs. 18.2.3

Within each version specific subfolder, the enclosed “UiPath” folder contains no executable files.

1 Like

Hi Tyler,
Your problem is not an executable one, it’s about the missing dependencies (in your case, the email one).

My guess is you never published the project, right?
I tried it right now on my machine, and it seems that the project.json dependencies section is not populated until you press publish.

Can you please check you project.json file and look at the dependencies section? If it does not contain the mail activity, that is the reason why it won’t work.

So please try to publish it locally once, then run it again from command line.
You run the flow by using the UiRobot.exe executable with /f or /file parameter, it will automatically run the executor.

2 Likes

@andreiT

Hi Andrei,
Thank you for the insight! You would be correct. I had not published it. Everything seems to be working now.

Running the following works:

"C:\Program Files (x86)\UiPath\app-18.2.3\UiRobot.exe" /file:"C:\Users\Admin\Documents\UiPath\Puppet_Master\Main.xaml"

As does:

"C:\Program Files (x86)\UiPath\app-18.2.3\UiRobot.exe" /file:"C:\Users\Admin\Documents\UiPath\Puppet_Master\project.json"

Interestingly, neither of these work for my machine currently running 18.1.4 but upgrading seems to have resolved the issue.

Thanks all!

Yeah, projects created in a version of studio are not supported for editing/running in a previous version of Studio. Only in future ones.
Sometimes that might work, but it’s not supported so not recommended.

Always upgrade, never downgrade :slight_smile:

1 Like