Job Stopped With An Unexpected Exit Code: 0x40010004 - KB

Why does the job fault with the message "Job-stopped-with-an-unexpected-exit-code-0x40010004" ?

On the theoretical side it could be due to many reasons, since TerminateProcess has an exit code parameter. Practically it could have happened due to a failure in the target application itself. If UiPath is trying to access any application and the application itself is failing, in that case UiPath will not be able to interact with the application and the issue might occur.

Apart from this, the same error may be encountered but with different code if the executor or robot.exe was killed or terminated while the job was running.

Scenario #1: Below are the scenarios in which the issue may occur:

  1. User was logged off: If the job is still running and user was logged off manually, the job will be faulted with same error code.
  2. System Shutdown: If the system experienced a restart or shutdown while the job was running.

Scenario #2: This error generally occurs when there a drop of the WCF communication channel between executor and service due to exceeded WCF message size.

If the workflow is exchanging messages larger than the noted value (e.g., logs, arguments, assets, excel) then a workaround is to increase the maxReceivedMessageSize in the config file mentioned in the documentation.
11.png
  1. Update the highlighted value to i.e. maxReceivedMessageSize attribute to 2147483647
  2. Restart Robot Service.
12.png

3 Likes