# Blank page upon GitHub sign in, unable to sign in

**URL:** <https://meta.discourse.org/t/blank-page-upon-github-sign-in-unable-to-sign-in/52474>\
**Category:** Product Support\
**Created:** [4 Novembre 2016, 5:39am UTC](https://meta.discourse.org/t/blank-page-upon-github-sign-in-unable-to-sign-in/52474 "2016-11-04T05:39:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [8 Novembre 2016, 7:46am UTC](https://meta.discourse.org/t/blank-page-upon-github-sign-in-unable-to-sign-in/52474/5 "2016-11-08T07:46:39Z")

</div>

Okay, I looked into the error logs and found the relevant error:

```plaintext
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_github_user_infos_on_user_id"
DETAIL: Key (user_id)=(13460) already exists.
: INSERT INTO "github_user_infos" ("user_id", "screen_name", "github_user_id", "created_at", "updated_at") VALUES (13460, 'mandihamza', 22196001, '2016-11-07 08:41:11.402380', '2016-11-07 08:41:11.402380') RETURNING "id")
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/patches/db/pg.rb:90:in `exec'

```

This error pops up when [`GithubAuthenticator`](https://github.com/discourse/discourse/blob/fdc89b1735f32c86badb346d201b978eb0803f53/lib/auth/github_authenticator.rb#L28) library tries to create a new `GithubUserInfo` record.

It seems like the `github_user_id` we are receiving from GitHub is not matching the existing Discourse user record. I will start with looking up the existing `GithubUserInfo` record:

```plaintext
GithubUserInfo.find_by(user_id: 13460)

```

And check if the `github_user_id` is present. If it’s present, find out GitHub account detail of that ID, via this URL:

`https://api.github.com/user/<github_user_id>`

Try to find out how this ID got linked to `mandihamza` 🤔

The actual `github_user_id` for that user is `22196001`, and I can verify that from this URL: [https://api.github.com/user/22196001](https://api.github.com/user/22196001)

The only solution I can think of here is to delete the existing `GithubUserInfo` record for that user:

```plaintext
GithubUserInfo.where(user_id: 13460).destroy_all

```

And ask her to login via GitHub again.

---

_[View the full topic](https://meta.discourse.org/t/blank-page-upon-github-sign-in-unable-to-sign-in/52474)._
