Error when using "Deserialize JSON Array" activity to read array from .json file

I created a JSON Array file.

It does not matter if the file is of this Structure: [ … { … } …] or this one { … [ … ] …}.

When the process runs there I always get this error message:

Message: The following errors were encountered while processing the workflow tree:
‘StartBackup’: The private implementation of activity ‘1: StartBackup’ has the following validation error: Compiler error(s) encountered processing expression “configTEST”.
Der Wert vom Typ “Newtonsoft.Json.Linq.JArray” kann nicht in “Newtonsoft.Json.Linq.JArray” konvertiert werden. Der Typenkonflikt könnte auf das Mischen eines Dateiverweises auf “C:\Users\decurmos.nuget\packages\newtonsoft.json\12.0.3-beta1\lib\net45\Newtonsoft.Json.dll” in Projekt “vbhost” mit einem Dateiverweis auf “C:\Users\decurmos\AppData\Local\UiPath\app-19.8.0\Newtonsoft.Json.dll” in Projekt “vbhost” zurückzuführen sein. Wenn die beiden Assemblys identisch sind, ersetzen Sie die beiden Verweise durch Verweise vom gleichen Speicherort.

Exception Type: System.Activities.InvalidWorkflowException

RemoteException wrapping System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
‘StartBackup’: The private implementation of activity ‘1: StartBackup’ has the following validation error: Compiler error(s) encountered processing expression “configTEST”.
Der Wert vom Typ “Newtonsoft.Json.Linq.JArray” kann nicht in “Newtonsoft.Json.Linq.JArray” konvertiert werden. Der Typenkonflikt könnte auf das Mischen eines Dateiverweises auf “C:\Users\decurmos.nuget\packages\newtonsoft.json\12.0.3-beta1\lib\net45\Newtonsoft.Json.dll” in Projekt “vbhost” mit einem Dateiverweis auf “C:\Users\decurmos\AppData\Local\UiPath\app-19.8.0\Newtonsoft.Json.dll” in Projekt “vbhost” zurückzuführen sein. Wenn die beiden Assemblys identisch sind, ersetzen Sie die beiden Verweise durch Verweise vom gleichen Speicherort.

at System.Activities.Validation.ActivityValidationServices.ThrowIfViolationsExist(IList1 validationErrors, ExceptionReason reason) at System.Activities.WorkflowInspectionServices.<GetActivities>d__3.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext()
at System.Linq.Enumerable.d__591.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__641.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 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__76.MoveNext()

I hope the workflow itself is not valid @kwoxer

Please check there are some error warnings inside the workflow which you need to clear first to execute the workflow :slight_smile:

Actually I cleaned up the used Packages and deleted some like JSON.net and Nancy.Serialization.JsonNet. Now I can run the activity again. Issue solved.

Maybe someone can additionally tell me why there is an error when using multiple Json packages? That’s sounds like a strange behaviour to me.

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