selene-backend icon indicating copy to clipboard operation
selene-backend copied to clipboard

sso.mycroft.ai account registration is broken

Open theCalcaholic opened this issue 5 years ago • 7 comments

I'm unsure which repository this issue should be created on, so I'm opening it here.

I've been trying to register an account with home.mycroft.ai. However, both, email registration and registration with Github as identity provider fail (with different errors).

Email registration

Steps to reproduce

  1. Open https://sso.mycroft.ai/new-account
  2. Fill in your email and password
  3. Click on next, then accept the terms of use and privacy policy.
  4. Click on "Create Account"

Expected result

A new account should be created that you can log into.

Actual result

The page shows a Toast with the message: "An error occurred, account not added." The Browser dev tools reveal the following error message:

Backend returned code 500, body was: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

Registration via Github

Steps to reproduce

  1. Open https://sso.mycroft.ai/new-account
  2. Select "Login with Github" and confirm the upcoming dialog
  3. Click on next, then accept the terms of use and privacy policy.
  4. Click on "Create Account"

Expected result

A new account should be created that you can log into.

Actual result

The page shows a Toast with the message: "An error occurred, account not added." The Browser dev tools reveal the following error message:

Backend returned code 400, body was: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>The browser (or proxy) sent a request that this server could not understand.</p><p><pre><code>KeyError: 'federated_token'</code></pre></p>

Tested on Chromium and Firefox.

theCalcaholic avatar Dec 17 '19 07:12 theCalcaholic

Thanks for reporting. I'll ping @chrisveilleux and will transfer the issue to one of the backend repos.

forslund avatar Dec 17 '19 07:12 forslund

Thank you. Btw, I noticed that the token transferred during registration via Github has a slightly different key than mentioned in the error message (federatedToken instead of federated_token).

theCalcaholic avatar Dec 17 '19 09:12 theCalcaholic

This is stopping me from using Mycroft.

nelsonblaha avatar Feb 12 '20 20:02 nelsonblaha

My apologies for not following up on this sooner, I hope to make some time to investigate this issue next week.

chrisveilleux avatar Feb 14 '20 19:02 chrisveilleux

Sadly it is still not possible to create an account. Any updates on this?

marhkb avatar Mar 02 '20 18:03 marhkb

@marhkb Could you provide more color on what you did to attempt account creation? The fix to the GitHub account creation issue was tested by several and is running in our production environments.

chrisveilleux avatar Mar 02 '20 20:03 chrisveilleux

I think there is a problem in the ValidateEmailEndpoint it seems to always return accountExists=False which causes a 500 Internal Server Error when trying to write the same email again to the DB (psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "account_email_address_key").

At least this fits the problem I had when I tried to register with an email I did not remember I had an account with already. So trying to reset your password instead of creating an account might help in case someone else facing a 500 error on account creation gets here before the problem is fixed.

hslr4 avatar May 05 '21 13:05 hslr4