How to fix oject reference not set to an instance of an object issue?

I got Main Sequence: Object reference not set to an instance of an object error but i cant able to find why and where this error occured. can anyone help me fix this quickly as im running out of my time.

Waiting for the help

Can you provide a screenshot of the activity that is throwing that error? Plus the properties of that activity?


i got this error immediatly i run my workflow

Hmm, can you show me the arguments?


there is nothing in the arguments

And in your variables?
And does that LocalCredentials asset exist?

Hi @Prabhakaran_Elango

Pls debug your code step by step and track the error. Might be some variable or get asset having null values. or use try catch.

Happy Automation

@Prabhakaran_Elango

It’s due to some variable you are using is null. Debug thoroughly and monitor the variables from Locals panel to see which variable you are using is null, that will be your root cause.

Hi @Prabhakaran_Elango ,

This type of error mostly occurs when working with the Reference Type variables/data structures such as list and dictionaries. They need to be initialized first before working with them. So please ensure if you are using any list or dictionary variable then initialize it first.

It means you have a variable that is no initialized or not populated. Look at the variables in the activity that’s faulting. Do you know how to use debug?

@Prabhakaran_Elango

  1. Show the variables panel..looks like you are assigning something in the variables panel to one of the variable which might be creating an issue
  2. If 1 is not the case then mostly its a corrupted xaml ..try to copy only the activities into a different workflow

point 1 is the most possible case…point 2 comes into picture only if no argument or variable is being assigned with anything in the data manager panel

cheers