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.
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.
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
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.
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.
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
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:
- Upgrade Guide
- LTS-to-LTS Upgrade Notes for 7.9 to 8.9
- LTS to LTS release upgrade notes for 8.9 to 9.9
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!