Hello,
I have my project inside a try catch. When an exception is throw I would like my bot to take a screen shot and then email that screen shot to my email address. I currently have the screen shot being saved to the projects relative path. When I run locally though studio my results are as expected and everything works. When I run my project on a VM through orchestrator or the robot tray I get the following error:
“Save image : Object reference not set to an instance of an object.”
Using Studio version 2018.1.2 stable and orchestrator version 2017.1.6547
Steps to reproduce:
Take a screen shot
Save image to relative path
run the following on a VM through orchestrator or robot tray
So my question is the following: Can I save an image to a relative path when running on a VM through orchestrator and if so, how?
Hi @vvaidya
Thanks for the response! You are correct it was an issue with the Take Screenshot. It appears the boomImage variable was never being created.
I had to use log message since I only have robot on the VM.
In the logs I get the correct path for my project: "C:\ProgramData\UiPath\Projects(ProjectName.Number.)\lib\net45 "
After a few hours of head scratching I was finally able to figure out the issue. I was logging into the VM with the same credentials the robot was using to force an error (to test the screen shot email). The robot must have been getting confused when saving the image since there were 2 users logged in with the same credentials (the robot and myself).