Blank page upon GitHub sign in, unable to sign in

This user can’t seem to log in:

She’s tried using multiple browsers, while authenticated with GitHub, and she says she just can’t log in, and hasn’t been able to for months now. When she clicks the “sign in with GitHub” button while currently signed into her GitHub account, she just gets a blank page.

I’ve tried impersonating her account and logging out to see if I could fix the issue. Do you have any other ideas?

Thanks for your help with this!


Could you take a peek either this week or early next week @techapj?

1 Like

Two off the cuff questions.

  1. On Github, in her Profile > Emails section, does she have an email marked as Primary? (if not, have her mark one as Primary)
  2. Does she have “Keep my email address private” checked? (if yes, can she uncheck it?)

Last thought, while at her Profile, have her go into Authorized Applications and revoke the access for your Discourse instance. That way it will request that access again at her next signin attempt.


Here is her response:

I have made the suggested changes to my github profile preferences – my email is now public instead of private – it was already the primary email.

I’ve also tried revoking access to the FCC forum, after I tried to sign-up for the forum again it resulted in another blank pop-up window. After that I thought I’d try to use the sign-in button since github showed that the FCC forum was now authorized, but that only results in another blank pop-up window.

Note that she was able to use GitHub login to create an account on this meta instance of Discourse, though.

1 Like

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

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 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:

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:<github_user_id>

Try to find out how this ID got linked to mandihamza :thinking:

The actual github_user_id for that user is 22196001, and I can verify that from this URL:

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

GithubUserInfo.where(user_id: 13460).destroy_all

And ask her to login via GitHub again.