Newtonsoft.Json Error after upgrade to 2018


#1

We have UiPath enterprise version recently upgraded from version 2016.2 to 2018.
We also use custom activity using Google APIs which requires newtonsoft.json 10.0.2 version.

Activity “Deserialize json” which was working fine before the upgrade is not working now.

image

System error at initialization: Method ‘Newtonsoft.Json.Linq.JToken get_Item(System.String)’ declared on type ‘Newtonsoft.Json.Linq.JObject’ cannot be called with instance of type ‘Newtonsoft.Json.Linq.JObject’

From a solution provided in another forum question, I deleted the newtonsoft.json 8.0.3 version from the folder “…AppData\Local\Temp\nuget”

It is working fine when I run from studio but erroring when running from orchestrator.

I will not be able to uninstall 10.0.2 version since the Google APIs are dependent on it.
Any help appreciated.


#2

Hi,
Any updates on the above problem, i face the same issue. The script is running fine from UiPath but has the same issue when it runs from Command Prompt. @asher.yu @Amrita_Mogali


#3

The issue is since few UiPath activities has the dependency on 8.0.3 version of Newtonsoft.json, it gets downloaded from the gallery feed when the Job is executed.


#4

Hi,
In my case it was cause by conflict with BalaReva.Externals.Activities - this package contains newtonsoft.json in version 10.0.2 which cause this error.
Cheers,
J0ska


#5

Hi I am also facing this issue .please suggest


#6

how you solved it?


#7

Hi,
I simply deleted the newtonsoft.json.dll from BalaReva.Externals.Activities package in all places where it appears.
I use just Unzip activity from the whole package and this works fine. I did not test the other activities in the package so I do not know the impact (if will work with newtonsoft.json version 8.0.3).

Cheers,
J0ska