Sonarcloud quality gate is throwing error


Sonarcloud scan analysis is successful, During the Sonarcloud quality gate check below error is occurred

✖ Quality Gate failed: Could not fetch quality gate status: b'{"errors":[{"msg":"Analysis with id \\u0027None\\u0027 is not found"}]}'

Attached Sonarcloud quality gate pipelines log and bitbucket-pipelines file for reference

pipelineLog-{692f5745-3de2-428f-9f1b-04ccb33f99e1}.txt (6.9 KB)

bitbucket-pipelines.txt (1.5 KB)

I am using paid plan of 1M lines in Sonarcloud

Current lines of code analysed over 15 projects is 886,412

Can someone please help me on this to resolve these errors ASAP because it is affecting all the developments & deployments



Can someone please help me on the above error ?

It is affecting the scheduled production deployments

hello @Sathyaseelan_P, Is your SonarCloud private plan is still active or you can check the Background Tasks of project…
I got the similar issue, in my case plan was not renewed because of payment failure…

Hello @sumit1

Thank you for your prompt reply

  1. Private payment plan is still active

  2. I have cross-checked the pipeline log also and there is no error in the background tasks

Any other suggestions please

I am not very sure about then. You can check Background Tasks of Project Scans, you might find something.
SonarCloud > Your Organization > Project on which you are running scan > Administration > Background Tasks
If you see any failed status then see the Error Details. If nothing is there then please wait for someone from SonarCloud to address your issues.

Thank you @sumit1 for your prompt reply :+1:

Your reply helped us to resolve the issue in short span of time.

We have cross-checked the Background tasks and we found that error was due to new code definition

Finally we have resolved the issue and now the Sonarcloud pipeline is working fine

Details about the issue we have faced

We used the web api to set specific date format in the new code definition because there is no web interface option

  1. In first API call we need to give the date format as value

  2. In second API call we need to give the text “date” as value

Note: Always the specific date format should be before current analysis of the particular branch

Issue details

Invalid new code period. ‘2023-04-18’ is not one of: integer > 0, date before current analysis j, “previous_version”, or version string that exists in the long-lived branch.
Please contact a project administrator to correct this setting

1 Like

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