Failed to access "/hub/authorize" with NativeAuthenticator

Hello everyone. I’ve just deployed the jupyter hub using helm chart, version 3.3.7. I’ve enabled the NativeAuthentictor following the readme of it. This is how the values.yaml is configured:

      admin_access: true
      authenticator_class: nativeauthenticator.NativeAuthenticator
      open_signup: false  # Set to false if you want to manually approve users
        - pmesserschmidt 

I would like to manually approve new users. I’m able to access the admin page, as admin user, but the “Authorize” sessions does not appear in the U

Also, and when I try to access via url “hub/authorize” the page returns 500 code error and the hub pod logs returns the following error:

[E 2024-07-07 13:21:39.704 JupyterHub web:1875] Uncaught exception GET /hub/authorize/ (::ffff:
    HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/hub/authorize/', version='HTTP/1.1', remote_ip='::ffff:')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.11/site-packages/tornado/", line 1790, in _execute
        result = await result
      File "/usr/local/lib/python3.11/site-packages/nativeauthenticator/", line 238, in get
        UserInfo.change_authorization(self.db, slug)
      File "/usr/local/lib/python3.11/site-packages/nativeauthenticator/", line 82, in change_authorization
        user.is_authorized = not user.is_authorized
    AttributeError: 'NoneType' object has no attribute 'is_authorized'

Base don the log, it seems that that the user that is returned by de sqlite query is empt. Does anyone know how to solve it? Thanks!!

Just to be clear guys, it seems that was something in my URL format. For some reason, I was typing the “hub/authorize/”, with an slash at the end. When trying to access “hub/auhtorize”, it worked. But I still don’t know why the “Authorize” button does not appear in the admin area.

Thanks anyway.

I’ve just tested Z2JH 3.3.7 and https://<HOSTNAME>/hub/authorize works for me:

Thanks!! It was a spelling error here. It’s working now!

1 Like