Not able to publish agent Deployment exists in a failed or running state

Not able to publish agent

Issue Description

Error encountered when attempting to publish an agent after configuring mandatory fields.

Error message:

"Solution publish failed with AutomationSolutionsException: Message='Request failed with status BadRequest: {"title": "One or more validation errors occurred.","status":400,"errors":{"packageVersionKey":[{"message": "Deployment exists in a failed or running state."}]}}"

Root Cause

The issue occurs because the agent cannot be published when an existing deployment associated with the package is in a failed or running state. This leads to validation errors preventing successful publishing.

Resolution

Navigate to the respective solutions folder within the personal workspace or assigned folder.

    • Go to the Solutions tab and access the Deployments section.
    • Locate the deployment associated with the package name displaying the error.

Validate the current state of the deployment:

    • Verify if the deployment is in a failed or running state.
    • Identify the reason for failure or running state.

Perform necessary actions:

    • Retry the deployment if it failed due to an interrupt or non-critical error.
    • Uninstall the deployment if retrying does not work or is not applicable.

Remove the old deployment:

    • Clear the deployment marked with a failed, faulted, or running state.
    • Ensure there are no residual deployments in the folder before republishing the agent.

Republish the agent:

    • After addressing the failed or faulted deployment, republish the agent.
    • Confirm that the publishing process completes successfully.

If the issue persists, raise a UiPath support ticket and include HAR traces collected.