Quality Gate failed: Could not fetch quality gate status

The current plan is (100k private lines of code for €10 per month), my repo currently has no private project in it.

The error we are seeing is:

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

please respond as soon as possible.

here I added some screenshots to easily understand my issue.

Hi @Lena @Colin I’m so sorry about this, but no one seems to be responding to me and this is pretty urgent.

I’m getting the same error: Quality Gate failed: Could not fetch quality gate status: b'{"errors":[{"msg":"Analysis with id \\u0027None\\u0027 is not found"}]}'

and I deleted other private projects so currently, I have LOC. but the project keeps failing

Kindly advise on how to go about this.
Please its delaying production

Hi,

Per the FAQ, don’t invoke (@) users who aren’t already involved in your thread. Instead, be patient; you can’t expect immediate responses.

@ing people doesn’t move your thread up their priority lists; just the opposite, and that’s particularly the case when the thread isn’t relevant to their domains.

Regarding your problem, please provide the full text (no screenshots, please) of your job log, as well as your pipeline.

 
Ann

Hi Ann

this is well noted thank you for the clarity.

Pipeline:

clone:
  depth: 5       # include the last five commits


definitions:
  services:
    docker:
      memory: 7128
    mysql:
      image: mysql:5
      environment:
        MYSQL_DATABASE: '***'
        MYSQL_RANDOM_ROOT_PASSWORD: '**'
        MYSQL_USER: '***'
        MYSQL_PASSWORD: '***'
  caches:
    sonar: ~/.sonar/cache

  steps:
    - step: &Composer
        name: Composer
        image: php:7.4-cli
        size: 2x
        caches:
          - composer
        script:
          - apt-get update
          - zip -r application.zip . -x .env -x "node_modules*" -x "*.git*"
        artifacts:
          - application.zip
        services:
          - mysql

    - step: &Code-Deploy
        name: Code Deploy
        clone:
          enabled: false
        oidc: true
        script:
          - pipe: atlassian/aws-code-deploy:1.1.1
            variables:
				****

          - pipe: atlassian/aws-code-deploy:1.1.1
            variables:
              AWS_DEFAULT_REGION: ${AWS_DEPLOYMENT_REGION}
              *****
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        image: composer:2.0
        size: 2x
        caches:
          - composer
          - sonar
        script:
          - pipe: sonarsource/sonarcloud-scan:1.4.0

    - step: &check-quality-gate-sonarcloud
        name: SonarCloud
        image: composer:2.0
        size: 2x
        script:
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6

pipelines:

  tags:
    v1.*.*:
      - step: *Composer
      - step: *Code-Deploy

  branches:
    qa:
      - step: *Composer
      - step:
          <<: *Code-Deploy
          name: Code Deploy
          deployment: qa
    master:
      - step: *build-test-sonarcloud
      - step: *check-quality-gate-sonarcloud
      
  pull-requests:
    '**':
      - step: *build-test-sonarcloud
      - step: *check-quality-gate-sonarcloud

Job:

+ docker container run \

   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \

   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \

   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \

   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \

   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-quality-gate:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-quality-gate \

   --workdir=$(pwd) \

   --label=org.bitbucket.pipelines.system=true \

   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \

   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \

   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \

   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \

   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \

   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \

   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \

   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \

   --env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \

   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \

   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \

   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \

   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \

   --env=CI="$CI" \

   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \

   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \

   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \

   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \

   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \

   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \

   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \

   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \

   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \

   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \

   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \

   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-quality-gate" \

   --env=SONAR_TOKEN="${SONAR_TOKEN}" \

   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \

   sonarsource/sonarcloud-quality-gate:0.1.6

Unable to find image 'sonarsource/sonarcloud-quality-gate:0.1.6' locally

0.1.6: Pulling from sonarsource/sonarcloud-quality-gate

7d63c13d9b9b: Pulling fs layer

7c9d54bd144b: Pulling fs layer

a7f085de2052: Pulling fs layer

9027970cef28: Pulling fs layer

97a32a5a9483: Pulling fs layer

64c7eb061745: Pulling fs layer

3a5b08312a6b: Pulling fs layer

54698e5bc8b2: Pulling fs layer

97a32a5a9483: Waiting

9027970cef28: Waiting

3a5b08312a6b: Waiting

54698e5bc8b2: Waiting

7c9d54bd144b: Download complete

a7f085de2052: Verifying Checksum

a7f085de2052: Download complete

9027970cef28: Verifying Checksum

9027970cef28: Download complete

7d63c13d9b9b: Verifying Checksum

7d63c13d9b9b: Download complete

97a32a5a9483: Verifying Checksum

97a32a5a9483: Download complete

64c7eb061745: Verifying Checksum

64c7eb061745: Download complete

3a5b08312a6b: Verifying Checksum

3a5b08312a6b: Download complete

54698e5bc8b2: Verifying Checksum

54698e5bc8b2: Download complete

7d63c13d9b9b: Pull complete

7c9d54bd144b: Pull complete

a7f085de2052: Pull complete

9027970cef28: Pull complete

97a32a5a9483: Pull complete

64c7eb061745: Pull complete

3a5b08312a6b: Pull complete

54698e5bc8b2: Pull complete

Digest: sha256:3d2b48985ba09eb96efeb3bca06fd1b23cccf5d4ee792d532177d55ec15b1032

Status: Downloaded newer image for sonarsource/sonarcloud-quality-gate:0.1.6

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

I hope this suffices for the job log.

Hi,

I’m looking for the logging that includes the analysis log.

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Hi Ann,

I have issues understanding the guide you pasted, I’m sorry for any inconvenience, the logs am I getting from sonar cloud or my Bitbucket?

Hi,

I’m looking for the output of the analysis command. Those logs would be in Bitbucket.

 
Ann

@Dhruvin_Gabani,

You have now reopened this 1.5-year-old thread and a 2-year-old thread with the same question, as well as creating a brand new thread.

As @Colin already told you

For a definition of “very old” please see the FAQ which asks that you not bump threads over 2 months old.

I’m closing this thread as well.

 
Ann