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?
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.
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.
Thank you so much
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?
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?
@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.
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.