I integrated CI analysis for my project and it lead to this error: Last Analysis Failed - Analysis ID “dbf9a020-27a3-4fc5-a2f7-4e3fba3ee4ff”
Analysis: CI Analysis
Language: Javascript/Typescript
CI: Github
I integrated CI analysis for my project and it lead to this error: Last Analysis Failed - Analysis ID “dbf9a020-27a3-4fc5-a2f7-4e3fba3ee4ff”
Analysis: CI Analysis
Language: Javascript/Typescript
CI: Github
Hi,
Welcome to the community!
Can you give the approximate date/time of the error? It will make it easier for us to find in the logs.
Thx,
Ann
It says 1 day ago. I didn’t have the actual timestamp.
I’m trying to upload code coverage but it’s not working.
Hi,
To include coverage in your analysis, you’ll need to switch from automatic analysis to CI-based analysis.
Ann
I followed everything as per the documentation. But still I could not see anything related to code coverage. The percentage is 0.0
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: Analysing [/github/workspace/./coverage/lcov.info]
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=39ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics is restricted to changed files only
INFO: Sensor CSS Metrics [javascript] (done) | time=3ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: Sensor IaC Docker Sensor is restricted to changed files only
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=60ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=4ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=1ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=2ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: Available processors: 2
INFO: Using 2 threads for analysis.
INFO: The property "sonar.tests" is not set. To improve the analysis accuracy, we categorize a file as a test file if any of the following is true:
* The filename starts with "test"
* The filename contains "test." or "tests."
* Any directory in the file path is named: "doc", "docs", "test" or "tests"
* Any directory in the file path has a name ending in "test" or "tests"
INFO: Using git CLI to retrieve untracked files
WARN: Analyzing only language associated files, make sure to run the analysis inside a git repository to make use of inclusions specified via "sonar.text.inclusions"
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=531ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399, S6547, S6549
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.002
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.003
INFO: No UCFGs have been included for analysis.
INFO: java security sensor: Time spent was 00:00:00.015
INFO: java security sensor: Begin: 2024-08-01T09:57:31.883761612Z, End: 2024-08-01T09:57:31.899604447Z, Duration: 00:00:00.015
Load type hierarchy and UCFGs: Begin: 2024-08-01T09:57:31.885789371Z, End: 2024-08-01T09:57:31.889643576Z, Duration: 00:00:00.003
Load type hierarchy: Begin: 2024-08-01T09:57:31.885859655Z, End: 2024-08-01T09:57:31.888526098Z, Duration: 00:00:00.002
Load UCFGs: Begin: 2024-08-01T09:57:31.888876779Z, End: 2024-08-01T09:57:31.888950285Z, Duration: 00:00:00.000
INFO: java security sensor peak memory: 154 MB
INFO: Sensor JavaSecuritySensor [security] (done) | time=20ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6639, S6641
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/ucfg2/cs
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.001
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.002
INFO: No UCFGs have been included for analysis.
INFO: csharp security sensor: Time spent was 00:00:00.004
INFO: csharp security sensor: Begin: 2024-08-01T09:57:31.903540024Z, End: 2024-08-01T09:57:31.907830332Z, Duration: 00:00:00.004
Load type hierarchy and UCFGs: Begin: 2024-08-01T09:57:31.904067388Z, End: 2024-08-01T09:57:31.906658848Z, Duration: 00:00:00.002
Load type hierarchy: Begin: 2024-08-01T09:57:31.904104993Z, End: 2024-08-01T09:57:31.905765253Z, Duration: 00:00:00.001
Load UCFGs: Begin: 2024-08-01T09:57:31.905949272Z, End: 2024-08-01T09:57:31.906022494Z, Duration: 00:00:00.000
INFO: csharp security sensor peak memory: 154 MB
INFO: Sensor CSharpSecuritySensor [security] (done) | time=5ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.001
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.063
INFO: Run SCC (Tarjan) on 4699 nodes: Starting
INFO: Run SCC (Tarjan) on 4699 nodes: Time spent was 00:00:00.013
INFO: Tarjan found 4699 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.017
INFO: Variable Type Analysis #1: Time spent was 00:00:00.097
INFO: Variable Type Analysis #2: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.042
INFO: Run SCC (Tarjan) on 4699 nodes: Starting
INFO: Run SCC (Tarjan) on 4699 nodes: Time spent was 00:00:00.005
INFO: Tarjan found 4699 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.008
INFO: Variable Type Analysis #2: Time spent was 00:00:00.057
INFO: Create runtime call graph: Time spent was 00:00:00.159
INFO: Load config: Starting
INFO: Load config: Time spent was 00:00:00.067
INFO: Compute entry points: Starting
INFO: Compute entry points: Time spent was 00:00:00.400
INFO: All rules entry points : 168
INFO: Slice call graph: Starting
INFO: Slice call graph: Time spent was 00:00:00.000
INFO: Live variable analysis: Starting
INFO: Live variable analysis: Time spent was 00:00:00.142
INFO: Taint analysis for js: Starting
INFO: 0 / 677 UCFGs simulated, memory usage: 89 MB
INFO: 174 / 677 UCFGs simulated, memory usage: 116 MB
INFO: Taint analysis for js: Time spent was 00:00:01.412
INFO: Report issues: Starting
INFO: Report issues: Time spent was 00:00:00.002
INFO: Store cache: Starting
INFO: Store cache: Time spent was 00:00:00.001
INFO: js security sensor: Time spent was 00:00:02.718
INFO: js security sensor: Begin: 2024-08-01T09:57:31.921709652Z, End: 2024-08-01T09:57:34.639923903Z, Duration: 00:00:02.718
Load type hierarchy and UCFGs: Begin: 2024-08-01T09:57:31.922237705Z, End: 2024-08-01T09:57:32.447065465Z, Duration: 00:00:00.524
Load type hierarchy: Begin: 2024-08-01T09:57:31.922276693Z, End: 2024-08-01T09:57:31.925789890Z, Duration: 00:00:00.003
Load UCFGs: Begin: 2024-08-01T09:57:31.926119464Z, End: 2024-08-01T09:57:32.446631687Z, Duration: 00:00:00.520
Check cache: Begin: 2024-08-01T09:57:32.447334307Z, End: 2024-08-01T09:57:32.452172711Z, Duration: 00:00:00.004
Load cache: Begin: 2024-08-01T09:57:32.447404780Z, End: 2024-08-01T09:57:32.449721814Z, Duration: 00:00:00.002
Compare cache: Begin: 2024-08-01T09:57:32.450267206Z, End: 2024-08-01T09:57:32.451972703Z, Duration: 00:00:00.001
Create runtime call graph: Begin: 2024-08-01T09:57:32.452307818Z, End: 2024-08-01T09:57:32.611978461Z, Duration: 00:00:00.159
Variable Type Analysis #1: Begin: 2024-08-01T09:57:32.453041009Z, End: 2024-08-01T09:57:32.550271461Z, Duration: 00:00:00.097
Create runtime type propagation graph: Begin: 2024-08-01T09:57:32.453997143Z, End: 2024-08-01T09:57:32.517752750Z, Duration: 00:00:00.063
Run SCC (Tarjan) on 4699 nodes: Begin: 2024-08-01T09:57:32.518669083Z, End: 2024-08-01T09:57:32.532045246Z, Duration: 00:00:00.013
Propagate runtime types to strongly connected components: Begin: 2024-08-01T09:57:32.532555461Z, End: 2024-08-01T09:57:32.550100231Z, Duration: 00:00:00.017
Variable Type Analysis #2: Begin: 2024-08-01T09:57:32.552410753Z, End: 2024-08-01T09:57:32.609956935Z, Duration: 00:00:00.057
Create runtime type propagation graph: Begin: 2024-08-01T09:57:32.552480194Z, End: 2024-08-01T09:57:32.594983102Z, Duration: 00:00:00.042
Run SCC (Tarjan) on 4699 nodes: Begin: 2024-08-01T09:57:32.595265167Z, End: 2024-08-01T09:57:32.600894958Z, Duration: 00:00:00.005
Propagate runtime types to strongly connected components: Begin: 2024-08-01T09:57:32.601112056Z, End: 2024-08-01T09:57:32.609802604Z, Duration: 00:00:00.008
Load config: Begin: 2024-08-01T09:57:32.612118139Z, End: 2024-08-01T09:57:32.679387102Z, Duration: 00:00:00.067
Compute entry points: Begin: 2024-08-01T09:57:32.679562665Z, End: 2024-08-01T09:57:33.079954285Z, Duration: 00:00:00.400
Slice call graph: Begin: 2024-08-01T09:57:33.080192890Z, End: 2024-08-01T09:57:33.080210780Z, Duration: 00:00:00.000
Live variable analysis: Begin: 2024-08-01T09:57:33.080247069Z, End: 2024-08-01T09:57:33.222395266Z, Duration: 00:00:00.142
Taint analysis for js: Begin: 2024-08-01T09:57:33.222770818Z, End: 2024-08-01T09:57:34.635071623Z, Duration: 00:00:01.412
Report issues: Begin: 2024-08-01T09:57:34.635176835Z, End: 2024-08-01T09:57:34.637678904Z, Duration: 00:00:00.002
Store cache: Begin: 2024-08-01T09:57:34.637792384Z, End: 2024-08-01T09:57:34.639014981Z, Duration: 00:00:00.001
INFO: js security sensor peak memory: 209 MB
INFO: Sensor JsSecuritySensor [security] (done) | time=2724ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=6ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 1 source file to be analyzed
INFO: SCM Publisher 1/1 source file have been analyzed (done) | time=44ms
INFO: CPD Executor 47 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 120 files
INFO: CPD Executor CPD calculation finished (done) | time=40ms
INFO: SCM writing changed lines
INFO: SCM writing changed lines (done) | time=28ms
INFO: Analysis report generated in 158ms, dir size=271 KB
INFO: Analysis report compressed in 76ms, zip size=111 KB
INFO: Analysis report uploaded in 111ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=project_name&pullRequest=126
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AZENX5rm0ij9Qhf80t2_
INFO: Time spent writing ucfgs 69ms
INFO: Analysis total time: 24.409 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 27.692s
INFO: Final Memory: 82M/237M
INFO: ------------------------------------------------------------------------
Hi,
So you’re saying that analysis succeeded on the CI side and you got the failure message in your title on the server side?
Ann
Ann, yes you’re right.
This log is from CI/CD and it was successful. But I could not see any code coverage report in the sonarcloud.
Hi,
So… the failed analysis id in your title: what does that relate to?
Thx,
Ann
This is the analysis ID I can see in my project in my long-lived branch. I can’t see anything else other than this ID.
What parameters are mandatory for CI analysis?
Hi,
The docs on the SonarScanner for NPM or the SonarScanner CLI, plus the coverage docs should help.
Ann
Hello Ann,
Like I previously mentioned, I did follow everything from your documentation.
I also tried sonar-scanner in my local and tried debugging the same. It was successful. But I didn’t see the coverage report.
I tried every recommendation in your coverage docs and as last hope raised this ticket.
Hi,
Can you provide the analysis parameters you use, as well as the full analysis log, redacted as necessary, starting from the analysis command itself?
Thx,
Ann