Execution error : System.Xaml.XamlObjectWriterException

My Process in the unattended bot give the error as an alreat in the Orchestrator as below. On my dev machine the process executes fine. Please help understand the issue.“Execution error : System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}ExcelApplicationScope’.\r\n at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)\r\n at System.Xaml.XamlWriter.WriteNode(XamlReader reader)\r\n at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)\r\n at System.Activities.XamlIntegration.FuncFactory1.Evaluate()\r\n at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)\r\n at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)\r\n at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)\r\n at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)\r\n at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)\r\n at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)\r\n at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)\r\n at System.Activities.WorkflowApplication.EnsureInitialized()\r\n at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)\r\n at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)\r\n at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)\r\n at UiPath.Executor.RobotRunner.<>c__DisplayClass52_0.b__0()”

Install Excel package on the machine the robot is running.

1 Like

We are facing the same issue.

How is this supposed to work?
When you publish from Studio, are the packages like ExcelApplicationScope published from Studio to Orchestrator, and then synced from Orchestrator to robots?

Depending on how it is supposed to work, we are either having issues uploading these packages to Orchestrator, or Orchestrator does not sync its pacakges with Nuget/Myget.

Can you please advise?

No, they never leave the machine. That’s why you need to update/install relevant packages on each machine, as robot execution by itself only communicates to Orchestrator for the package with .xamls (at least in 2016.2 and I think 2017.1 as well).
There was a discussion somewhere on the forums that I can’t seem to find right now about where to manually (or via script) deploy packages so that robots would see them.

I’m also encountering the same error. My uiPath automation works fine in the dev environment but when I schedule to run it in orchestrator in the production server I’m encountering this error:

Process: DeliveryNotesProcessWorkflow
Environment: semco_rpa_production
Robot: SDRBTAPP02_PROD_BOT
Info: “Execution error : System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{clr-namespace:SemcoCustomActivities.Oracle;assembly=SemcoCustomActivities}OracleApiCallerActivity’.\r\n at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)\r\n at System.Xaml.XamlWriter.WriteNode(XamlReader reader)\r\n at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)\r\n at System.Activities.XamlIntegration.FuncFactory1.Evaluate()\r\n at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)\r\n at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)\r\n at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)\r\n at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)\r\n at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)\r\n at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)\r\n at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)\r\n at System.Activities.WorkflowApplication.EnsureInitialized()\r\n at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)\r\n at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)\r\n at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)\r\n at UiPath.Executor.RobotRunner.<>c__DisplayClass52_0.b__0()”
Start Time: 2018/07/12 12:00:00
End Time: 2018/07/12 12:00:14

Please help. thanks

I have this custom API on my dev server where uiPath studio is installed. While in my production server, UiRobot is the only one installed.

How will this scheduled robot run from the orchestrator in the production server without encountering this error?

Thanks in advance

Hi Guys,

I have troubled like @molf

why are we dealing with this exception ?

System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}GetOutlookMailMessages’.

server.js:155

at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)

at System.Xaml.XamlWriter.WriteNode(XamlReader reader)

at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)

at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()

at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)

at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)

at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1&amp; activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)

at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)

1 Like

Hi @hakan_kocatepe,

this has something to do with packages not having the sme versions in your studio machine and robot machine.

1 Like