Run from Orchestrator - Cannot Create Unknown Type at System.xaml

Hi, I am running a workflow from orchestrator directly to the UiPath Robot (No Studio).

When I run the workflow from Orchestrator, it immediately stops.

Inside execution.log file I get error message:

15:32:16.3701 Fatal {"message":"System error at initialization: Cannot create unknown type '{http://schemas.uipath.com/workflow/activities}OpenBrowser'. at Source: System.Xaml","level":"Fatal","logType":"User","timeStamp":"---","fingerprint":"---","windowsIdentity":"---","machineName":"---","processName":"---","processVersion":"---","jobId":"---","robotName":"---","machineId":---,"fileName":"Main","logF_BusinessProcessName":"Framework"}

From inspecting the workflow what I gather it is that it fails at the Open Browser activity.

However, even when I add a Message Box activity right before that, the message box did not activate.

I have already uploaded the required packages to Libraries in orchestrator.

The same workflow runs fine on the Studio machine where I developed it.

What else should I do?

@DEATHFISH

After making changes did you republish / Update the package?

What was the error you are facing once you placed the message box?

Thanks

I have already republished the package. After placing the message box I get the same error. Placing the message box had no effect on the workflow and errors.

@DEATHFISH Check this Post, this might be related to your problem :

@supermanPunch
Hi, for the first fix, I tried deleting the contents of Packages folder and then redownloaded it from the Robot Tray, I still encountered the same error.

For the second fix, I tried accessing MyGet.org and NuGet.org with no problems. I have no direct access to copy libraries to the file system of the Orchestrator machine.

However, my colleagues have no issue running their workflows from Orchestrator to the bot machine.

There are several activities that ran successfully before my workflow encounters the Cannot create unknown type error at the Open Browser activity.

(such as reading config file, Get Outlook Mail Messages, Create Folder, Copy File, Excel Application Scope)

In the logs, it says the location of my error is at System.xaml but I don’t have a System.xaml file anywhere

@DEATHFISH But the Message Box did not Pop up right ? Is it because the other activities are in a different workflow and that’s why it executed the other activities ?

Main.xaml
Main.xaml > Init 1
Main.xaml > Init 2
Main.xaml > Init 3
Main.xaml > Init 4 > Login 1
Main.xaml > Init 4 > Login (Msgbox)
Main.xaml > Init 4 > Login 2 (Open browser)

All the activities that ran were part of Init in the Main.xaml file of ReFramework. I.e. Init 1, 2, 3 are successful. After these activities, also inside Init, is the Login workflow.

The Open Browser activity is inside the Login workflow (Login is Init step 4). The Message Box was right before Open Browser in the Login workflow. This indicates that the entire Login workflow did not run even if the error message was only from Open Browser.

@DEATHFISH If this is a Workflow, Can you Comment out that workflow and place a Message Box after and check, and also can you tell what are all the Activities used in that workflow.

Also Can you tell us the Studio version on which you had developed the code? Also Check the .json file of it and if possible post the Screenshot of it’s contents

@supermanPunch Ok I ran this workflow from Orchestrator

Main.xaml (8.3 KB)

seems simple enough, a message box, then Open Browser and Element Exists.

The message box did not appear at all.

Here is the error I get in Orchestrator:

Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}OpenBrowser’.

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}OpenBrowser’.
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.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.RunWorkflow() in D:\a\1\s\Robot\UiPath.Executor\RobotRunner.cs:line 301

It seems that the Open Browser and Element Exists activities come from the UiPath.Core.Activities package, and in my Orchestrator, UiPath.Core.Activities was last updated 7 months ago.

Could it be because UiPath.Core.Activities is out of date?

Also where do I find the .nupkg file for latest UiPath.Core.Activities since it is not inside my packages folder

I am using Studio version 2018.4.4 Enterprise Edition.

@DEATHFISH Ohh I think it is. Because I couldn’t find it in mine. Also I guess it is Split it into two Packages now , System.Activities and UiAutomation as the below post suggests :

Also Try updating the System.Activities and UiAutomation Packages to the Latest version and Check

@supermanPunch UiPath.System.Activities and UiPath.UIAutomation.Activities are updated to the latest version in Orchestrator Libraries and am still encountering this issue…

@DEATHFISH Do you have a .json file of it ?

This main.xaml is just a dummy process.

Here is the project.json file screenshot from the process I am actually using

@DEATHFISH Since you are using an Enterprise Edition, the Orchestrator should also be of 2018.4.4 version. In that case, the workflow used by you have the activities having a version above the Enterprise Version. Maybe there is an incompatibility with versions of your workflow. Can you downgrade all the Packages to the 18.4 version and delete unnecessary packages and just keep the System and UiAutomation Activities packages and then check the Main Workflow. This is just for testing though.

@DEATHFISH Check this Post as well :

@supermanPunch Hi, I tried testing out a dummy workflow using UiAutomation and System packages version 18.4 and it worked fine

However this is not an option for the workflow I am using because there are a lot of workflows involving package version 20.4. Downgrading to version 18.4 will cause many activities to break and I would have to redo the whole thing and this is very tedious

I tried using NewSession = True as mentioned in the other thread but I am still encountering the same error

Any suggestions on how to move forward with this forward compatibility issue?

@DEATHFISH If you do not want to downgrade the package versions, I can only think of an Ugrade for the Studio and the Orchestrator versions to the latest Stable one :sweat_smile: