Why am i getting If: Object reference not set to an instance of an object?

Hi All, i am getting an error message stating If: Object reference not set to an instance of an object. all my variable are fine as far as i can see, the program executes all the commands and writes the lines from excel data, once it reaches the end of execution i get the error, Any Ideas?Excel Automation INC-20191127T122113Z-001.zip (51.3 KB)

1 Like

Check to make sure the variable you are trying to call is set to an actual value. Try printing it to the console.

If you are passing value through by arguments make sure they are all passing as expected.

**** Update

I cant check your workflow.

1 Like

May i know at which activity we are ggetting the error
kindly run in debug mode so that we can find where it is getting failed
i hope it should be here in the split method
image

Cheers @Sidney_Vogel

When the error happens it highlights the If statement,how ever it does not state where the error is coming from

{
“message”: “If: Object reference not set to an instance of an object.”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “09:07:07”,
“processVersion”: “1.0.0”,
“jobId”: “49300676-f18b-41c3-9333-81fe4bfe64f4”,
“robotName”: “RNUMDMAS\VOGELS26”,
“machineId”: 0,
“fileName”: “FromExcelToWebINC”
}

Here are the log;

19.10.1+Branch.master.Sha.0e00272ff1e0363c6709284cfa5bbf8631511d70

Source: If

Message: Object reference not set to an instance of an object.

Exception Type: System.NullReferenceException

RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hi All,

I just wanted to update this post and let you know that i have found the cause of the issue, turns out that the excel file had a wrong value and caused the sequence execution to trow an error, after i removed the value which i added per accident some how the execution worked perfect, So this issue is now solved.

2 Likes

Hi Jarzzz

I just wanted to update this post and let you know that i have found the cause of the issue, turns out that the Excel file had a wrong value and caused the sequence execution to trow an error, after i removed the value which i added per accident some how the execution worked perfect, So this issue is now solved.

2 Likes

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