Command prompt issue: System.ArgumentException: 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'

database
issue
webservice

#1

Continuing the discussion from 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':

i tried the method suggested in the above method but the solution only works when the “Newtonsoft.Json.10.0.3” is deleted and the execution is done from the Uipath studio.
But if i try to run the same script using command prompt… the error does not seem to go away.
Please help.
@asher.yu


#2

Hi, I have the same error. I’ve tried all the fixes described on the forum (deleting Newtonsoft from %LocalAppData%\Temp\nuget, using packages from another computer) but can’t seem to get it working.

I’ve attached a simple workflow that causes the error. It seems to be specific to my machine. Other machines with the same version of UiPath and same activities are able to run it fine. However, after re-installing and restarting I am unable to fix the error. Any help would be greatly appreciated!jsonTest.xaml (9.0 KB)


#3

Same issue here. Surprisingly it is okay on upgraded machines but it fails on fresh install one.
Any hint?


#4

Check if you have the 10.0.3 version of Newtonsoft in folders other than %localappdata%\Temp, for example:

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