Cannot create unknown type - Robot Dependency Installation Issue

Hi everyone,

Our team is facing the above issue in our production environment that is causing many different processes to fail due to dependencies not being properly downloaded in the “Installing Packages” phase of the robot execution (first step of execution).

In the installation phase, the robot only seems to throw exceptions of packages that were failed to download that are direct dependencies of your project. However, when the robot tries to download a dependency of a dependency (Nuget tree) and fails, there is no exception thrown for that package in the “Installing Packages” phase.

This is causing us issues, as the robot will continue executing without that dependency of a dependency installed. Everything will go fine, until the robot reaches the activity that is dependent on the failed package and the robot will fail due to this error:

Cannot create unknown type ‘{clr-namespace:UiPath.Cryptography.Activities;assembly=UiPath.Cryptography.Activities}DecryptText’.

RemoteException wrapping System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{clr-namespace:UiPath.Cryptography.Activities;assembly=UiPath.Cryptography.Activities}DecryptText’.
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.InProcessRunner.<>c__DisplayClass6_0.g__StartWorkflow|1()
at UiPath.Executor.InProcessRunner.BeginExecute(AsyncCallback callback, Object state)
at UiPath.Core.Activities.ExecutorInvokeActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

We would like to see a product enhancement to allow the administrator/developer to specify if we would like to throw exceptions on direct dependency nugets installation failures, or all nuget installation failures directly or indirectly referenced in the project

TLDR: If any package in your nuget tree fails to download in the “Installing Packages” phase of robot execution, we want to know about in the form of an exception. Currently this is only happening for direct dependency nugets in your project, but not for dependencies of dependencies.

Not sure why you think this is what’s happening, but it most definitely throws errors if it cannot install a sub-dependency. We had this issue with the UiPath Vision package, which is a sub-package of many other things.

Hi @Ethan_Goatley,

Please let me know on what Robot version are you running your automations. This seems to be an issue that was resolved starting with Robot version 2021.6.

Thank you,
Andrei

We are currently running Robot version 20.10.7

Hi @Ethan_Goatley ,

In order to resolve this, you should update your Robot to 2021.10 release. Also, there is a possibility that the Robot will still behave the same way, even if you update it. To resolve this, you can add in project.json of the process the following property that enables the dependencies resolving.

"runtimeOptions": {
    ....
    "mustRestoreAllDependencies": true
    ....
  }

This will give you errors if the Robot cannot restore the dependencies and will not run the process if all the dependencies are not downloaded.

Best regards,
Andrei

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.