Azure pipline publish issue

Hi All,

We seem to be running into an issue with our azure devops pipeline task that publishes the Quality gate results. We are getting the below error and it seems to be consistently happening since the beginning of the day.

##[error][SQ] API GET '/api/ce/task' failed, status code was: 404

##[error][SQ] Could not fetch task for ID 'AWdaq41jza0Kta76fCiN'

##[error][SQ] API GET '/api/ce/task' failed, status code was: 404

We did have another pipeline that was failing with the same error but after a couple of attempts that went through however the above pipeline is consistently failing.

Is there any known issues at the moment as I don’t believe we have changed anything since it stopped working?

Kind regards,


Hi Daniel,

Could you share the logs of your Azure DevOps build please? You can reach me privately if needed.
Do you also know if the environment variables SYSTEM_PULLREQUEST_SOURCECOMMITID and BUILD_SOURCEVERSION are set?


Hi Simon,

Thank you for having a look at this for me, We have had a look and cant see any references to these variables in our build definition. I will send you the logs shorty via a private message.

Kind regards,

Hi Simon,

Sorry but I don’t seem to have the ability to send you a private message , is there another way I can send you the logs privately?

Kind regards,

Hi Simon,

Sorry to have to chase you up on this but we are still having issues with our builds and it seems Sonarcloud results are not being posted back to the PR’s now either. Do you have a time-frame for when this will be resolved?

Kind Regards,

Hi @Daniel_iSams, what is the project type (.NET, Nodejs, Java, etc…) you are scanning during build?
Our SonarCloud also have some “unable to load component …” issue, while running SonarQube Scanner on a task “Run Code Analysis”.
Do you guys experienced such issue on SonarCloud?

This issue appears to be resolved for some of our builds, but one definition is still throwing the error on the Publish Quality Gate Result task:

##[error][SQ] API GET ‘/api/ce/task’ failed, status code was: 404
##[error][SQ] Could not fetch task for ID ‘AWdaq41jza0Kta76fCiN’
##[error][SQ] API GET ‘/api/ce/task’ failed, status code was: 404

Is there anything cached? Do we need to change anything our end?

Could you check if you’re in the same context than Azure DevOps "Publish Quality Gate" task fail consistently with 404 ? That could come from unexpected cached files.

Hi - We are using Azure Devops Hosted Agents. It is a fresh agent every time. There is no possibility of there being a cached file left over from previous builds.

Hi Simon,

This issue has been occurring for 4 days now, is there anything else we can check?

The error is the same every time.

All our builds have been broken for 4 days now.

What is going on? Please can someone reply.

7 days all broken. What is going on?

We are now back to having two issues:

  1. On some build definitions, the build consistently fails on the “Publish Quality Gate Result” task as outlined above.

  2. On build definitions that succeed, the PRs are not being decorated with the analysis results.

Could you please provide an update here, these issues are currently causing significant issues with our development flow.

@Daniel_iSams according to the logs I received privately, the task “Publish Quality Gate Result” reads an analysis report that was not generated by the previous task “Run Code Analysis”. That means that the file is cached between builds. A workaround is detailed in

@gregpakes your problem seems to be different as you guarantee that build cache is disabled. Could you please send me your logs privately? Thanks.

@brett.postin indeed mentions that the analysis report is not overridden when the build definition is changed. Please see the workaround described on the ticket. Thanks.

@simon.brandhof Just to clarify, the people on this thread are all developers from iSAMS experiencing the same blocking issues.

All of our build definitions are using Azure Devops hosted agents. At present we have been forced to disable sonarcloud for definitions experiencing issue #1 outlined above. To workaround issue #2 we have been forced to make the sonarcloud PR branch policy optional.

Both workaround are leaving us in an undesirable position.

Someone will send you some example logs privately.

HI @simon.brandhof,

I have sent the logs through.



About issue #1, any chance that a file report-task.txt is committed in your Git repository?

For issue #2, could you please provide a task ID and its related Azure DevOps logs?


As a primary workaround for the failing pipelines, you can disable the “Publish Task Result”, as this task only publishes the quality gate summary / result to the summary of the pipeline itself.

Some more questions that can help us troubleshoot :

  • For succeeding build pipeline, are the results correctly sent to your SonarCloud project (not only for PR, but also for branches) ?
  • Could you check that the Azure DevOps token you filled in the “Pull Request” section of the project’s setting hasn’t expired ?
  • Do yo have the possibility to re-issue the failing build that you provide the logs above with “system.debug=true” variable, to see if the task id that hasn’t been found remains the same ?

Thank you very much.


Issue #1: No - there is no chance.