When using any JArray variables with the UiPath.Mail.Activities package installed, this error occurs:
Message: The invoked workflow ‘Main’ has validation errors. Please review the workflow and resolve the errors.
No obvious validation errors are flagged in the UI. However, when run in debug mode, this error presents itself:
21.2.0-beta.44+Branch.release-v21.2.0.Sha.8ede47e8688d4fa0ba0ff6103ca2fe3ca36a426f
Message: The following errors were encountered while processing the workflow tree:
‘AARreturnComparer’: The private implementation of activity ‘1: AARreturnComparer’ has the following validation error: Compiler error(s) encountered processing expression “JSONauthorArray”.
Value of type ‘Newtonsoft.Json.Linq.JArray’ cannot be converted to ‘Newtonsoft.Json.Linq.JArray’. Type mismatch could be due to mixing a file reference to ‘C:\Users\rc208.nuget\packages\newtonsoft.json\13.0.1\lib\net45\Newtonsoft.Json.dll’ in project ‘vbhost’ with a file reference to ‘C:\Users\rc208\AppData\Local\UiPath\app-21.2.0-beta0044\net461\Newtonsoft.Json.dll’ in project ‘vbhost’. If both assemblies are identical, try replacing these references so both references are from the same location.Exception Type: System.Activities.InvalidWorkflowException
RemoteException wrapping System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
‘AARreturnComparer’: The private implementation of activity ‘1: AARreturnComparer’ has the following validation error: Compiler error(s) encountered processing expression “JSONauthorArray”.
Value of type ‘Newtonsoft.Json.Linq.JArray’ cannot be converted to ‘Newtonsoft.Json.Linq.JArray’. Type mismatch could be due to mixing a file reference to ‘C:\Users\rc208.nuget\packages\newtonsoft.json\13.0.1\lib\net45\Newtonsoft.Json.dll’ in project ‘vbhost’ with a file reference to ‘C:\Users\rc208\AppData\Local\UiPath\app-21.2.0-beta0044\net461\Newtonsoft.Json.dll’ in project ‘vbhost’. If both assemblies are identical, try replacing these references so both references are from the same location.at System.Activities.Validation.ActivityValidationServices.ThrowIfViolationsExist(IList
1 validationErrors, ExceptionReason reason) at System.Activities.WorkflowInspectionServices.<GetActivities>d__3.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__17
2.MoveNext()
at System.Linq.Enumerable.d__591.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__17
2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__64
1.MoveNext()
at System.Linq.Buffer1..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__86.MoveNext()
Uninstalling UiPath.Mail.Activities resolves the issue.