Azure DevOps Pipeline error

We are experiencing something similar from the beginning of December 2023. The runner image (Ubuntu 22.04) and the pipelines have not changed, but suddenly SonarQubePrepare@5 started failing with the following error:

2024-01-04T07:43:24.4330037Z ##[section]Starting: Prepare SonarQube analysis
2024-01-04T07:43:24.4332948Z ==============================================================================
2024-01-04T07:43:24.4333035Z Task         : Prepare Analysis Configuration
2024-01-04T07:43:24.4333087Z Description  : Prepare SonarQube analysis configuration
2024-01-04T07:43:24.4333143Z Version      : 5.18.4
2024-01-04T07:43:24.4333179Z Author       : sonarsource
2024-01-04T07:43:24.4333232Z Help         : Version: 5.18.4. [More Information](
2024-01-04T07:43:24.4333323Z ==============================================================================
2024-01-04T07:43:24.8150812Z ##[error]Cannot read property 'format' of null
2024-01-04T07:43:24.8169394Z ##[section]Finishing: Prepare SonarQube analysis

Hey there.

Can you share how you’ve configured your Azure DevOps Pipeline? Feel free to share the YAML here.

Hi Colin.

Here is how we use the SonarQubePrepare@5 task:

  - task: SonarQubePrepare@5
    displayName: Prepare SonarQube analysis    
    condition: eq('${{ parameters.runSonarQubeAnalysis }}', true)
      SonarQube: 'ProjectNameHere-SonarQube'
      scannerMode: 'MSBuild'
      projectKey: ${{ parameters.sonarQubeProjectKey }}
      extraProperties: |


This is the line of code the issue is ultimately coming from:

If we want to get DEBUG info out of the task, try setting this in your pipeline variables (not your extraProperties block of the prepare analysis step):

system.debug = true

Thanks for the hint, Colin!

For anyone facing this: after checking the code deeper, we found out, that the issue was on SQ server side.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.