Need Help : UiPath.Core.Activities : 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'

Hi Everyone,

I use httppost to get the result ,then deserialize the result,in the past everything is ok
but when I upgraded the 2018.2.3 , I met this exception,二维码识别: UiPath.Core.Activities : 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’

when I try to deserialize the result to variable(JsonResult) ,and write the line:

Please see the picture as below:

WeChat%20Screenshot_20180623150409

1 Like

The exception happen in the line (JsonResult(“msg”)).tostring ,I don’t know why, I run the bot in last version, everything is ok

I found the solution …go to %localappdata\Temp\nuget% and check if you have two folders/versions of Newtonsoft.Json? For example it could be one with 8.0.3 and one with 10.0.3. Remove the one with 10.0.3(you can copy it in some other place) and check again. …it worked

3 Likes

Hi,

Im encounter the same problem and each time im restarting my device and want to run the workflow then this error will occur again.

What should i do?

Thanks

Regards

Delf

Hi,I met this,too. I just use the delete activity to delete this.




ttbush

邮箱:ttbush@163.com

签名由 网易邮箱大师 定制

hi @asher.yu

Can you elaborate which file or something that you delete using delete activity?

Thanks

Best Regards

Delf

Hi @asher.yu I’m having the same problem … I tried what you said but that folder appears every time when I run my workflow …

well reading in other kind of similar issues, I just copy all the folder activities from another machine where still is working ok, and now is working ok.

老哥你找到这个文件了吗

hey @asher.yu

i only have one version e.g (Newtonsoft.Json.8.0.3) stil getting the same error. Suggest some solution

regards

1 Like

Other than %localappdata%\Temp, try to see if you have the 10.0.3 version of Newtonsoft in other places, like:

  • C:\Program Files (x86)\UiPath\Studio\Packages
  • %localappdata%\UiPath\Activities
  • %localappdata%\NuGet\Cache
  • Folders of other custom activities that you downloaded or created