# Error 500 when accessing settings of Bitbucket repository

**URL:** <https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418>\
**Category:** Bug Fixes\
**Created:** [December 13, 2020, 7:01pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418 "2020-12-13T19:01:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [December 13, 2020, 7:01pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/1 "2020-12-13T19:01:57Z")

</div>

### Description

When trying to access my [Codecov.io](http://Codecov.io) repository (which is hosed on Bitbucket), I get a HTTP 500 error.

### Commit SHAs

The last coverage commit was 54f4e2a5c16ab396422d5590fe5115c4c010a38c.

### Repository

The repository is: [Bitbucket](https://bitbucket.org/Roberto-R/uptime-tester)

### CI/CD or Build URL

Build is done from Bitbucket pipelines: [Bitbucket](https://bitbucket.org/Roberto-R/uptime-tester/addon/pipelines/home#!/results/24)

### Uploader

The bash uploader is being used. The most recent upload exited successfully.

### Codecov Output

```
` Bash-20201130-cc6d3fe`

``

``

`==> Bitbucket detected.`

` project root: .`

`--> token set from env`

` Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml`

`==> Running gcov in . (disable via -X gcov)`

`==> Searching for coverage reports in:`

` + .`

` -> Found 1 reports`

`==> Detecting git/mercurial file structure`

`==> Reading reports`

` + ./coverage.xml bytes=71895`

`==> Appending adjustments`

` https://docs.codecov.io/docs/fixing-reports`

` + Found adjustments`

`==> Gzipping contents`

` 8.0K	/tmp/codecov.kJPjE1.gz`

`==> Uploading reports`

` url: https://codecov.io`

` query: branch=master&commit=54f4e2a5c16ab396422d5590fe5115c4c010a38c&build=24&build_url=&name=&tag=&slug=Roberto-R%2Fuptime-tester&service=bitbucket&flags=&pr=&job=24&cmd_args=`

`-> Pinging Codecov`

`https://codecov.io/upload/v4?package=bash-20201130-cc6d3fe&token=secret&branch=master&commit=54f4e2a5c16ab396422d5590fe5115c4c010a38c&build=24&build_url=&name=&tag=&slug=Roberto-R%2Fuptime-tester&service=bitbucket&flags=&pr=&job=24&cmd_args=`

`-> Uploading to`

`https://storage.googleapis.com/codecov/v4/raw/2020-12-14/BBA0BAA218E1E4884DD62E51758884C6/54f4e2a5c16ab396422d5590fe5115c4c010a38c/4d8f8655-f9af-4bf3-a127-a6ee0898fe07.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201214%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201214T070425Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=5b2f654259847a1112c9794614849cd0a9373ec7b4019d04f6928a1b4428d0d0`

` % Total % Received % Xferd Average Speed Time Time Time Current`

` Dload Upload Total Spent Left Speed`

``

` 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0`

`100 7469 0 0 100 7469 0 42437 --:--:-- --:--:-- --:--:-- 42437`

` -> View reports at https://codecov.io/bitbucket/roberto-r/uptime-tester/commit/54f4e2a5c16ab396422d5590fe5115c4c010a38c`

```

### Expected Results

Expected to view the repository settings.

### Actual Results

Received HTTP 500 error page.

### Additional Information

---

<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 15, 2020, 5:18am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/2 "2020-12-15T05:18:19Z")

</div>

@RobertoRoos, are you trying to view this URL [Code coverage done right.](https://codecov.io/bitbucket/roberto-r/uptime-tester/commit/54f4e2a5c16ab396422d5590fe5115c4c010a38c) or [Codecov](https://codecov.io/bb/Roberto-R/uptime-tester/)?

What happens if you do not log in and view it on a private browsing session/incognito?

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [December 15, 2020, 7:08am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/3 "2020-12-15T07:08:20Z")

</div>

Both those URLs work. But if I access the repository main page and go to the settings tab (so [Codecov](https://codecov.io/bb/roberto-r/uptime-tester/settings)) I am met with the 500 error.

The same happens from incognito mode.

I tried to link a repository in a new Bitbucket account to [Codecov.io](http://Codecov.io) and I ran into the same issue there.

---

<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:01am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/4 "2020-12-16T05:01:41Z")

</div>

@RobertoRoos, can you try clearing your cookies, logging out, and logging back in again?

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [December 16, 2020, 11:21am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/5 "2020-12-16T11:21:56Z")

</div>

Tried it, but no changes.  
I also logged in from a private window, still the 500 error.

Note that I also cannot view Commits, Branches and Pulls windows. They all give the same 500 error.

EDIT: Interesting, I _can_ view the commits page from an incognito window ([Codecov](https://app.codecov.io/bb/roberto-r/uptime-tester/commits?page=1)), but I cannot after I’ve logged in.

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [December 18, 2020, 8:40am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/6 "2020-12-18T08:40:15Z")

</div>

Error still persists, but I found out I can circumvent it by going directly to the settings/badge page: [https://codecov.io/bb/roberto-r/uptime-tester/settings/badge](https://codecov.io/bb/roberto-r/uptime-tester/settings/badge)

From the settings/badge page, I can click on the sidebar link to go to settings/general. So I’ve managed to extract my token, badge URL and re-create the webhook.

Not much as a solution I guess, but a workaround.

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [February 3, 2021, 7:16pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/8 "2021-02-03T19:16:32Z")

</div>

Just wanted to confirm the issue still persists.

And I found that on another account one Bitbucket repo works perfectly, while another shows the familiar problem:

This repo will give an error when for example going to the ‘Commits’ tab:  
[https://codecov.io/bb/itco/ldapi](https://codecov.io/bb/itco/ldapi)

Whereas this one works:  
[https://codecov.io/bb/itco/ldbs-x](https://codecov.io/bb/itco/ldbs-x)  
(You will get an 400 unauthorized error, instead of a 500 error. When I’m logged in it work normally.)

Maybe the Codecov team can figure what the difference is between the repos?

---

<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:** [February 4, 2021, 3:23pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/9 "2021-02-04T15:23:10Z")

</div>

Hi @RobertoRoos, apologies, I had meant to update this thread that we are investigating from our side. Thank you so much for the extra data there.

---

<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:** [March 2, 2021, 5:04pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/11 "2021-03-02T17:04:37Z")

</div>

Hi @RobertoRoos, would you be able to see if you still run into the issue? We have deployed a fix here.

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [March 3, 2021, 7:28am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/12 "2021-03-03T07:28:37Z")

</div>

Thank you for getting back at this.

I can view my project normally (at [https://codecov.io/bb/roberto-r/uptime-tester/](https://codecov.io/bb/roberto-r/uptime-tester/)), and I can view the Commits, Branches, Pulls and Compare tabs. On the Settings tab however, I now get an “Unauthorized” error:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/f/f3ecc2f21f13fb333c570b244e65996d67fec3c2.png)  
(Yes, I am admin of that BB repo.)

Still, if I go to a settings URL directly (without the ‘app’ subdomain) I can view the settings: [https://codecov.io/bb/roberto-r/uptime-tester/settings/badge](https://codecov.io/bb/roberto-r/uptime-tester/settings/badge)

So a partial improvement?

Note that I am also denied access to private repos of other teams in Codecov I do have access to in Bitbucket.

---

<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:** [March 9, 2021, 1:25am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/13 "2021-03-09T01:25:23Z")

</div>

@RobertoRoos, got it. I’ll bring this up with the product team. Thanks for the update.

---

<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:** [April 5, 2021, 6:31pm UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/14 "2021-04-05T18:31:50Z")

</div>

@RobertoRoos we made a few fixes here, is this still an issue for you?

---

<div class="post-metadata">

**Author:** ![RobertoRoos](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/robertoroos/32/1416_2.png) [@RobertoRoos](https://community.codecov.com/u/RobertoRoos)\
**Post date:** [April 6, 2021, 6:22am UTC](https://community.codecov.com/t/error-500-when-accessing-settings-of-bitbucket-repository/2418/15 "2021-04-06T06:22:34Z")

</div>

Yes, that’s fixed it! All the pages can now be viewed normally!

Thank you and your team for your work.
