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'

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

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)

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

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
2 Likes

Hi @Mateus_Cruz,
@vvaidya, @nadim.warsi, @Vivek_Arunagiri
I have deleted 10.0.3 version of Newtonsoft from all the folders you have mentioned. But, still throwing same Exception.

Thanks

What version of UiPath Studio are you using?

I’m using 2018.2.3 version.

Is it possible to upgrade to 2018.3.2? That issue was fixed in 2018.3.

1 Like

Thanks @Mateus_Cruz, its working after upgrading to 2018.3.2.

1 Like