I am trying to switch my unattended bot from a User account to a Service account. But getting the above error when I am trying to run the bot via Assistant. Are there any possible restrictions we face on a Service account? Any kind of help is appreciated and please let me know if any additional information is needed.
Note: The same Bot works fine on a User account.
**Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}GenericValue)'.**
System.Xaml.XamlObjectWriterException: Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}GenericValue)'. 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.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.d__120.MoveNext()
Thanks for responding. Yes, I did try this method but it didn’t work for me. The same bot is working fine on the user account but failing on the service account.
Do we need to set up some special rights for the service account to run an unattended bot?
Error “The request cannot be completed. You do not have permission for this action.” usually indicates that you don’t have the rights or permissions to perform a particular action (im a cap yeah). In your case, you are trying to switch your bot to a service account, and perhaps the service account does not have the appropriate permissions to run the bot.
Thank you @Nessundorma for your response. Even I was suspicious about the Service account permissions.
But could you please tell me how did you conclude that it’s an issue of permission? I mean it’s not there in the output message that’s why I am curious to know.
Did you change your installation mode when switiching to service account. Typically user account requires per user installation and service account requires installation in service mode. If your installation is under c:\Users\[username]\AppData\Local\Programs\UiPath
then its under user mode. Install it as service mode.
If this is already done, you can check the following link.