Azure DevOps pipeline SonarCSS ERROR: Analysis didn't terminate normally, please verify ERROR and WARN logs above. Exit code 1

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](
07:04:27.366 INFO: SonarQube Scanner
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
07:04:28.600 DEBUG: Plugins:
07:04:28.600 DEBUG:   * SonarCSS (cssfamily)
07:04:28.600 DEBUG:   * SonarPLSQL (plsql)
07:04:28.600 DEBUG:   * SonarScala (sonarscala)
07:04:28.600 DEBUG:   * SonarC# (csharp)
07:04:28.600 DEBUG:   * Vulnerability Analysis 8.0.0-M1.5391 (security)
07:04:28.600 DEBUG:   * SonarJava (java)
07:04:28.600 DEBUG:   * SonarHTML (web)
07:04:28.600 DEBUG:   * SonarFlex (flex)
07:04:28.600 DEBUG:   * SonarXML (xml)
07:04:28.600 DEBUG:   * SonarTS (typescript)
07:04:28.600 DEBUG:   * SonarVB (vbnet)
07:04:28.600 DEBUG:   * SonarSwift (swift)
07:04:28.600 DEBUG:   * SonarCFamily (cpp)
07:04:28.600 DEBUG:   * SonarPython (python)
07:04:28.600 DEBUG:   * JaCoCo (jacoco)
07:04:28.600 DEBUG:   * Mercurial 1.1.2 (scmmercurial)
07:04:28.600 DEBUG:   * SonarGo (go)
07:04:28.600 DEBUG:   * SonarKotlin (kotlin)
07:04:28.600 DEBUG:   * SonarTSQL (tsql)
07:04:28.600 DEBUG:   * SonarApex (sonarapex)
07:04:28.600 DEBUG:   * SonarJS (javascript)
07:04:28.600 DEBUG:   * SonarRuby (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 (license)
07:04:28.600 DEBUG:   * SonarCOBOL (cobol)
07:04:28.600 DEBUG:   * Git (scmgit)
07:04:28.600 DEBUG:   * SonarPHP (php)
07:04:28.600 DEBUG:   * SonarABAP (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.


Is there a possibility for you to try run this 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”

directly from a commandline tool, and see if you get more logs ?

Thank you.


Running the command directly from the CLI on our pipeline is quite tricky but actually I had enabled all debugging options on it, what gives all kind or warnings and errors back from the CLI, and there was nothing else besides the aforementioned error.

Additionally, if I run locally Stylelint 9.2.1 over Node 10.16.0 with the same stylelintconfig.json and same source files I get no errors but the report correctly.

Thanks again.

I mean locally and directly, not through SonarCloud, same versions. Which asserts my thought that the SonarCSS plugin might have something to do with it.

Any clue on why might this be happening?

Hi Pablo,

Could you please share your configuration file?

I just checked CSS analyzis on Azure Devops + SonarCloud and could not reproduce the issue so it might be related to the configuration.


Hi Nicolas, thanks for checking.

We don’t use a file but the manual mode. Here’s the task configuration on our pipeline YAML file (I’ve removed the sensitive data):

- task: SonarCloudPrepare@1
  displayName: 'SonarCloud: Prepare analysis'
    SonarCloud: '' //removed
    organization: '' //removed
    scannerMode: 'CLI'
    configMode: 'manual'
    cliProjectKey: '' //removed
    cliProjectName: '' //removed
    cliSources: 'src'
    extraProperties: |

Let me know if there’s any additional info I can provide.

Heads up on this, I’ve run Stylelint from .scannerwork directly on the pipeline and it exits with code 2, which means that the linter has ran properly and found linting errors

Here the command I’ve used: node ./.scannerwork/css-bundle/node_modules/stylelint/bin/stylelint \"./src/**/*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}\" --config ./.scannerwork/css-bundle/stylelintconfig.json -f json

Does this info help? This is becoming really frustrating and I’m thinking of running Stylelint directly on the pipeline, generate the report and let SonarCloud read that report, but how could I disable the CSS linting on SonarCloud side so I don’t get that annoying error anymore?

Any help will be much appreciated.

Hi @p.lopetegi,

Sorry for the long delay.
Indeed it’s hard to investigate the problem as there is no logs. Currently we forward stderr of stylelint to our logs but it can print error in stdout (which is ignored in case of bad exit code). This ticket is supposed to fix this and we will see why stylelint failed.

So I suggest you to wait until we implement this fix of logging and deploy it on the SonarCloud.

In the meantime to avoid this sensor being executed you can create empty profile for CSS, when no rules are activated, stylelint is not triggered.

Hi Lena, thanks for your answer.

I found a temporary workaround for this: I created an empty profile for CSS and run Stylelint on the pipeline, then the report is uploaded to SonarCloud. It’s been running flawless for seven weeks now.
I’m looking forward to that fix, we definitely want to use the CSS plugin instead of Stylelint to keep all configurations on SonarCloud.

1 Like


FYI we deployed new version of CSS analyzer on SonarCloud

Nice, I’ll try to remove the workaround next week.

Thanks for the heads up!