Error finding image in virtual machine

Hello.

The robot performs actions in a virtual machine. Often an error appears that the image was not found (UIpath.Core.Activities.ActivityTimeOutException, Activity: Find Image). But this image is displayed on the virtual machine screen.
In the previous run, the robot worked without errors. I set different values of “Accuracy”: 0.8 0.6 0.5. It does not help.

Tell me, please: What is the problem? How to make image search more reliable in a virtual machine?

Is it being run and failing when you are watching it run, or is this only failing as unattended?

If you are watching it and it is failing, then it could be challenging to solve without actually looking at it directly. But, I would say ensure the images are on the screen and you are looking in an element that contains that image (if you leave selector blank, it may take longer to find the image too so make sure TimeoutMS is long enough). I’m not quite sure what the problem would be in this scenario.

However, if this problem is occurring while running unattended where you don’t watch it, there could be a difference in resolution and color depth, which could also fluctuate between different operating systems. In this scenario, I would suggest changing the Robot settings for resolution to match what the environment where you developed the Find Image. You can do this by editing the Robot in Orchestrator. Generally, you would use 1920 w 1080 h 32 depth.

Regards.

1 Like

Thank you very much! Robot is failing when I’m watching it.

This is a good idea. Probably, the robot doesn’t have time to find the picture in the default TimeoutMS. There are a lot of text and small details on the virtual machine screen. Does the robot find a larger picture faster than a small one?

The resolution on the development machine and on the virtual machine is the same, but it isn’t 1920 w 1080 h.

@ClaytonM - I had same issue before i was automating image activities and running the process in unattended mode. you mention like there is difference with resolution and color depth. then how can we resolve this issue. I am not using Orchestrator but triggering the process using job scheduler. There is any solution to resolve this problem ?

Use Take Screenshot and Save Image in places where there are problems. This will show what the screen looks like when unattended and identify issues where the window is the wrong size or any popup messages that might be getting in the way. But, you say it fails in attended too, then I’m not sure and you might just need an adjustment to your properties.

No it’s working in attended mode and not working when it is unattended that means trigger through task scheduler.

If it works in attended and not working in unattended, then it must be a window size or popup issue. Try this suggestion to see more of what it is doing:

Typically, it will be a good idea to run unattended in the same resolution which you develop in. If you use Orchestrator, you can change this in the Robot settings. For Task Scheduler, you would need to change this in the UiPath.settings file which is in the C:\ProgramData\UiPath folder, assuming that hasn’t changed in newer versions. Resolution is usually 1920 w 1080 h 32 depth.

Let us know if that helps. And, like I said, taking a screenshot will help show you what it is actually doing.

Regards.