Get "400 Bad Request" when attempting to "authorize account" cannot use the Trello GitHub Powerup
Asked by Colin May:

I'm trying to use the github power up with trello but consistently get this error when I try to link my github account. All of my team also get this issue and it's only recently started happening, we were able to use this Power Up no problems a few weeks ago.

<br />

1) I select "Authorize Account"  

![Screenshot 2020-08-24 at 17.48.59.png](https://community.atlassian.com/t5/image/serverpage/image-id/107737i0684E7AC5B9AEC2E/image-dimensions/292x397?v=v2 "Screenshot 2020-08-24 at 17.48.59.png")

2) I click on "Link Your Github Account"  

![Screenshot 2020-08-24 at 17.50.20.png](https://community.atlassian.com/t5/image/serverpage/image-id/107738iBA374B37503F1551/image-dimensions/288x421?v=v2 "Screenshot 2020-08-24 at 17.50.20.png")

3) Then a new window pops up and I see this:  

![Screenshot 2020-08-24 at 17.51.17.png](https://community.atlassian.com/t5/image/serverpage/image-id/107740i4BBB77AF2B277BA2/image-dimensions/352x289?v=v2 "Screenshot 2020-08-24 at 17.51.17.png")  

FYI:  
I'm using Chrome version:

![Screenshot 2020-08-24 at 17.54.49.png](https://community.atlassian.com/t5/image/serverpage/image-id/107741i8BC4483EF492A665/image-size/large?v=v2&px=999 "Screenshot 2020-08-24 at 17.54.49.png")

And I've checked the following browser setting: I have enabled local storage as per the steps here: <https://help.trello.com/article/1093-enabling-localstorage>.  

I don't think we have changed anything recently to have this stop working. Any help is much appreciated.   

P.S. I also saw issue [https://community.atlassian.com/t5/Trello-questions/Some-team-members-consistently-get-quot-400-Bad-Request-quot-and/qaq-p/1462857?utm_source=atlcomm\&utm_medium=email\&utm_campaign=immediate_general_reply\&utm_content=topic#U1464141](https://community.atlassian.com/t5/Trello-questions/Some-team-members-consistently-get-quot-400-Bad-Request-quot-and/qaq-p/1462857?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_reply&utm_content=topic#U1464141) which looks similar, but raised by own ticket so I didn't hijack that thread.  

Thx in advance, let me know if you need any more information from me!  


Answers:
author: Jireh
body: Hi Colin,

Thanks for reporting this problem. We've had similar reports before and are working hard to figure out the problem.

If you've contacted support, they maybe have asked you to try things like clearing your browser cache, or removing personal settings on the Power-Up and re-authing.

If none of those worked, could you try clearing your localstorage for the "github.trello.services" domain? I've attached a screenshot of where you can find that on Chrome (should be similar for other browsers though).

![Screen Shot 2020-08-25 at 5.19.13 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/107940i656FA8F7F11D9065/image-dimensions/422x296?v=v2 "Screen Shot 2020-08-25 at 5.19.13 PM.png")

Also, we are trying to collect as much information about these errors as possible, and we rely on users like you who report them.

When you do encounter these errors, could you try having the network tab open when they happen? Filter down to only ones related to github. Failed requests will have red names. If you could, take a screenshot of the "Headers" and "Preview" tabs of the failed requests.

![Screen Shot 2020-08-13 at 12.31.19 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/107941i8A2BE6FA0F2ED9A2/image-dimensions/313x338?v=v2 "Screen Shot 2020-08-13 at 12.31.19 PM.png")

And finally, any console logs relating to the failures would be appreciated too.

Thanks,

Jireh

comments: author: Colin May
body: Hi,

Thx for responding... my replies inline...  

> If you've contacted support, they maybe have asked you to try things like clearing your browser cache, or removing personal settings on the Power-Up and re-authing.

I have tried the above and it does not seem to fix it.
> If none of those worked, could you try clearing your localstorage for the "github.trello.services" domain? I've attached a screenshot of where you can find that on Chrome (should be similar for other browsers though).

I have tried the above and it does not seem to fix it.
> Also, we are trying to collect as much information about these errors as possible, and we rely on users like you who report them.
>
> When you do encounter these errors, could you try having the network tab open when they happen? Filter down to only ones related to github. Failed requests will have red names. If you could, take a screenshot of the "Headers" and "Preview" tabs of the failed requests.

Here is the screenshots you wanted:

![Screenshot 2020-08-26 at 18.06.07.png](https://community.atlassian.com/t5/image/serverpage/image-id/108089i77BDA11AF5E79834/image-size/large?v=v2&px=999 "Screenshot 2020-08-26 at 18.06.07.png")

![Screenshot 2020-08-26 at 18.06.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/108090i10876FFD7DCCD4D8/image-size/large?v=v2&px=999 "Screenshot 2020-08-26 at 18.06.34.png")
> And finally, any console logs relating to the failures would be appreciated too.

![Screenshot 2020-08-26 at 18.07.13.png](https://community.atlassian.com/t5/image/serverpage/image-id/108091iB0AC46CD1172B65E/image-size/large?v=v2&px=999 "Screenshot 2020-08-26 at 18.07.13.png")


author: Jireh
body: Hi Colin,

Thanks for those screenshots. While I am still investigating the issue, I do have a theory.

It's possible to receive a 400 error from a server if the cookies in the request header are too large. And judging from the screenshot you provided, it's possible that this is happening.

Could you try deleting all cookies on your browser from the "github.trello.services" domain, then trying to re-auth Github again? If you're on Chrome, you can do that by going to "<chrome://settings/cookies/detail?site=github.trello.services>" and pressing "Remove All".

And if that doesn't work, you can try removing all cookies from all domains on your browser, then trying to auth again.

Thanks again,

Jireh


author: Colin May
body: Awesome! That worked like a charm! Thx!


Tags: github

power-up