# Cannot create unknown type Error when Bot is triggered

**URL:** <https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899>\
**Category:** Studio\
**Tags:** activities-panel, question, studio\
**Created:** [October 17, 2022, 8:54pm UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899 "2022-10-17T20:54:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram977](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ram977/32/264115_2.png) [@ram977](https://forum.uipath.com/u/ram977)\
**Post date:** [October 17, 2022, 8:54pm UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899/1 "2022-10-17T20:54:38Z")

</div>

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](http://schemas.microsoft.com/netfx/2009/xaml/activities)}Variable({[http://schemas.uipath.com/workflow/activities](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.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, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)  
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)  
at System.Activities.WorkflowInspectionServices.d\_\_3.MoveNext()  
at System.Linq.Enumerable.d\_\_17`2.MoveNext() at System.Linq.Enumerable.<ConcatIterator>d__59`1.MoveNext()  
at System.Linq.Enumerable.d\_\_17`2.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()  
at System.Linq.Enumerable.d\_\_64`1.MoveNext() at System.Linq.Buffer`1…ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 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()

---

<div class="post-metadata">

**Author:** ![Robert\_Lansbergen](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/robert_lansbergen/32/221365_2.png) [@Robert\_Lansbergen](https://forum.uipath.com/u/Robert_Lansbergen)\
**Post date:** [October 17, 2022, 9:22pm UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899/2 "2022-10-17T21:22:33Z")

</div>

Hi @ram977,

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

Kind regards,  
Robert

---

<div class="post-metadata">

**Author:** ![Emira](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/emira/32/373652_2.png) [@Emira](https://forum.uipath.com/u/Emira)\
**Post date:** [October 17, 2022, 9:53pm UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899/4 "2022-10-17T21:53:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Robert\_Lansbergen](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/robert_lansbergen/32/221365_2.png) [@Robert\_Lansbergen](https://forum.uipath.com/u/Robert_Lansbergen)\
**Post date:** [October 17, 2022, 10:08pm UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899/5 "2022-10-17T22:08:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Lansbergen](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/robert_lansbergen/32/221365_2.png) [@Robert\_Lansbergen](https://forum.uipath.com/u/Robert_Lansbergen)\
**Post date:** [October 18, 2022, 7:25am UTC](https://forum.uipath.com/t/cannot-create-unknown-type-error-when-bot-is-triggered/481899/7 "2022-10-18T07:25:57Z")

</div>

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
