# Quality Gate failed: Could not fetch quality gate status

**URL:** <https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882>\
**Category:** SonarQube Cloud\
**Created:** [February 13, 2023, 11:17pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882 "2023-02-13T23:17:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![s3un](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/s3un/32/35942_2.png) [@s3un](https://community.sonarsource.com/u/s3un)\
**Post date:** [February 13, 2023, 11:17pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/1 "2023-02-13T23:17:47Z")

</div>

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.

 ![Screenshot 2023-02-14 at 00.16.55](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/a/c/acba2a5ea48f39c6981e288c476e287090afde1a.png)

---

<div class="post-metadata">

**Author:** ![s3un](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/s3un/32/35942_2.png) [@s3un](https://community.sonarsource.com/u/s3un)\
**Post date:** [February 15, 2023, 3:32am UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/2 "2023-02-15T03:32:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [February 15, 2023, 3:40pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/3 "2023-02-15T15:40:57Z")

</div>

Hi,

Per the FAQ, [don’t invoke (`@`) users](https://community.sonarsource.com/faq#patient) 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.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![s3un](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/s3un/32/35942_2.png) [@s3un](https://community.sonarsource.com/u/s3un)\
**Post date:** [February 16, 2023, 10:14am UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/4 "2023-02-16T10:14:51Z")

</div>

Hi Ann

this is well noted thank you for the clarity.

Pipeline:

```auto
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:

```auto
+ 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.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [February 16, 2023, 1:28pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/5 "2023-02-16T13:28:46Z")

</div>

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](https://community.sonarsource.com/t/how-to-find-logs-about-importing-code-coverage/73317) will help you find them.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![s3un](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/s3un/32/35942_2.png) [@s3un](https://community.sonarsource.com/u/s3un)\
**Post date:** [February 17, 2023, 4:29pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/6 "2023-02-17T16:29:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [February 17, 2023, 4:40pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/7 "2023-02-17T16:40:49Z")

</div>

Hi,

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

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 13, 2024, 12:20pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/10 "2024-08-13T12:20:57Z")

</div>

@Dhruvin_Gabani,

You have now reopened this 1.5-year-old thread [and a 2-year-old thread](https://community.sonarsource.com/t/error-quality-gate-failed-could-not-fetch-quality-gate-status-b-errors-msg-analysis-with/63862/12) with the same question, as well as creating a brand new thread.

As @Colin already told you

> [@ERROR: Quality Gate failed: Could not fetch quality gate status: b'{"errors":\[{"msg":"Analysis with](https://community.sonarsource.com/t/error-quality-gate-failed-could-not-fetch-quality-gate-status-b-errors-msg-analysis-with/63862/15):
>
> Please don’t bump very old threads.

For a definition of “very old” please see [the FAQ](https://community.sonarsource.com/faq) which asks that you not bump threads over 2 months old.

I’m closing this thread as well.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 13, 2024, 12:21pm UTC](https://community.sonarsource.com/t/quality-gate-failed-could-not-fetch-quality-gate-status/83882/11 "2024-08-13T12:21:01Z")

</div>

Closed on August 13, 2024, 12:21pm UTC


