Use Process Monitor (ProcMon) to Troubleshoot Issues Related to UiPath Processes

How to use Process Monitor( ProcMon) to troubleshoot issues related to UiPath Processes?


Introduction: Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process / thread activity.

It captures events for processes and threads (where a process is started, a thread starts or exits, how processes are interacting with other processes, etc.)

In order to spy/inject data into different applications the driver component uses multiple Dynamic-link libraries (or DLL), both proprietary and belonging to the OS, which store the necessary code for multiple technologies.

Missing proprietary DLLs, unregistered system DLLs or lack of access due to system restrictions can cause multiple issues with some of the symptoms below:

  • UiExplorer fails to launch
  • In UiExplorer, selectors cannot be retrieved for some elements, or all elements.
  • CLSID Registry errors when trying to inspect elements in specific applications, or execute workflows using selectors in those applications
  • Executing a workflow on a specific machine after a Windows Update throws unable to find selector errors.

In order to troubleshoot these issues the following information is necessary:

  1. Process Monitor log of the issue

The missing / unregistered DLLs along with the file-path where the UiExplorer tries to locate them will be visible in Process Monitor

At the same time various processes are created and terminated or interact with UiPath processes.
This process interaction can generate some of the issues below where Process Monitor can aid in the investigation:

  • Unexpected application crashes
  • Files missing or being blocked
  • Execution Slowness
  • Processes terminating abruptly


Download Process Monitor from here .


How to Use Process Monitor

Example of a captured log

image.png



Menu Item description

Process Monitory toolbar by-the-numbers

  1. Open File - Used to Open Log Files
  2. Save File - Saves Log Files
  3. Capture - Toggles log capturing On/Off
  4. Autoscroll - Stops the auto-scrolling of logs
  5. Clear - Clears the current log
  6. Filter - Opens up the currently existing filters.
    These can be built either in the filters or by right clicking the column and element that need to be filtered in the list. For example to filter out all events from a PID 9925 one would click the value 9925 in the column PID and select Exclude '9925'
  7. Highlight - Opens up the Highlight menu for the current highlights.
    Similarly it one can highlight specific elements in the same manner as filtering.
  8. Include Process from Window - Automatically isolates and creates filters only for the targeted process. Requires click and drag.
  9. Show Process Tree - Display the unfiltered process tree along with timelines.
    One can use it to view how processes were spawned and killed in chronological order. This can be very useful in case of
  10. Event Properties - Access the properties of a highlighted event
  11. Find - can be used to search the process list columns
  12. Jump to object - browses for the object.
    For example if selecting a registry event this will open Regedit to the exact registry key used. Same goes for files/folders etc.
  13. Show Registry Activity - Toggles On/Off the visualization of Registry Activity
  14. Show File System Activity - Toggles On/Off the visualization of System Activity
  15. Show Network Activity - Toggles On/Off the visualization of Network Activity
  16. Show Process and Thread Activity - Toggles On/Off the visualization of Process and Thread Activity
  17. Show Profiling Events- Toggles On/Off the visualization of Process Profiling Activity


How to Capture Process Monitor Logs
  1. Open the Target Application. For example we want to troubleshoot a UiExplorer error
  2. From the Process Monitor menu use the Include Process From Window (8) and make sure the Registry (13), Filesystem (14) and Process and Thread (16) activity is monitored
  3. Stop the Capture (3)
  4. Clear the log (5)
  5. Start the Capture (3)
  6. Replicate the issue
  7. Stop the Capture (3)
  8. Press Save (2) and choose the options below. When adding it to a Jira make sure to mention the timestamp.
    image.png
    This will generate all the events and one can filter them afterwards.


How to Interpret & Use Process Monitor Logs: The Procmon file can be analyzed ad-hoc by opening it up in Procmon. Here is possible to toggle filters to isolate just the target application.
The logs can get pretty large pretty fast so it is essential to work swiftly and try to close as much as the noise as possible during replication.


Example

Issue: When starting UiExplorer and indicating a specific element the following error appears,

image.png

Steps to troubleshoot:

  1. Open Process Explorer
  2. Open UiExplorer and target it.
  3. Start the Capture and replicate
  4. Stop the Capture
  5. UiExplorer is trying to find a specific component registered in the registry with the CLSID {F497F7BF-B0C1-415B-8AFE-31484878AE5F}.
    Driver components are not registered because they're kept upto date constantly through the .nuget feed, so we rely on a manifest to find the specific libraries we use.
    Only system components use actual registry keys (like oleacc32.dll) and these need to be in the registry.
    The first assumption would be a file is missing.
  6. Filter the whole log by Result NAME NOT FOUND and Show File System Activity (13)
  7. It appears UiEventHook.dll is not in the folder and so is OLEACC.dll
    As OLEACC.dll is a system library our dependency mechanism will resolve the path from the registry.
  8. Click the UiEventHook.dll path and use Jump To (11)
    In this scenario the file was accidentally deleted. The solution here is to simply to delete the activity package and reinstall it.
  9. OLEACC.dll however is a system dll, so in this case the path should be resolved via the registry. Remove all filters by going to Filters → Reset and search for OLEACC.dll

Note: When troubleshooting, it may also be ideal to capture the UiExplorer verbose logs in DebugView.

How to register the DLLs that are not loaded: Create an elevated command prompt and run below command

  • regsvr32.exe xxx.dll

Known Issues