Error while capturing image "Object Reference Not Set To An Instance Of An Object"

I have written a flow where the automation captures certain part of a webpage and saves it as an image.

This I have saved as a custom .nupkg files and with few changes I keep running in scheduled intervals using RDS.

The problem is, this runs for the first time and later keeps giving error “Object Reference Not Set To An Instance Of An Object”.

Unsure why this happens: I tried troubleshooting using with few points which are applicable and can be done in my use case: Save Screenshot: Object Reference Not Set To An Instance Of An Object]]

But does not resolve. Any suggestions or alternate ways if anyone could suggest?

1 Like

Hi @girishankar09

Object reference not set to an object error will occur when the values are didn’t properly passed to the specific variables. And in some cases, if we haven’t initialized the variables to the output of some activities.

When we are sharing the project or .nupkg file. We will get this error.

This was the common error check the passing of values and Variables in the workflow.

You can find it easily by debugging the process then it will stop the process at the specified activity which is throwing error. In that activity check the varibale passing.

Hope it helps!!

Thanks @mkankatala
So I am running this on Remote Desktop/Workspace. So when I close this, it should ideally run on backend (which works on my other projects/workflows related to my bowse). Only this screenshot activity gives issues.

Any suggestion or option to solve this?

1 Like

Can you send your code? That might help us figure out what would be the problem.

Okay @girishankar09 then check the take screenshot activity output variable is created or not.

Or comment out that activity and run for one time if it run successfully then we have to reinitialize the activity and pass the proper variable to it.

Hope you understand!!


Before running instead of close try to logout and then run the process from orchestrator and check…looks like some issue with not properly closing