ADO Extension broken

I think this problem has returned in 5.18.

We are also seeing this error starting yesterday around 3PM EST and nothing has changed in our environment. Fresh install of Sonarqube CE 9.9.3 LTS did not make a difference.

ERROR: Error during SonarScanner execution
ERROR: Validation of project failed: To use the property "sonar.branch.name" and analyze branches, Developer Edition or above is required.

Hi @bper19 & @GamIstAr,

I’ve moved your posts to a new thread so we can get clarity on exactly how it’s broken for you.

We did release a new version of the extension, and we’re actively working on a fix here:

Can you give details on what wrong behavior you’re seeing or whether this PR^ looks like it will fix your problem?

 
Thx,
Ann

Our repositories are hosted within ADO, and the main branch is always default. So it seems the scanner is looking for branches under main that don’t exist or the main branch isn’t being treated as the default.

Hi,

What’s the name of your main branch?

And could you provide a debug log (Run the pipeline with Diagnostics)?

 
Thx,
Ann

Hello, all of our main branches are called MAIN.

I’m not sure what to update in the ADO Pipelines to produce a debug log for you.

1 Like

Hello @GamIstAr ,

In order to get Diagnostic logs, you can run a specific pipeline by navigating to it in the UI, you have a big blue button named “Run pipeline” top right of the screen,

Then, you can select the branch you want the pipeline to run on, and tick the checkbox at the bottom named “Enable system diagnostics”. This will show all the debug logs that we need to understand and reproduce your issue for each task

Hope this helps

1 Like

Hello again,

We just released 5.18.2, could you please let us know if it fixed your issue @GamIstAr @bper19 ?

Even if it did, your debug logs would be helpful for us to understand the issue, as we will likely revert this patch (5.18.2) when we release the next major version.

2 Likes

Benjamin,

5.18.12 fixed the issue! Thank you very much. I’m a newbie to Sonarqube (and ADO) and learned a LOT today because of this problem. I didn’t realize we pull in your scanner as part of the ADO extension. I thought our on-prem sonarqube server fed the scanner back into the pipeline when it hit that task.

I’ll work on getting you the Debug Logs. I have it dumped successfully w/ your instructions (thank you again), but need to get approval before sending along.

3 Likes

5.18.2 fixed our issue as well.

More info on error encountered in 5.18.0:

SonarQube Community Edition 8.6.1
Source Control: ADO TFVC so no default branch.

Sonar-scanner-vsts 5.18 error (Run Code Analysis phase):

##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]ERROR: Validation of project reactor failed:
o To use the property “sonar.branch.name” and analyze branches, Developer Edition or above is required. See Branch analysis for more information.
ERROR:
ERROR: Validation of project reactor failed:
o To use the property “sonar.branch.name” and analyze branches, Developer Edition or above is required. See Branch analysis for more information.
ERROR:
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error](redacted timestamp) Post-processing failed. Exit code: 1
(redacted timestamp) Post-processing failed. Exit code: 1
##[error]The process ‘(redacted agent loc)\SonarQubePrepare_(redacted GUID)\5.18.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1

3 Likes

Hi @bper19,

Thanks for confirmation of the fix!

I need to point out to you that your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.6.1 → 8.9.10 → 9.9.3 → 10.3 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

 
Ann

@benjamin.raymond what’s the best way to get this debug log over to you?

Hello @GamIstAr , I sent you a PM, thanks!