CAST HIGHLIGHT - Results Upload - CLI - Scan is failing with error code 5

When trying to run the command line it is failing with (5) Command Line result upload error.

Action Plan

  1. The error code 5  - Command-Line result upload error" is usually seen with the permission issues with User ID / Password.
      1.  Check whether  --login , --password and –-serverUrl are entered correctly.
      2.  Check whether the user has changed the password for the login to HL whether the user was able to login and upload results previously.
      3. Check whether the account is locked.
  2. Check whether there is any proxy involved. If proxy is there user needs to pass the proxy parameters to the command line so that it can reach Highlight server through the proxy. An example can be found in the Command Line readme. Below is the sample command line with proxy 

    Special configuration for proxy server
    Using a proxy server for upload.

    Proxy with no password :
    -Dhttps.proxyHost=<your proxy host>
    -Dhttps.proxyPort=<your proxy port>

    If a password is requested for proxy add the following additional parameter

    java -Dhttps.proxyHost=your proxy host -Dhttps.proxyPort=your proxy port -Dhttps.proxyUser=user -Dhttps.proxyPassword=password -jar HighlightAutomation.jar --workingDir "C:\highlight-myproject" --sourceDir "C:\myproject\src" --login xxx --password xxxx


  3. Confirm whether the TLS version used is supported by Highlight. Check in the logs for messages like Remote host terminated the handshake                              Check the log, to find out the TLS version used 
                        "ClientHello": {
      "client version"      : "TLSv1.2",
    "supported_versions (43)": {
          "versions": [TLSv1.3]
        },                                                                                                                                                      Configure Jenkins to use the TLS version used by Highlight or edit the command to correct the TLS version used. To find out the TLS version used by Highlight
        1. Open highlight URL in chrome browser and open developer tools.
        2. Go to security tab and in connection details we can determine the version of TLS that is being used.
        3. Match the TLS format in command line and check if upload works.
  4. Check if there are any errors such as  UTF-8 "\xE7" does not map to Unicode at perl/ line XX and/or ERROR highlight: No header can be extracted to patch framework files (if all the code is not properly encoded) related to encoding which was not readable by Highlight. Please refer CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/ line xx
  5. If NoAnalysis messages are seen in logs it means there are no results hence upload has failed. 
      1. Check if there is a post the analysis completion. If yes, please try to upload it manually for that application.
      2. Check whether code is not accessible due to some permission issues. 
  6. Use the latest version of the CLI. As the platform evolves (new features, new api endpoints, etc.), the command line also uses some of these functionalities. 



Related Articles


CAST HIGHLIGHT - CLI - Command Line analysis error

CAST HIGHLIGHT - CLI - Docker - Results Upload - Upload failed with code 5 when using Docker

CAST HIGHLIGHT - CLI - ERROR: Failed to fetch company with id when using  --basicAuth

CAST HIGHLIGHT - CLI - Analysis - Code analysis failed with error code 3 which is Command Line techno discovery error

CAST HIGHLIGHT - CLI - Scan fails for an application with an error Failed to fetch company with id XXXSTDERR

CAST HIGHLIGHT - CLI - ERROR Failed to upload submission for application result id='XXXXXX' with company [name='XXX',id='XXXX'] and application [name='XXX',id=XXXXX] message: 400 highlight.server.client.campaignApplication.update.NoAnalysis

CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/ line xx

Highlight Automated Code Scan (Command Line)



29229, 37307, 36849, 40904

Have more questions? Submit a request


Powered by Zendesk