In_Config ERROR Assign: Object reference not set to an instance of an object. IN INITALLAPPLICATION

In_Config ERROR Assign: Object reference not set to an instance of an object. IN INITALLAPPLICATION

Hi @krishnapriya_Anu

The message “object reference not set to an instance of an object” means that you are referring to an object the does not exist or was deleted or cleaned up .

Once check your config file variable whether it is present or not
in_Config(“MailAccount”).ToString

@krishnapriya_Anu

First it would be a good idea to check if you config variable is havign data or not

see if the config is being passed inside

May be in the invoke workflow activity it is no linked or in initallsettings only it might not be linked as well

cheers

Hi @krishnapriya_Anu

Check once that you pass the “MailAccount” name in config file and make sure that you have assigned a value to it.

yeah
in the Config file it’s present

@krishnapriya_Anu

Once check the in_Config argument correctly passing or not in Invoke workflow file activity

image

Can you tell me How to resolve this error:

@krishnapriya_Anu

Once check “MailAccount” name in config file and make sure it match small space also it reflects.
Please show config file variables

@krishnapriya_Anu

Try running the code in debug mode and remove the breakpoint before running the program.
when the program stops it execution with an error send me that particular activity with the logs

Regards,

@krishnapriya_Anu

Send failed activity also
In which activity it exactly stops and throw an error

How to check
the failed Activity

Do debug the code from the Main.xaml then the bot will stop at that activity where the error find, took a screenshot and send me.
With that send me the output panel screenshot too. @krishnapriya_Anu

Hi @krishnapriya_Anu

Did you change the config file path?

No, i don’t Change that

@krishnapriya_Anu

The bot is not reading the config file in your process. That’s why you got that error.
Check once the if condition in init block
image

@krishnapriya_Anu

  1. Are you running this xaml separately?

If yes then it wont run…please run from main.xaml

  1. If running from main and even then in_Config is null then check if the config is linked in the invoke workflow file activities or not

Cheers

@krishnapriya_Anu

So as anil said did you run the process from main .xaml?