Newtonsoft.Json Error after upgrade to 2018

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.

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

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.

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

1 Like

Hi I am also facing this issue .please suggest

how you solved it?

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

1 Like

I tried deleting the newtonsoft.json new version. But the issue is still there. Can anyone please suggest a solution to this?

hi @pravinraj.vincent the problem of deserializing is due to json.net package . Update it to older version like 11.0.2 it will work.

You may try simple assign activity instead of Deserialize json as described here Cannot Deserialize JSON - #2 by Jon_Smith