Deserialize Json - Holding the UiPath in execution mode

Hi All,

I just ran into this problem today after implementing a robot that has this Deserialize Json activity, after the robot finishes the project execution, it keeps in the execution mode, so I need to manually click on “Stop” button. After I click it I get the following message:

An error has occured

Message: Value cannot be null.
Parameter name: value

Source: Newtonsoft.Json

Exception Type: ArgumentNullException

System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at UiPath.Shared.JsonParser.DeserializeObject[T](String jsonValue)
   at UiPath.Models.UiPathDuplexProxy.<>c__DisplayClass21_0.<OnJobCompleted>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

I tried to restart the UiPath Studio but the problem is still happening.

In my robot, I use the activity “Read text file” to read a Json file, and after that I deserialize it with “Deserialize json” activity. Everything goes fine as I can get the values from the json object output and log it on the screen, the problem is that instead of finishing the execution mode, the robot gets somehow stuck.

Hope anyone can help me. If you need more information, please let me know.

Thanks and regards,

Bruno Costa

1 Like

Hi all,

I just found out that the problem was with an ‘Assign’ activity and I really don’t know why this happens. I was executing only one of the workflows of the project (not the main), and by the end of this workflow there is this ‘Assign’ activity that just attributes a DataTable variable to a DataTable argument (out direction).
Therefore this has nothing to do with the ‘Deserialize json’ activity in spite of the message says that the source is ‘Newtonsoft.Json’. Btw, I know we should only assign “Out” arguments if the workflow is being invoked by other workflow, but sometimes we may want to test a unique workflow without running the Main, so it would be nice if you could handle this problem.

If this is not clear, please just reply this.

Thanks and regards,

Bruno Costa.


This was a great insight.
I wasn’t aware of this behaviour. Thanks.

1 Like

We’ve faced similar issues with Out arguments, but only with DataTables of significant size - all other scenarios didn’t pose any issues, so I’m not sure if this is related to Out argument directly. There seems to be instabilities when dealing with serialized DataTables in general (and/or with arguments of significant size).


1 Like