test-suite
2022.10
false
UiPath logo, featuring letters U and I in white

Test Suite User Guide

Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Aug 13, 2024

Troubleshooting Jenkins Plugin

If you run into installation or upgrade issues, consider the following troubleshooting scenarios.

Issue related to cached legacy uipcli version

Platform: CloudBees

Description: The issue involves CloudBees software upgrade. After upgrading, the internally cached uipcli version fails to be updated, leading to a legacy uipcli remaining cached. This causes the tools folder to not be found after extraction.

Remedy:

To fix this issue, you must force install UiPath.CLI.Windows.nupkg or UiPath.CLI.nupkg . You can do this using a snippet similar to the one in the following example:
UiPathInstallPlatform(
                        cliNupkgPath: 'C:\\Users\\uipathadmin\\CLIVersions\\UiPath.CLI.Windows.23.10.8894.39673.nupkg',
                        cliVersion: 'X_23.10.8753.32995',
                        forceInstall: true,
                        traceLevel: 'Information'
                    )UiPathInstallPlatform(
                        cliNupkgPath: 'C:\\Users\\uipathadmin\\CLIVersions\\UiPath.CLI.Windows.23.10.8894.39673.nupkg',
                        cliVersion: 'X_23.10.8753.32995',
                        forceInstall: true,
                        traceLevel: 'Information'
                    )
Note that cliNupkgPath refers to the location of the cached uipcli on your agent machine.
Furthermore, in the example above, cliVersion is set to X_23.10.8753.32995 to force UiPathInstallPlatform to extract from cliNupkgPath, avoiding the extraction of a legacy version from an internal .jar file.
Lastly, ensure that your uipath-automation-package plugin version is at least 3.1 (recommendation is 3.2), and if you are extracting a windows uipcli, the agent must be a windows machine.

Unauthorized error

Description: Unauthorized error.

Remedy:

  • If you use basic authentication: make sure that the username-password combination on the web login is correct.

    If federated authentication is enabled, make sure you write the username in the task as “DOMAIN\user”

  • If you use token authentication:

    • Revoke the token from the API access panel and generate a new one.
    • Make sure that the user that generated the key can access the Orchestrator and has a user account on the Orchestrator instance.
  • If you authenticate against an on-premise Orchestrator: make sure that the Orchestrator certificate is valid and that the machine running the job trusts the Orchestrator certificate in case you are using a self-signed certificate. You might receive this error because of the certificate used for the Orchestrator not being valid. This might mean that it has the wrong CN or other validation issues.

Forbidden error

Remedy: the user doesn't have the permission to perform the action. Make sure that the user has permissions to read folders, upload packages, create and update processes, read test sets and test cases, read background tasks, and create and run test sets.

Folder/environment not found

Remedy: Make sure that the authenticated user used by CI/CD plugins has the Folders.View and BackgroundTask.View (only for 20.4) permissions.

Package already exists (Conflict)

Remedy: Make sure that the package that you are trying to deploy does not exist with the same version already. If it exists, consider using automatic package versioning, so that the new version is bumped up every time we deploy.

Failed to run the command (Generic error)

Remedy: If the Jenkins workspace is inside a location on disk (for example, C:\Windows or C:\Program Files) to which the user does not have permissions, make sure that the workspace is placed on a path that can be accessed by the user.

Jenkins fails to process paths containing non-Latin characters

Remedy: Jenkins is not able to pass correctly non-standard encoded characters when invoking the UiPath Plugin. The unknown characters will be replaced by ???.
The solution depends on how Jenkins is deployed on both the server and the agent host machines, but involves setting file.encoding to UTF-8 in Java options:
Windows

When running Jenkins on Windows as a Service: in the service configuration file add the arguments inside the tag. Follow the sample script below.

<arguments>-Xrs -Xmx512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 -jar "%BASE%\)\)jenkins.war" --httpPort=8080 --webroot="%BASE%\)\)war"</arguments><arguments>-Xrs -Xmx512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 -jar "%BASE%\)\)jenkins.war" --httpPort=8080 --webroot="%BASE%\)\)war"</arguments>
When running Jenkins inside Docker: pass the JAVA_OPTS to the container via --env JAVA_OPTS="...", following the example script below.
docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS=-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 jenkins/jenkins:ltsdocker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS=-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 jenkins/jenkins:lts
When running Jenkins inside Tomcat: use environment variable CATALINA_OPTS. Follow the example script below.
export CATALINA_OPTS="-DJENKINS_HOME=/path/to/jenkins_home/ -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 -Xmx512m"export CATALINA_OPTS="-DJENKINS_HOME=/path/to/jenkins_home/ -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF-8 -Xmx512m"
Linux
When running on Debian or Ubuntu-based Linux distributions: in the configuration file search for the argument JAVA_ARGS, and add the file encoding. Follow the example script below:
JAVA_ARGS="-Dfile.encoding=UTF-8 -Xmx512m"JAVA_ARGS="-Dfile.encoding=UTF-8 -Xmx512m"

When running on RedHat Linux-based distributions: in the configuration file search for the argument JENKINS_JAVA_OPTIONS and add the file encoding. Follow the sample script below.

JENKINS_JAVA_OPTIONS="-Dfile.encoding=UTF-8 -Xmx512m"JENKINS_JAVA_OPTIONS="-Dfile.encoding=UTF-8 -Xmx512m"

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.