OCR Method Failed To Scrape This UI Element

Post upgrading UIA to 20.10 or higher, why is Screen Scraping > OCR mode not working? When using OCR , why does the error: "OCR method failed to scrape this UI Element" come up ?

Issue Description: When scraping the screen with OCR following error is thrown: "OCR method failed to scrape this UI Element"

Check the [respective_date]_VisionHost.log file, there could be similar error logs:

ERROR] [UiPath.Studio.Launcher.exe] [1] Error performing OCR: System.ComponentModel.Win32Exception (0x80004005): This program is blocked by group policy. For more information, contact your system administrator


Root Cause: This issue occurs when UiPath.Vision.Host.exe is missing in the package location or is not running in background due to it not being whitelisted.

Resolution:

  1. Screen scrape and validate if UiPath.Vision.Host.exe is seen in Task Manager as shown in below screenshot,

  1. If the above .exe is not running during screen scraping, try to identify the UiPath.vision package version under UiPath.UiAutomation.Activities Package dependencies as shown below.

  1. Try to identify the package in .nuget folder, for example, for UIA version 22.4.7, UiPath.Vision version is 3.3.0 and the UiPath.Vision.Host.exe is present at the below location.
  • C:\Users\{user_id}\.nuget\packages\uipath.vision\3.3.0\build\net461
  1. Try to whitelist the above folder to allow UiPath.Vision.Host.exe to run.