Running robot from a cmd

Hello everyone,

let’s start by summarizing facts:

  1. I developed robot on one computer (let’s call it PC1), where it worked with no problem, when running from Studio or cmd (with /f /monitored and /executor switches). (Studio ver 2017.1.6522)
  2. We got Enterprise license, which I activated on a new computer (PC2), which was dedicated only to RPA (new inctalation of OS and whatnot) (Studio ver 2018.2.3)
  3. On PC2 when robot launched via Studio it worked with no problem, but when launched from cmd, following error appears

C:\Users\username>“C:\Program Files (x86)\UiPath\Studio\UiRobot.exe” -f:“C:\path_to_xaml_file\Main_some_name_1.0.xaml” /executor /monitored
Some_name System.Xaml.XamlObjectWriterException: Cannot set unknown member ‘UiPath.Database.Activities.ExecuteQuery.TimeoutMS’.
at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Activities.XamlIntegration.FuncFactory1.Evaluate() at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings) at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.RobotRunner.<>c__DisplayClass54_0.b__0()

Which probably should be problem with executing SQL query? Which doesen’t make sense, since when launched via studio it works ok. System ODBCs shouldn’t be needed, since PC1 doesen’t have them as well.

Also when updating UiPath.Core.Activities, the process fails, because it can’t resolve dependency on UiPath.Vision (> 1.1.0) (same with installing UiPath.UIAutomation.Activities, which Core is dependent on, so I guess it fails on installing the UIAutomation; feel free to correct me), which I don’t know if it is significant or not.

I tried reinstalling whole studio multiple times with deletion of everything related to UiPath to no avail. OS is Win10Pro.

If you need anything excluding the xaml, please feel free to ask, since I have no idea what is needed to diagnose the problem.

Can you help the lowly rookie which I am?

Thank you,
B13

Hi,

Make sure you publish the flow at least once.
The project.json dependencies part does not get populated in earlier versions of Studio (this was fixed in 18.3), so the robot does not know what dependencies to use.

Later edit:
Just saw that your flow ran on PC1 without problems when using CMD:
This means that the problem might be elsewhere, in the robot’s feed.
Please open nuget.config from both PCs from the Studio installation folder ( c:\program files(x86)\UiPath\Studio ) and make sure they are the same.
I think there is a problem with the nuget config from PC2, that it’s missing the feed from where to download the Database activities you used.

Where did you install that Database Activity from ? What version is it ?

Thanks,
-Andrei

2 Likes

Hello andreiT,

thank you for your quick reply.
As you suggested, I tried publishing once more (no change) and to verify the nuget.config on both PCs and both were same

<?xml version="1.0" encoding="utf-8"?>

Both Database Activities (as well as all other packages were installed through studio form the “https://www.myget.org/F/workflow/” gallery.

After checking all this I tried opening the project.json where the dependecies are and the Database activity version was older than the installed one - so I tried correcting the version to one installed and it launched through cmd on PC2.

Thank you for your help.

BR,
B13

Later Edit: No idea how to insert xml code, but both are as installed.

1 Like