# 500 unknown error

**URL:** <https://community.codecov.com/t/500-unknown-error/1525>\
**Category:** Bug Fixes\
**Created:** [June 6, 2020, 6:41pm UTC](https://community.codecov.com/t/500-unknown-error/1525 "2020-06-06T18:41:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 6:41pm UTC](https://community.codecov.com/t/500-unknown-error/1525/1 "2020-06-06T18:41:12Z")

</div>

Hello.

I’m getting such response:

```
{"meta": {"status": 500}, "error": {"reason": "Unknown", "context": null}}

```

in multiple repositories:

- [Relax `gorilla_patch` version lock by AlexWayfer · Pull Request #52 · AlexWayfer/flame-flash · GitHub](https://github.com/AlexWayfer/flame-flash/pull/52)
- [Upgrade rubocop to version 0.84.0 by depfu[bot] · Pull Request #50 · AlexWayfer/formalism · GitHub](https://github.com/AlexWayfer/formalism/pull/50)

---

<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:** [June 6, 2020, 6:55pm UTC](https://community.codecov.com/t/500-unknown-error/1525/2 "2020-06-06T18:55:20Z")

</div>

@AlexWayfer can you supply the Codecov output? Also what uploader are you using, and if you are using a `codecov.yml` file, please post it here.

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 6:59pm UTC](https://community.codecov.com/t/500-unknown-error/1525/3 "2020-06-06T18:59:08Z")

</div>

> [@tom](#):
>
> @AlexWayfer can you supply the Codecov output?

Provided in the start message. The full log you can see, for example, here: [Cirrus CI](https://cirrus-ci.com/task/6290270935318528)

> [@tom](#):
>
> Also what uploader are you using

As you can see in the CI run above, `codecov 0.1.16`.

> [@tom](#):
>
> and if you are using a `codecov.yml` file, please post it here.

No, I’m using secured environment variable.

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 7:40pm UTC](https://community.codecov.com/t/500-unknown-error/1525/4 "2020-06-06T19:40:14Z")

</div>

Then I had successful runs, like this one: [Cirrus CI](https://cirrus-ci.com/task/6510691139977216?command=test#L10)

But now I have 400 error, example: [Cirrus CI](https://cirrus-ci.com/task/5733233381867520) (test spoiler)

Should I contact Cirrus CI support or is it still some problems on your side?

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 7:58pm UTC](https://community.codecov.com/t/500-unknown-error/1525/5 "2020-06-06T19:58:33Z")

</div>

And just after empty re-commit it’s OK again: [Cirrus CI](https://cirrus-ci.com/task/5345938556321792)

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 8:43pm UTC](https://community.codecov.com/t/500-unknown-error/1525/6 "2020-06-06T20:43:29Z")

</div>

And 500 again: [Cirrus CI](https://cirrus-ci.com/task/5479510764158976)

So, I’m definitely don’t know what to do. Sorry about multiple messages.

---

<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:** [June 6, 2020, 8:47pm UTC](https://community.codecov.com/t/500-unknown-error/1525/7 "2020-06-06T20:47:43Z")

</div>

@AlexWayfer, I’m taking a look to see what’s happening here, but would you be able to first try to [bash uploader](https://docs.codecov.io/docs/about-the-codecov-bash-uploader)?

---

<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:** [June 6, 2020, 8:48pm UTC](https://community.codecov.com/t/500-unknown-error/1525/8 "2020-06-06T20:48:45Z")

</div>

We are in the works of upgrading the `ruby` uploader to a new endpoint, but it is a bit outdated. I’d like to make sure it’s not a different upload issue first.

---

<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:** [June 6, 2020, 8:55pm UTC](https://community.codecov.com/t/500-unknown-error/1525/9 "2020-06-06T20:55:28Z")

</div>

As for token issues, we’ll be working over the next sprint to get tokenless Cirrus CI uploads.

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 9:05pm UTC](https://community.codecov.com/t/500-unknown-error/1525/10 "2020-06-06T21:05:24Z")

</div>

These errors are not 100% reproducable, but I can try.

But I didn’t understand from documentation how to use `bash` uploader properly.

Example of fail: [Cirrus CI](https://cirrus-ci.com/task/6181578374119424?command=test#L27)

Should I write `bash <(curl -s https://codecov.io/bash)` before test command or after, and what type of reports I must provide?

---

<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:** [June 6, 2020, 9:17pm UTC](https://community.codecov.com/t/500-unknown-error/1525/11 "2020-06-06T21:17:04Z")

</div>

You should put it after the test command and after coverage is collected. Can you try doing

```auto
bash <(curl -s https://codecov.io/bash) -s /tmp/cirrus-ci-build/coverage

```

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 9:21pm UTC](https://community.codecov.com/t/500-unknown-error/1525/12 "2020-06-06T21:21:26Z")

</div>

It doesn’t work, even via `&&` (in case if array of commands in YAML removes `/tmp` between them): [Cirrus CI](https://cirrus-ci.com/task/4720200945762304)

---

<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:** [June 6, 2020, 9:27pm UTC](https://community.codecov.com/t/500-unknown-error/1525/13 "2020-06-06T21:27:48Z")

</div>

Sorry @AlexWayfer I had meant `-s` not `-f` to [specify a directory](https://github.com/codecov/codecov-bash/blob/master/codecov#L106)

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 6, 2020, 9:35pm UTC](https://community.codecov.com/t/500-unknown-error/1525/14 "2020-06-06T21:35:32Z")

</div>

Still no: [Cirrus CI](https://cirrus-ci.com/task/5340234948804608?command=test#L51)

---

<div class="post-metadata">

**Author:** ![knoid](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/knoid/32/821_2.png) [@knoid](https://community.codecov.com/u/knoid)\
**Post date:** [June 8, 2020, 3:13pm UTC](https://community.codecov.com/t/500-unknown-error/1525/15 "2020-06-08T15:13:51Z")

</div>

Not sure if it’s the same problem, but I had the same “500 Unknown” error for a few days. It got fixed when I signed in to codecov and gave it github permissions again. It’s been a while since I had last signed in. Maybe the token had expired? Don’t know but now it works 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:** [June 8, 2020, 7:58pm UTC](https://community.codecov.com/t/500-unknown-error/1525/16 "2020-06-08T19:58:42Z")

</div>

@AlexWayfer, just an update I’m working on making changes to the Ruby uploader to hopefully make debugging this issue easier. Thanks for your patience here.

---

<div class="post-metadata">

**Author:** ![AlexWayfer](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/alexwayfer/32/1771_2.png) [@AlexWayfer](https://community.codecov.com/u/AlexWayfer)\
**Post date:** [June 8, 2020, 8:40pm UTC](https://community.codecov.com/t/500-unknown-error/1525/17 "2020-06-08T20:40:34Z")

</div>

OK, thanks, I appreciate it. I’m glad to help, but not sure that uploader can resolve the problem: 5xx are the codes about server errors (4xx about clients, yes). So, maybe you should check server logs.

---

<div class="post-metadata">

**Author:** ![davidrunger](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/davidrunger/32/825_2.png) [@davidrunger](https://community.codecov.com/u/davidrunger)\
**Post date:** [June 8, 2020, 10:27pm UTC](https://community.codecov.com/t/500-unknown-error/1525/18 "2020-06-08T22:27:41Z")

</div>

@tom Thanks for looking into this.

(Because I am a new user in this forum, I can only post 4 links in my comment, so some of the links below are intentionally broken; sorry about that.)

I am encountering problems (and have been for a couple of days now) that sound similar to what’s being discussed in this thread.

Here’s a repository where I’m running into the issues: github .com/davidrunger/david\_runger/

Here’s a PR created earlier today where Codecov did not comment on the PR with coverage change information: [https://github.com/davidrunger/david\_runger/pull/2766](https://github.com/davidrunger/david_runger/pull/2766) . Here’s the Travis build log for that PR: [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/github/davidrunger/david_runger/builds/696176455) . In the Travis build log, we see this when the `SimpleCov::Formatter::Codecov` Ruby reporter attempted to upload the coverage data to Codecov:

```
{"meta": {"status": 500}, "error": {"reason": "Unknown", "context": null}}

```

In contrast / for reference, here’s a different PR today where Codecov _did_ add a comment to the PR: [https://github.com/davidrunger/david\_runger/pull/2771](https://github.com/davidrunger/david_runger/pull/2771) . Here’s the Travis build log for that PR: travis-ci .org/github/davidrunger/david\_runger/builds/696221037 . In the Travis log output, instead of a 500 error when uploading the coverage data to Codecov, we see this:

```
{"uploaded": true, "url": "https://codecov.io/github/davidrunger/david_runger/commit/62df408aa12d025c475f09271113055ad8c59d53", "queued": true, "meta": {"status": 200}, "message": "Coverage reports upload successfully", "id": "49ca4ff5-d8b8-4dd0-ac2b-014a3a5d7bfb"}

```

It seems that whenever there is a 500 error in the Travis logs, Codecov doesn’t add a comment to the PR. When the logs indicate a 200 response for the upload to Codecov, then Codedov does add a comment to the PR.

Whether a 500 or a 200 occurs seems to be correlated with whether or not I am logged in to Codecov in my browser (Firefox) at the time that the upload is attempted. If I am logged in to Codecov when the coverage data upload is attempted in the Travis build, then we get a 200 and Codecov adds a comment. If I am not logged in to Codecov, then we get a 500 and Codecov does not add a comment.

(I don’t guess that whether or not I am logged in to `codecov.io` in my browser causes the 200 response vs a 500 response; rather, I suspect that there is some underlying issue that is the cause both of logging me out of `codecov.io` in my browser and the 500 error when Travis attempts to upload the coverage data?)

Furthermore, it seems that creating a PR in GitHub logs me out of `codecov.io` .

Therefore, if I create a PR and take no other action, Codecov ultimately does not add a comment to the PR.

If I do this instead, then Codecov will add a comment to the PR:

1. go to `codecov.io` and observe that I am logged in
2. create PR
3. go to `codecov.io` and observe that I am no longer logged in
4. delete my `codecov.io` cookies
5. log in to Codecov (via GitHub OAuth) before the Travis build reaches the point where it attempts to upload coverage data to Codecov

As far as I can tell, from looking at recent PRs for that repo ( github .com/davidrunger/david\_runger/ ), the issue seems to have emerged some time between **2020-06-06T00:16:49Z** (when this PR was created github .com/davidrunger/david\_runger/pull/2741 , to which Codecov added a comment) and **2020-06-06T08:56:06Z** (when this PR was created github .com/davidrunger/david\_runger/pull/2742 , which Codedov did not add a comment to and where we can see `{"meta": {"status": 500}, "error": {"reason": "Unknown", "context": null}}` in the Travis log output when attempting to upload coverage data to Codecov).

I hope that this info helps to debug the issue! Thanks again!

---

<div class="post-metadata">

**Author:** ![davidrunger](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/davidrunger/32/825_2.png) [@davidrunger](https://community.codecov.com/u/davidrunger)\
**Post date:** [June 9, 2020, 7:48am UTC](https://community.codecov.com/t/500-unknown-error/1525/19 "2020-06-09T07:48:46Z")

</div>

I have determined that the issue that I am encountering doesn’t seem to have anything to do with the Ruby uploader vs the bash uploader.

* * *

## Success case

I created this PR [Bump eslint-import-resolver-custom-alias from 1.3.0 to 1.3.2 by dependabot[bot] · Pull Request #2781 · davidrunger/david\_runger · GitHub](https://github.com/davidrunger/david_runger/pull/2781) and followed the 5-step process that I mentioned above (logging in to `codecov.io` after creating the PR and before the Travis build attempted to upload the coverage data to Codecov).

That PR adds this as the last step of the Travis build flow:

```
bash <(curl -s https://codecov.io/bash) -f "$(pwd)/coverage/.resultset.json"

```

As we can see in the Travis build log [Travis CI](https://travis-ci.org/github/davidrunger/david_runger/builds/696352922) , both the Ruby coverage formatter/reporter and the bash uploader were able to send the result to Codecov successfully.

Ruby:

```
{"uploaded": true, "url": "https://codecov.io/github/davidrunger/david_runger/commit/1b17b5652fd18fd4d9798aca8824d2fbf4a2871c", "queued": true, "meta": {"status": 200}, "message": "Coverage reports upload successfully", "id": "02d480e1-82f5-43a6-8cff-c300ec4f6221"}

```

Bash:

```
==> Uploading reports
    url: https://codecov.io
        query: branch=codecov-bash-uploader&commit=1b17b5652fd18fd4d9798aca8824d2fbf4a2871c&build=6529.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696352923
        -> Pinging Codecov
        https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=codecov-bash-uploader&commit=1b17b5652fd18fd4d9798aca8824d2fbf4a2871c&build=6529.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696352923
    -> Uploading
        -> View reports at https://codecov.io/github/davidrunger/david_runger/commit/1b17b5652fd18fd4d9798aca8824d2fbf4a2871c

```

As expected, Codecov also added a comment to that PR.

* * *

## Failure case

I also created this PR: [Bump @vitejs/plugin-vue from 4.2.2 to 4.2.3 by dependabot[bot] · Pull Request #2780 · davidrunger/david\_runger · GitHub](https://github.com/davidrunger/david_runger/pull/2780) . After creating that PR (and being logged out of `codecov.io`), I did not log in to `codecov.io`. As we can see from the Travis build log [Travis CI](https://travis-ci.org/github/davidrunger/david_runger/builds/696349662) , both the Ruby and bash attempts to upload code coverage data to Codecov failed.

Ruby:

```
{"meta": {"status": 500}, "error": {"reason": "Unknown", "context": null}}

```

bash:

```
==> Uploading reports
+say ' \033[0;90murl:\033[0m https://codecov.io'
+echo -e ' \033[0;90murl:\033[0m https://codecov.io'
    url: https://codecov.io
    +say ' \033[0;90mquery:\033[0m branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
    +echo -e ' \033[0;90mquery:\033[0m branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
    query: branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663
    ++tr -d ' '
    ++echo 'package=bash-20200602-f809a24&token=secret&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
+queryNoToken='package=bash-20200602-f809a24&token=secret&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
++tr -d ' '
++echo 'package=bash-20200602-f809a24&token=[secure]&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
+query='package=bash-20200602-f809a24&token=[secure]&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
+'[' 1 = 1 ']'
+i=0
+'[' 0 -lt 4 ']'
+i=1
+say ' \033[0;90m->\033[0m Pinging Codecov'
+echo -e ' \033[0;90m->\033[0m Pinging Codecov'
    -> Pinging Codecov
    +say 'https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
    +echo -e 'https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663
++curl -X POST -H 'X-Reduced-Redundancy: false' -H 'X-Content-Type: application/x-gzip' 'https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=[secure]&branch=bash-codecov-uploader&commit=033212e9b75bd033e55a63479f5c724a746dab99&build=6528.1&build_url=&name=&tag=&slug=davidrunger%2Fdavid_runger&service=travis&flags=&pr=false&job=696349663'
  % Total % Received % Xferd Average Speed Time Time Time Current
                                   Dload Upload Total Spent Left Speed
                                   100 17 100 17 0 0 16 0 0:00:01 0:00:01 --:--:-- 16
                                 +res='HTTP 500
Unknown'
++head -1
++echo 'HTTP 500
Unknown'
++cut '-d ' -f2
++grep 'HTTP '
+status=500
+'[' 500 = '' ']'
+'[' 500 = 400 ']'
+say ' \033[0;90m->\033[0m Sleeping for 30s and trying again...'
+echo -e ' \033[0;90m->\033[0m Sleeping for 30s and trying again...'
    -> Sleeping for 30s and trying again...

```

As expected, Codecov did not add a comment to that PR.

---

<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:** [June 9, 2020, 3:00pm UTC](https://community.codecov.com/t/500-unknown-error/1525/20 "2020-06-09T15:00:07Z")

</div>

Hi @davidrunger, thanks for the incredibly detailed logs here. I’ll take a look shortly to see what went wrong here.

[Next page](https://community.codecov.com/t/500-unknown-error/1525.md?page=2)
