500 : Internal Server Error when i login with Google Oauth

So i am trying to deploy Jupyterhub to teach students about EEG processing. I have succesfully deployed a jupyterhub installation using the guide Adding Google OAuth and system service to a Jupyter Hub server - Python for Undergraduate Engineers, add google oauth and system service to jupyterhub on

https://lab.golembio.com

but i am stuck at google oauth stage.

I have followed the instructions step by step, and added this code to my jupyterhub_config.py:

from oauthenticator.google import LocalGoogleOAuthenticator

c.JupyterHub.authenticator_class = LocalGoogleOAuthenticator

c.LocalGoogleOAuthenticator.create_system_users = True

c.LocalGoogleOAuthenticator.hosted_domain = ['my domain name', 'my domain name']
c.LocalGoogleOAuthenticator.login_service = 'Google Login'
c.LocalGoogleOAuthenticator.oauth_callback_url = 'my domain name/oauth_callback'
c.LocalGoogleOAuthenticator.oauth_client_id = 'xxxx'
c.LocalGoogleOAuthenticator.oauth_client_secret = 'xxxxx'
#c.JupyterHub.cookie_secret_file = 'my cookie secret'
c.Authenticator.add_user_cmd = ['adduser', '-q', '--gecos', '""', '--disabled-password', '--force-badname']

So at first when i opened the lab there is an option to log in with google but after i click it it returns an Error 400: invalid_request Missing required parameter: client_id error.

I overcame this by changing the oaut_client_id to client_id and oauth_client_secret to client_secret

But now there is a 500 internal server error, i do not know what i should do next.

It looks like the docs you’re following are over two years old so they may be out of date.

Can you show us your JupyterHub logs? A http 500 error means there was an error in JupyterHub, but it’s impossible to know what they problem is without more information.

Hi! Thanks a lot for your reply.

So i ran sudo systemctl -u jupyterhub -f command, and this is the error message on log file:
Dec 30 22:39:02 jupyter-hub jupyterhub[1104]: [W 2020-12-30 22:39:02.764 Jupyter Hub log:181] 403 GET /hub/oauth_callback?state=[secret]&code=[secret]&scope=emai l+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=[secr et]&prompt=none (@xxxxxxx) 105.70ms

Could you try enabling debug logging, and show us the complete set of logs for the login attempt? It’s not possible to guess what the error is from a single message, it’ll be helpful to see the context.

Hi Manics!

Thanks a lot, i just solved the issue by installing the tljh!