Invoke workflow file: exception has been thrown by the target of an invocation uipath

Hi,

I am getting this error:

The error details are: 2.10.5+Branch.support-v22.10.Sha.79bc7c61a909d990afd07620b3005b3a35eb1f1b

Source: Applications\ProviderOne\ProviderOne_ValidateClientEligibility.xaml - Invoke Workflow File

Message: Exception has been thrown by the target of an invocation.

Exception Type: System.Reflection.TargetInvocationException

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.IO.FileNotFoundException: Could not load file or assembly ‘UiPath.System.Activities, Version=22.10.5.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified. at Submission#0.CreateExpression()
— End of inner exception stack trace —
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Activities.ScriptingJitCompiler.CompileExpression(ExpressionToCompile expressionToCompile) at System.Activities.JitCompilerHelper1.Compile[T](LocationReferenceEnvironment environment, Boolean isLocationReference)
at System.Activities.JitCompilerHelper1.Compile[T](CodeActivityPublicEnvironmentAccessor publicAccessor, Boolean isLocationReference) at Microsoft.VisualBasic.Activities.VisualBasicHelper.Compile[T](String expressionText, CodeActivityPublicEnvironmentAccessor publicAccessor, Boolean isLocationExpression) at Microsoft.VisualBasic.Activities.VisualBasicValue1.CacheMetadata(CodeActivityMetadata metadata)
at System.Activities.CodeActivity1.OnInternalCacheMetadataExceptResult(Boolean createEmptyBindings) at System.Activities.Activity1.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.GetActivities(Activity activity)+MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext()
at System.Linq.Enumerable.ConcatIterator1.MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Collections.Generic.HashSet1.UnionWith(IEnumerable1 other) at System.Collections.Generic.HashSet1…ctor(IEnumerable1 collection, IEqualityComparer1 comparer)
at System.Linq.Enumerable.DistinctIterator`1.ToArray()
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.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.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I have updated/downgraded UiPath.system.activities package, nothing helps

Show us the arguments (not in the Invoke but in the workflow itself). I bet you have one argument (or variable) whose default is referencing another argument or variable.

ie…

This will cause an error.

Ok that looks fine. Make sure the datatype of the variables you’ve assigned to the Invoke (when you click Import Arguments) matches the argument datatypes.

@chauhan.rachita30

Check if the values are assigned properly in invoke

And did you happen to copy this xaml from somewhere else?

Were you able to run this xaml separately?

Cheers