Solving object reference not set to an instance of an object

I have a bot that works on my computer (where I created the bot), but does not run on a different computer. The bot stops at the same point and the error message is

Object reference not set to an instance of an object.

at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Any ideas of what this could be? From the code, it appears that the bot is stopping during an If activity. Also, no activity was stated in the error message.

Hi @nia321 ,

That error occurs when the variable you are trying to work with hasn’t been Initialized, i.e., memory hasn’t been allocated to it.

It usually happens for Arrays, Lists, DataTables etc, so could you check which variable you are working with, and if it has been initialized?

e.g. of initialization ,If its a DataTable → New System.Data.DataTable()

Kind Regards,
Ashwin A.K

2 Likes

HI @nia321

Check whether all the variables are returning values

Regards
Gokul

Hi @nia321

In addition to above post Check whether any duplicated variables is there by seeing in the variable pane!

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.