##[error][SQ] Task failed with status FAILED, Error message: Quality Gate: Unable to parse value '' to compare against Security Rating on New Code (Visit of Component {key=mykey,uuid=theid,type=PROJECT} failed)

Hi

I’m using SonarSource 4.8.0 in Azure Devops an a C# project.
When using a fresh key, publishing the results works without an issue, but on every subsequent build, publishing fails near the end with following error:

##[error][SQ] Task failed with status FAILED, Error message: Quality Gate: Unable to parse value '' to compare against Security Rating on New Code (Visit of Component {key=mykey,uuid=theid,type=PROJECT} failed)

SonarQube Version: 7.9.1.27448

The error just started a few weeks ago, I believe it’s related to an update of SQ (not managed by myself)

Any idea what’s going wrong and how to fix it?

Many thanks!
Martin

Hi,

Could you please, if possible, post the full log of the failing task please ? Just to give us a bit more context.

Thank you !

Hi Mickaël

Here’s the full log of the failed task:
8_Publish Quality Gate Result.txt (33.3 KB)

Let me know if you need anything else for analysis.

Thank you,

Martin

Thanks.

Is it possible to have the ce.log file corresponding to the timeframe when the error happens please ? It appears that it’s more like an analysis issue rather than a problem with the extension.

Thanks.

Hi Mickaël

I reproduced the error in a new repository and a blank .NET WebApi project (starter):

4_Prepare analysis on SonarQube.txt (19.0 KB) 8_Run Code Analysis.txt (106.7 KB) 9_Publish Quality Gate Result.txt (19.2 KB)

First time publishing worked, second run failed with same error as described.

Thank you,

Martin

Thanks, and if it’s possible, could you please share your ce.log ? You can download it from here :

Tell me if you need me to send you a PM so you can send the log that way.

Thank you in advance.

Yes, can you please send me a PM? Thank you

After some PM with Mickaël, he found the issue and I want to share it as it may help someone else:

After updating SonarQube to the latest version, an existing custom quality gate lost it’s value and was causing that issue. After setting a value there again, everything works again now.

Yes, can you send me please a PM? Thank you!