CAST HIGHLIGHT - CLI - Error code 4 - Command Line analysis error

While running analysis with CLI the  error (4) Command Line analysis error which is error code 4 is seen.

at com.castsoftware.highlight.CommandLine.run(CommandLine.java:530)
at com.castsoftware.highlight.HighlightAutomation.main(HighlightAutomation.java:16)
2023-08-21 16:29:24,463 ERROR console: (4) Command Line analysis error

 

Action Plan

Check if the following errors are also seen.

  1. Check if there is an error related to checking size:                                                                                     2023-08-21 15:16:38,715 INFO perl: out: ERROR when checking size: D:/share/CAST/App/CD/ .  These error is seen when the path/file name combination is too long. The workaround is to make sure that the Analyze directory path is not more than 255 characters. Please refer CAST HIGHLIGHT - CLI - Command line agent scan is failing when file path is more than 255 characters with an "ERROR when checking size file doesn't exist"
  2. Check if there are Generated code errors:                                                         Lib::GeneratedCodeException
    As per the getting started guide (https://doc.casthighlight.com/Getting-Started-Guide.pdf), Generated code (e.g. *.t.ds, *.flow.js) should be excluded as they are automatically produced by the system. The development team can't really manage software health of this aspect of the code. Please refer CAST HIGHLIGHT - Discovery Step - Additional files that should be excluded or included in the analysis
  3. Check if there are Encoding errors  
    2023-02-01 00:20:49,563 INFO perl: out: UTF-8 "\xF3" does not map to Unicode at perl/FileList.pm line 68, line 16.                                                                                                                              Having the source code in UTF-8 encoding is a pre-requisite. Every file in the analysis should have an encoding readable by Highlight. Please refer CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/FileList.pm line xx
  4. Check in the logs whether the same working directory is reused for concurrent scans.  If running concurrent scans, then the working directory should be unique for each scan.
  5. While running analysis on a PHP file if you get the error perl: out: PARSE error : unterminated PHP section started at line 1 !!! then please refer  CAST HIGHLIGHT - Analysis - PHP - perl: out: PARSE error : unterminated PHP section started at line 1 !!!
  6. Use the latest version of the CLI. As the platform evolves (new features, new API endpoints, etc.) are added, the command line also uses some of these functionalities. 
  7. If there is analysis Error - java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 0, the issue occurs when multiple scans are run in parallel. Run the scans one by one.
  8. If in the log the error AnalysisPipeline: Analysis failed java.lang.Exception: Analysis child process failed with exit status 137 is seen.
        1. Check in the HL automation log if any particular file is creating the problem and check if by excluding the file the analysis proceeds.
  9. If the analysis fails while parsing yarn.lock file then take a small part of code and include all the yarn.lock files to see where it fails by trying with the exclusion, starting from the last file. Once  the correct yarn.lock file is identified  exclude it in the main analysis and proceed.                                    INFO perl: out: [framework] yarn.lock : I:\chat\yarn.lock
    INFO perl: out: * Parsing I:\chat\yarn.lock
    ERROR AnalysisPipeline: Analysis failed
    java.lang.Exception: Analysis child process failed with exit status 255
    at com.castsoftware.highlight.HighlightAutomation.main(HighlightAutomation.java:16)
    ERROR console: (4) Command Line analysis error  

  10. If the issue is still not resolved to get a workaround please raise an incident ticket to support and provide the below details. - HLAutomation.log, OS and the JVM version

     

Related Articles

CAST HIGHLIGHT - CLI - Error Codes

CAST HIGHLIGHT - CLI - Error code 3 - Command Line techno discovery error

CAST HIGHLIGHT - CLI - Error code 4 - Command Line analysis error

CAST HIGHLIGHT - CLI - Error code 5 - Command Line result upload error

CAST HIGHLIGHT - CLI - Error code 6 - Command Line source dir or output dir validation error

CAST HIGHLIGHT - CLI - Error code 9 - Command Line unziping jars or zip 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 - 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 - CLI - Analysis child process failed with exit status 1

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

Highlight Automated Code Scan (Command Line)

 

Tickets

43171, 42824. 43170, 42821, 42490, 25191, 41805, 42221, 44443, 47057

Have more questions? Submit a request

Comments

Powered by Zendesk