Quality Gate fails with 'GET 404 https://sonarcloud.io/api/ce/task?id=AX-yXUIpYZn01BNPA1FR'

  • SonarCloud, SonarScanner for MSBuild 5.5.3
16:02:10.694 DEBUG: Report metadata written to /builds/dev-uk/micro-space/application-container/.sonarqube/out/.sonar/report-task.txt
16:02:10.694 INFO: ------------- Check Quality Gate status
16:02:10.694 INFO: Waiting for the analysis report to be processed (max 300s)
16:02:10.705 DEBUG: GET 404 https://sonarcloud.io/api/ce/task?id=AX-yXUIpYZn01BNPA1FR | time=11ms
16:02:10.710 DEBUG: eslint-bridge server will shutdown
16:02:16.090 INFO: ------------------------------------------------------------------------
16:02:16.090 INFO: EXECUTION FAILURE
16:02:16.090 INFO: ------------------------------------------------------------------------
16:02:16.090 INFO: Total time: 1:10.743s
16:02:16.149 INFO: Final Memory: 38M/137M
16:02:16.149 INFO: ------------------------------------------------------------------------
16:02:16.149 ERROR: Error during SonarScanner execution
Failed to get CE Task status - No activity found for task 'AX-yXUIpYZn01BNPA1FR'
Process returned exit code 2
The SonarScanner did not complete successfully

Appears randomly, sometimes helps restarts, sometimes restart works from 2,3,4 try.
This is how we run it:

 dotnet sonarscanner begin /o:XXX /k:$SONAR_CLOUD_PROJECT /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=$SONAR_TOKEN /d:sonar.qualitygate.wait=true /d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml  /d:sonar.javascript.lcov.reportPaths=**/lcov.info /d:sonar.exclusions=$SONAR_EXCLUSIONS /d:sonar.cpd.exclusions=$SONAR_EXCLUSIONS_DUPLICATION /d:sonar.coverage.exclusions=$SONAR_EXCLUSIONS_COVERAGE /v:$VERSION
    dotnet build
    dotnet sonarscanner end /d:sonar.login=$SONAR_TOKEN

Analysis run in container, so no leftovers should be anywhere.

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine
ENV PATH "$PATH:/root/.dotnet/tools"
RUN apk update && apk add openjdk11 nodejs npm bash git openssh
RUN wget https://dot.net/v1/dotnet-install.sh
RUN chmod +x dotnet-install.sh
RUN ./dotnet-install.sh -c 5.0 --install-dir /usr/share/dotnet
RUN dotnet tool install --global dotnet-sonarscanner

Any help with this?

A post was merged into an existing topic: Maven Plugin fails with exception when trying to run on SonarCloud