# Codecov not posting comments to GitLab Merge Requests

**URL:** <https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304>\
**Category:** Bug Fixes\
**Created:** [November 13, 2020, 1:50am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304 "2020-11-13T01:50:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [November 13, 2020, 1:50am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/1 "2020-11-13T01:50:56Z")

</div>

_Please check the [troubleshooting guide](https://docs.codecov.io/docs/troubleshooting-guide) before creating a ticket._  
All fields below are required.

### Description

Despite creating a new `codecov.yaml` file specifically for the repo, updating my `.gitlab-ci.yaml` file with the required script to enable the coverage file to be pushed, and creating a webhook for GitLab within Codecov, I am not getting any comments being pushed to any of my merge requests.

Testing the webhook reveals that it is getting a `500` error for merge request events:

 ![GitLab_Webhook_500](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/f/f3e792a2238ea68929cb1a50bc2a943e1d107a24.png)

I can provide information pertaining to how the webhook is configured, if required.

I’ve also noticed that all of my commits show " **Waiting for CI to complete**" at the top of the screen, and clicking the “Push notifications now” link results in a notification stating “Notification job queued.”

It’s worth noting that the GitLab Pipeline starts successfully when expected, and I am able to view the coverage reports at [codecov.io](http://codecov.io).

Am I missing something somewhere?

### Commit SHAs

13443790feb20b57cf6e940402841aab207fac6c

### Repository

[https://gitlab.com/singularis-technologies/stronk](https://gitlab.com/singularis-technologies/stronk)

> **[Code coverage done right.](https://app.codecov.io/gl/singularis-technologies/stronk)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

### CI/CD or Build URL

```auto
image: cirrusci/flutter

before_script:
  - sudo apt-get update -y
  - sudo apt-get upgrade -y
  - sudo apt-get install -y sqlite3 libsqlite3-dev

after_script:
  - bash <(curl -s https://codecov.io/bash)

stages:
  - test

flutter_test:
  stage: test
  script:
    - flutter test --coverage
    - lcov --list coverage/lcov.info
    - genhtml coverage/lcov.info --output=coverage
  artifacts:
    paths:
      - coverage
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'unit-tests' || $CI_COMMIT_BRANCH == 'master'
      when: on_success
  tags:
    - docker

```

### Uploader

Bash uploader:

```auto
codecov:
  bot: "amkuchta"
  require_ci_to_pass: no

coverage:
  precision: 2
  round: down
  range: "40...100"

comment:
  layout: "diff, files"
  behavior: new
  require_changes: false
  require_base: no # [yes :: must have a base report to post]
  require_head: no # [yes :: must have a head report to post]

```

### Codecov Output

```auto
Running after script...
$ bash <(curl -s https://codecov.io/bash)
  _____ _
 / ____ | | |
| | _____ | | ______  _______
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |__/ (_| (_) \ V /
 \ _____\___ / \ __,_|\___ |\ ___\___ / \_/
                              Bash-20201106-81372f2
==> GitLab CI detected.
    project root: .
--> token set from env
    Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage/lcov.info bytes=27630
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=routineNoteDao-test&commit=13443790feb20b57cf6e940402841aab207fac6c&build=846907259&build_url=&name=&tag=&slug=singularis-technologies%2Fstronk&service=gitlab&flags=&pr=&job=846907259&cmd_args=
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20201106-81372f2&token=secret&branch=routineNoteDao-test&commit=13443790feb20b57cf6e940402841aab207fac6c&build=846907259&build_url=&name=&tag=&slug=singularis-technologies%2Fstronk&service=gitlab&flags=&pr=&job=846907259&cmd_args=
-> Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-11-13/869B7E21B47FA220BE898881172E6005/13443790feb20b57cf6e940402841aab207fac6c/da7eb3eb-4dd0-4028-9d9b-afb9ae961ec8.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201113%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201113T005038Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=a6f6b2c503cc368d0c5799e25cbd78facc652611abe9032f550c903d7ce52890
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 9578 0 0 100 9578 0 43735 --:--:-- --:--:-- --:--:-- 43735
    -> View reports at https://codecov.io/gitlab/singularis-technologies/stronk/commit/13443790feb20b57cf6e940402841aab207fac6c

```

### Expected Results

Comments should be generated on merge requests.

### Actual Results

Coverage results are uploaded to [codecov.io](http://codecov.io) and pipeline succeeds, but no comment is generated.

### Additional Information

N/A

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [November 18, 2020, 9:16pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/2 "2020-11-18T21:16:53Z")

</div>

[@moderators](https://community.codecov.com/groups/moderators) any chance anyone has seen this issue before?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [November 23, 2020, 12:35am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/3 "2020-11-23T00:35:59Z")

</div>

@amkuchta, would you be able to supply a newer SHA here? Apologies on the delay.

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [November 24, 2020, 1:06am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/4 "2020-11-24T01:06:10Z")

</div>

@tom no worries, thank you for the response!

As requested, a new commit SHA: 697b2fd33d8893889fea6a6beff15289f4a27838

I’ll also add the updated output from the latest pipeline run:

```auto
Running after script...
$ bash <(curl -s https://codecov.io/bash)
  _____ _
 / ____ | | |
| | _____ | | ______  _______
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |__/ (_| (_) \ V /
 \ _____\___ / \ __,_|\___ |\ ___\___ / \_/
                              Bash-20201123-d0fed5f
==> GitLab CI detected.
    project root: .
--> token set from env
    Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage/lcov.info bytes=27911
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=workoutRoutineDao_test&commit=697b2fd33d8893889fea6a6beff15289f4a27838&build=868222161&build_url=&name=&tag=&slug=singularis-technologies%2Fstronk&service=gitlab&flags=&pr=&job=868222161&cmd_args=
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20201123-d0fed5f&token=secret&branch=workoutRoutineDao_test&commit=697b2fd33d8893889fea6a6beff15289f4a27838&build=868222161&build_url=&name=&tag=&slug=singularis-technologies%2Fstronk&service=gitlab&flags=&pr=&job=868222161&cmd_args=
-> Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-11-24/869B7E21B47FA220BE898881172E6005/697b2fd33d8893889fea6a6beff15289f4a27838/17e6501b-4bd2-4c42-89c1-dd732a013355.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201124%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201124T010204Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=0fe9884067871906c3fd3b0ceb34533e6caedae4ad342accf3609b0677b65ed7
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 9874 0 0 100 9874 0 43307 --:--:-- --:--:-- --:--:-- 43307
    -> View reports at https://codecov.io/gitlab/singularis-technologies/stronk/commit/697b2fd33d8893889fea6a6beff15289f4a27838

```

Anything you can do to help would be great!

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [November 28, 2020, 4:02am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/5 "2020-11-28T04:02:55Z")

</div>

@amkuchta, I’m seeing some 403 errors when trying to hit GitLab public endpoints like

```auto
https://gitlab.com/api/v4/projects/21557982/merge_requests/10

```

Do you know why this might be, some GitLab specific permissions?

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 3, 2020, 6:32pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/6 "2020-12-03T18:32:40Z")

</div>

@tom I’m not seeing anything on my end - the project is public. I haev the repo (and merge requests) locked down to “Only Project Members”, but since I am a project member (and my account is set as the bot), I don’t think this would be a problem.

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 3, 2020, 6:34pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/7 "2020-12-03T18:34:38Z")

</div>

@tom I verified this by temporarily swapping permissions over to “Everyone with access” and testing the webhook again - still getting a 500 response.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [December 8, 2020, 1:40am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/8 "2020-12-08T01:40:07Z")

</div>

@amkuchta, sorry I meant this as specific to GitLab. In order to get merge request information, we have to hit GitLab’s API ([https://gitlab.com/api/v4/projects/21557982/merge\_requests/10](https://gitlab.com/api/v4/projects/21557982/merge_requests/10)), but that is showing a 403 forbidden. Do you know why this might be?

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 8, 2020, 1:17pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/9 "2020-12-08T13:17:37Z")

</div>

@tom I updated my repo to be wide open to the public - can you try hitting the API again?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [December 8, 2020, 2:32pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/10 "2020-12-08T14:32:28Z")

</div>

@amkuchta, it doesn’t seem that way. I’m going to open a ticket with GitLab to see why this might be.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [December 8, 2020, 11:50pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/11 "2020-12-08T23:50:55Z")

</div>

@amkuchta, I have an idea. Would you be able to log out of [codecov.io](http://codecov.io), clear your cookies, and log back in again? And then create another PR to see if comments appear?

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 15, 2020, 5:58pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/12 "2020-12-15T17:58:23Z")

</div>

@tom I logged into a brand new computer, created a new PR, and submitted. I noticed that the CI build is showing as passing now, but it doesn’t recognize that I am the user who made the commits (“Unknown”, “Somebody”):

 ![Screen Shot 2020-12-15 at 12.56.03 PM](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/8/8b87b794ee4b11a0cfea49f68de42582110c4e82.jpeg) ![Screen Shot 2020-12-15 at 12.56.34 PM](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/7/74b0b3c51808252f6974fe84b277e389c95f7ab9.png)

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 15, 2020, 5:58pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/13 "2020-12-15T17:58:57Z")

</div>

@tom I am also still not getting comments…

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [December 16, 2020, 5:11am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/14 "2020-12-16T05:11:22Z")

</div>

Hi @amkuchta, are you using the same git user settings (email and name) on this computer? That would explain the `Unknown`. I am still seeing a permissions issue. I don’t THINK it will change anything, but just to humor me, would you go through the cookies step?

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 17, 2020, 12:49am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/15 "2020-12-17T00:49:45Z")

</div>

@tom I went through the cookies step, and still no joy on the comments… I did notice, however, that I am still getting a ‘CI Passed’ in Codecov.

And I didn’t check my git settings on the other system, but that could have very well been the issue.

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [December 28, 2020, 1:36pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/16 "2020-12-28T13:36:08Z")

</div>

@tom did you ever get a chance to open the ticket with GitLab? If yes, can you please share the link to it so that I can monitor?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [January 5, 2021, 4:28pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/17 "2021-01-05T16:28:15Z")

</div>

@amkuchta, apologies, that particular endpoint is authenticated, so it makes sense that we cannot access it directly as such. We made a small change on our end, and I’m curious to see if it’s helped things. Would you be able to push up a new commit and share the SHA?

---

<div class="post-metadata">

**Author:** ![amkuchta](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/amkuchta/32/1297_2.png) [@amkuchta](https://community.codecov.com/u/amkuchta)\
**Post date:** [January 6, 2021, 1:07am UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/18 "2021-01-06T01:07:07Z")

</div>

@tom new year, new commit!

```
1a192a4e3633c9d01c15e4ea7e2f20e9c6b4c2aa

```

Let me know if that helps. It’s worth mentioning that it looks like it still is not posting the comment on the merge request.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [January 14, 2021, 5:02pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/19 "2021-01-14T17:02:27Z")

</div>

Hi @amkuchta, sorry for the delay here, we’re still investigating. I’ll reach out in case we need one more SHA, but hopefully not.

---

<div class="post-metadata">

**Author:** ![packenbush](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/packenbush/32/1512_2.png) [@packenbush](https://community.codecov.com/u/packenbush)\
**Post date:** [January 26, 2021, 9:15pm UTC](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304/21 "2021-01-26T21:15:15Z")

</div>

Sorry but where did you get information on how to set this up? Docs don’t say anything about getting comments to work with gitlab and the page on comments doesn’t mention webhooks at all. What am I missing?

[Next page](https://community.codecov.com/t/codecov-not-posting-comments-to-gitlab-merge-requests/2304.md?page=2)
