Cannot create unknown type Error when Bot is triggered

Hello,

I am seeing below error , while trying to deploy automation in both attended and unattended

RemoteException wrapping System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}UnknownType)’.
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.WorkflowInspectionServices.d__3.MoveNext()
at System.Linq.Enumerable.d__172.MoveNext() at System.Linq.Enumerable.<ConcatIterator>d__591.MoveNext()
at System.Linq.Enumerable.d__172.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
at System.Linq.Enumerable.d__641.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at UiPath.Executor.Tracking.TrackingHelpers.GetVariableNames(Activity activity)
at UiPath.Executor.Tracking.TrackingHelpers.TrackVariables(TrackingProfile profile, WorkflowInfo workflowInfo)
at UiPath.Executor.Tracking.DebugTrackingParticipant.RegisterWorkflow(WorkflowInfo workflowInfo)
at UiPath.Executor.DebuggerPlugin.UiPath.Executor.IDebuggerPlugin.RegisterWorkflowTracking(WorkflowInfo workflowInfo)
at UiPath.Executor.Tracking.WorkflowTracking.RegisterWorkflowTracking(WorkflowInfo workflowInfo)
at UiPath.Executor.WorkflowRuntime.RegisterWorkflow(WorkflowInfo workflowInfo)
at UiPath.Executor.RobotRunner.InitWorkflowApplication()
at UiPath.Executor.RobotRunner.d__88.MoveNext()

Hi @ram977,

Could you check if the packages are installed correctly on the machine where the automation is deployed?

Kind regards,
Robert

Hi @ram977 and Welcome to the forum
This is either caused by a missing package or a mismatch in the version of packages.
Can you check the packages under C:\Program Files (x86)\UiPath\Studio\Packages or C:\Users\X.nuget\packages and see if you have same thing in your local/studio machine? Try to copy paste the packages and see if that resolve the problem?

1 Like

Hello @ram977,

If above is not working for you, could you tell us how the packages are installed on the machine where the automation is deployed?

Thanks!
Robert

Hi @ram977,

What you can do, is copy the packages folder to a backup folder and delete all packages in the original folder, after this you can open your main.xaml (if studio is installed on it) or run the automation, it should download all packages you need.

If you get errors, you can try to repair the dependencies (if you have studio on the machine).

Kind regards,
Robert