Job faulted after processing few items successfully with faulted message :Job stopped with an unexpected exit code: 0x40010004 System.Exception: Job stopped with an unexpected exit code: 0x40010004

Hi All,

Bot faulted twice with above message.

Please find the event logs for the above issue.

UiPath.Service.Host 22.10.7.0
UiPathRobotServices 9831149 IAttendedService GetProcessByKey 4. # System.InvalidOperationException: Could not log in user to Orchestrator.
at UiPath.Service.UserServiceManagerExtensions.GetSession(UserServiceManager manager, UserIdentity user)
at UiPath.Service.AttendedService.GetProcessByKey(String processKey, Message message, CancellationToken ct)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Helpers.Timeout[TResult](TimeSpan timeout, List1 cancellationTokens, Func2 func, String message, Func`2 exceptionHandler)

@Pavan_Mamadapur,

Follow this solution.

@Pavan_Mamadapur

Check the network connection whether it is stabled or not. it was failed after processing few items that can be the issue from network side.
ANd try to go through below thread

Hi @Pavan_Mamadapur

This error signifies a forceful termination of the process. Most likely a forceful system restart from backend either due to urgent security update or something else might have happened around the same time thus killing your process right away.

Please check system and application logs in event viewer on the machine where this process was running.

Please check around the same time when this error happened that will shed more lights into the matter.