PiP failing with The process was terminated due to an unhandled exception

Attended Forms automation not working in PiP.

Issue Description:

Automations deployed in Attended environments may fail when switched to PiP, generating the error message:

"The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException at UiPath.Core.Activities.WorkerProcessHelper.GetWorkerProcessPath()"

Root Cause:

The WorkerProcess .exe is a required dependency for PiP functionality. The absence of this file in the execution environment may result in an error, which indicates that the .exe path could not be found. This is most likely because the file is not located in the expected directory.

Resolution:

Ensuring that the required file is present in the expected location will resolve the issue. Possible approaches include:

  1. Restoring the entire packages folder by creating a backup of the current folder. The package is typically located at: C:\Users\{YourUser}\.nuget\packages
  2. Identifying the expected file location on another machine with the same project version.
  3. If the file is present, verifying that there are no access issues preventing it from being used.