Cannot delete/remove a Robot in Orchestrator

Issue deleting/removing a Robot in Orchestrator , receiving an error "An error has occurred " when pressing 'Remove' option in the "Robots" tab

Resolution:

1. Make sure the user is logged in as administrator else the user has Delete permissions on robots. Check for user permissions in the “User->Roles->Edit”
image.png

2. Please remove all the filters from the job search page and check if there is any job still in pending status on this robot. If so, kill the job and try to delete the robot. Robots can only be deleted if they do not have pending or active jobs attached to them. Deleting a Robot also removes it from all associations it may be part of (environments, assets, processes, schedules):
image.png

3. Make sure no running/pending/terminating jobs and schedules are associated with it.


4. Disconnect and reconnect the robot to Orchestrator again - The possibility is that a job is hung in the robot machine. For additional information refer here.

5. Check if the Uipath Robot service is running with the below configuration:
  1. Robot service should be running under Local System Account.
  2. If it is not under the Local System Account then change the logon account to the Local System Account.
  3. Restart Robot service from Windows Services
  4. Follow the below approach:
    • Disconnect the Robot from Orchestrator. Quit the Robot from the tray.
    • Open Uipath Robot service As an Administrator.
    • Restart the Robot Service (RUN-> Services.msc -> UiPath Robot -> Restart)
    • Delete the Robot from the Orchestrator.
    • Provision again the Robot in Orchestrator, pass the required credential details.
eeeee.png

6. If the above approach does not help, try to delete the robot using "API DELETE - /OData/Robots({Id}) Robots.Delete". For reference, please check here .

7. If nothing helped, use the following query to find the terminating job:
select * from [dbo].[Jobs] where State = 3
  • Once the job is found, update the status, NOT DELETE (Before updating anything in the database, make sure to backup the database):
UPDATE [xxxxxx].[dbo].[Jobs] SET[xxxxxx].[dbo].[Jobs].[State]='5' where [xxxxxx].[dbo].[Jobs].[Id]='xxxx
  • Note: 5 is the code of 'Success', status to 4--> 'Faulted' or 6 --> Stopped