Hi community,
SonarCloud is throwing this error on one of our Azure DevOps pipeline
ERROR: Analysis didn't terminate normally, please verify ERROR and WARN logs above. Exit code 1
.
The problem is that there are no error or warn logs to look into, which makes debugging quite difficult.
Apparently it fails on analysing the .css and .scss files, but it doesn’t prevent SonarCloud from keeping running and analysing the rest of files (.html, .ts, etc.), which is fine because at least we get a partial analysis and the pipeline doesn’t break.
Here are some log parts related to versions, .scss files and SonarCSS plugin. I’ve shortened it for convenience but I could also post the full log if necessary:
==============================================================================
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.9.0
Author : sonarsource
Help : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
...
07:04:27.366 INFO: SonarQube Scanner 4.1.0.1829
07:04:27.366 INFO: Java 1.8.0_152 Oracle Corporation (32-bit)
07:04:27.366 INFO: Windows Server 2016 10.0 x86
...
07:04:27.803 INFO: SonarQube server 8.0.0
07:04:27.803 INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
07:04:27.803 DEBUG: Work directory: F:\agent5\_work\402\s\.scannerwork
07:04:27.803 DEBUG: Execution execute
07:04:27.975 DEBUG: SonarCloud 8.0.0.678
...
07:04:28.600 DEBUG: Plugins:
07:04:28.600 DEBUG: * SonarCSS 1.1.1.1010 (cssfamily)
07:04:28.600 DEBUG: * SonarPLSQL 3.4.1.2576 (plsql)
07:04:28.600 DEBUG: * SonarScala 1.7.0.883 (sonarscala)
07:04:28.600 DEBUG: * SonarC# 7.16.0.8981 (csharp)
07:04:28.600 DEBUG: * Vulnerability Analysis 8.0.0-M1.5391 (security)
07:04:28.600 DEBUG: * SonarJava 5.14.0.18788 (java)
07:04:28.600 DEBUG: * SonarHTML 3.2.0.2082 (web)
07:04:28.600 DEBUG: * SonarFlex 2.5.1.1831 (flex)
07:04:28.600 DEBUG: * SonarXML 2.0.1.2020 (xml)
07:04:28.600 DEBUG: * SonarTS 1.9.0.3766 (typescript)
07:04:28.600 DEBUG: * SonarVB 7.16.0.8981 (vbnet)
07:04:28.600 DEBUG: * SonarSwift 4.1.0.3087 (swift)
07:04:28.600 DEBUG: * SonarCFamily 6.3.0.11371 (cpp)
07:04:28.600 DEBUG: * SonarPython 1.15.0.4069 (python)
07:04:28.600 DEBUG: * JaCoCo 1.0.2.475 (jacoco)
07:04:28.600 DEBUG: * Mercurial 1.1.2 (scmmercurial)
07:04:28.600 DEBUG: * SonarGo 1.7.0.883 (go)
07:04:28.600 DEBUG: * SonarKotlin 1.7.0.883 (kotlin)
07:04:28.600 DEBUG: * SonarTSQL 1.4.0.3334 (tsql)
07:04:28.600 DEBUG: * SonarApex 1.7.0.883 (sonarapex)
07:04:28.600 DEBUG: * SonarJS 5.2.1.7778 (javascript)
07:04:28.600 DEBUG: * SonarRuby 1.7.0.883 (ruby)
07:04:28.600 DEBUG: * Vulnerability Rules for C# 8.0.0-M1.5391 (securitycsharpfrontend)
07:04:28.600 DEBUG: * Vulnerability Rules for Java 8.0.0-M1.5391 (securityjavafrontend)
07:04:28.600 DEBUG: * License for SonarLint 8.0.0.678 (license)
07:04:28.600 DEBUG: * SonarCOBOL 4.4.0.3403 (cobol)
07:04:28.600 DEBUG: * Git 1.10.0.1786 (scmgit)
07:04:28.600 DEBUG: * SonarPHP 3.2.0.4868 (php)
07:04:28.600 DEBUG: * SonarABAP 3.8.0.2034 (abap)
07:04:28.600 DEBUG: * Vulnerability Rules for PHP 8.0.0-M1.5391 (securityphpfrontend)
...
07:04:38.180 DEBUG: 'src\app\app-routing.module.ts' indexed with language 'ts'
07:04:38.180 DEBUG: 'src\app\app.component.html' indexed with language 'web'
07:04:38.180 DEBUG: 'src/app/app.component.scss' generated metadata with charset 'windows-1252'
07:04:38.180 DEBUG: 'src\app\app.component.scss' indexed with language 'css'
07:04:38.196 DEBUG: 'src\app\app.component.ts' indexed with language 'ts'
07:04:38.196 DEBUG: 'src\app\app.module.ts' indexed with language 'ts'
...
07:04:39.102 INFO: Quality profile for css: Sonar way
...
07:04:41.227 DEBUG: Sensors : SonarCSS Metrics -> SonarCSS Rules -> JavaXmlSensor -> HTML -> XML Sensor -> SonarTS -> JaCoCo XML Report Importer -> SonarJS -> ESLint-based SonarJS -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor
07:04:41.227 INFO: Sensor SonarCSS Metrics [cssfamily]
07:04:42.634 INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=1407ms
07:04:42.634 INFO: Sensor SonarCSS Rules [cssfamily]
07:04:42.634 DEBUG: Deploying bundle to F:\agent5\_work\402\s\.scannerwork
07:04:56.499 DEBUG: Using default Node.js executable: 'node'.
07:04:56.499 DEBUG: Checking Node.js version
07:04:56.516 DEBUG: Launching command [node, -v]
07:04:56.547 DEBUG: Using Node.js v10.16.0.
07:04:56.547 DEBUG: Starting process: node F:\agent5\_work\402\s\.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint F:\agent5\_work\402\s\**\*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc} --config F:\agent5\_work\402\s\.scannerwork\css-bundle\stylelintconfig.json -f json
07:04:56.547 DEBUG: Launching command [node, F:\agent5\_work\402\s\.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint, F:\agent5\_work\402\s\**\*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}, --config, F:\agent5\_work\402\s\.scannerwork\css-bundle\stylelintconfig.json, -f, json]
##[error]07:04:59.840 ERROR: Analysis didn't terminate normally, please verify ERROR and WARN logs above. Exit code 1
##[debug]Processed: ##vso[task.logissue type=error;]07:04:59.840 ERROR: Analysis didn't terminate normally, please verify ERROR and WARN logs above. Exit code 1
07:04:59.840 ERROR: Analysis didn't terminate normally, please verify ERROR and WARN logs above. Exit code 1
07:04:59.840 INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=17206ms
...
Can someone throw some light on why is this happening and how can I solve it?
Thanks in advance.