- Make sure the robot is installed in Service Mode.
Note: If you cannot find the UiPath Robot service in Start → services.msc, that means you installed the robot in User Mode.
To install the robot in Service Mode via the GUI installer UiPathStudio.msi, you will need to select Custom → Install for all users on this computer → Unattended Robot
Reference: Robot - Installing the Robot
To install via command lines, you will need to adapt the example commands which mentions Robot as a Windows service.
The examples can be found here Studio - Command Line Parameters
- Add machine credentials for the robot account in the Unattended robot settings.
Run the below command in a powershell.exe console in the Robot machine and then restart the UiPath Robot service.
[Environment]::SetEnvironmentVariable("UIPATH_HEADLESS_WITH_USER", "True", "Machine")
Reference: Robot - Background Process Automation
- Make sure that your unattended robot is logged out not disconnected when you are running the job. In the Event Viewer → System → You may find event details which are telling you before the error occurs in your UI automation that your session was disconnected for various reasons.
- Try to play in the Orchestrator → Robot settings LoginToConsole set to Yes/No.
If you set the LoginToConsole set to Yes, you are using a Console session, if you set to No, you are using an RDP session.
- If you have UI interactions in your process, it shouldn’t be set as Background
Example:
If you have Ui interactions in your project, open your project in Studio → Project Settings → set the Starts in Background option to No and republish the process
Reference: Studio - Background Process
- If you have UI interactions which needs to run in background, use Window Messages, Simulate, or Chromium input methods for your activities.