Take Screenshot Error | Outlook Error


I am getting an error in Take Screenshot activity - “Object reference not set to an instance of an object”. I am not using any selector as I want to take screenshot of the whole screen and it used to work fine before but after the Studio got updated to v2019.10.2, I am facing this issue. Can anyone help with this?

Also, after the update, I am getting error in “Get Outlook Mail Messages” activity when I run the process from the Orchestrator (The operation has timed out). When I run the same process from the Studio, it works fine. What can be the reason for this?



Welcome back to the community!

Issue #1:
It should not happen like that, check if you are passing some folder to place the screenshot, whether that path is exist or not in the new environment. Or else try by replace the activity from the latest version.

Issue #2:
If you are running the process with a new Robot ID, then check the permission for that robot to read the mails from that mail box.

Hi Sarathi,
Thank you so much :slight_smile:
Regarding Issue #1, it’s actually the Save Image activity issue. I am saving the screenshot (the output of Take Screenshot activity) but it’s giving “Object reference not set to an instance of an object” error. I tried replacing the activity but it’s not helping.
Issue #2: I guess the issue was the Outlook was not open, maybe that’s why it wasn’t able to send/get mail messages. I don’t know why that never occurred before. Anyway, can you please tell me how to check for the permissions?

Welcome back to UiPath community
For screenshot issue,
Hope this could add some insights to manage them

And for outlook issue
Kindly increase the TimeOut property with a value more than the default value of 30000 milliseconds

And also ensure that the Trust center settings in Outlook Option is configured with all permissions
And if not try with GET EXCHANGE MAIL activity
as it would work for sure

Cheers @vasundhara.sharma

@Palaniyappan @sarathi125
It seems like whenever I am running process from the Orchestrator, the Bot is not able to perform any UI based interactions. That’s why it is not able to take screenshot, not able to open Outlook (I am opening Outlook in safe mode by entering profile name). Do you guys have any idea what can be the reason?

Is it a Citrix based environment where we are running this process

@Palaniyappan No, it’s not. The Bot is installed on the same environment. :confused:

@vasundhara.sharma is “Object Reference not set to …” error still occurring, when executing in Studio? Or is it only when run thru Robot?

If error is persisting even when running thru studio, than “Object Reference not set to …” error could be cause of a declared variable having null value at the time of activity like “SaveAs”. Cause this error can not be root cause of not using “Selector” (in case of screenshot, saves as) or Studio Version upgrade. So, I feel if you could double check any such variable in debug mode having null value being used at the time of exception.

See attached, for reference tried to recreate your Object Reference error while SaveAs iamge.

Hi @keshar1288,
I am not getting this error when I am running the process from Studio. It only occurs when I run from the Orchestrator. It’s very confusing why this is happening.

Well @vasundhara.sharma I have not set this up to run with Robot yet! But can think that, if your workflow is set up with REFramework, having config in Data folder. Then check if you have given DownloadFolder location in SaveAs for image location to be saved, after screen shot.

And if that’s there, than even I need to explore on how Orchestrator be told/passed-info/parm about the location to save image after executing the package thru Agent or Manually.

The error was resolved by installing the Bot in the “Service Mode” and setting LoginToConsole as False. Previously, the Bot was installed in User Mode that’s why it was not able to perform UI based interactions.

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