csgdotson opened a new issue #17540:
URL: https://github.com/apache/airflow/issues/17540


   Possibly related to installing LDAP authentication, this error appears 
almost randomly in the UI in permissions.py when role.permissions are 
established. Airflow instance is installed behind a self signed certificate.  
Visiting any airflow page may randomly display this error. Refreshing the page 
bypasses the error.
   
   **Apache Airflow version**:
   2.1.2
   
   **Apache Airflow Provider versions** (please include all providers that are 
relevant to your bug):
   apache-airflow-providers-celery==2.0.0
   apache-airflow-providers-elasticsearch==2.0.2
   apache-airflow-providers-ftp==2.0.0
   apache-airflow-providers-http==2.0.0
   apache-airflow-providers-imap==2.0.0
   apache-airflow-providers-postgres==2.0.0
   apache-airflow-providers-sqlite==2.0.0
   
   **Environment**:
   RHEL 7.9 on vmware
   
   **What happened**:
   Browse random Airflow UI pages and this is the result:
   Ooops!
   Something bad has happened.
   Please consider letting us know by creating a bug report using GitHub.
   
   Python version: 3.6.8
   Airflow version: 2.1.2
   Node: [snip]
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/app.py", line 2447, 
in wsgi_app
       response = self.full_dispatch_request()
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/app.py", line 1952, 
in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/app.py", line 1821, 
in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/_compat.py", line 
39, in reraise
       raise value
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/app.py", line 1950, 
in full_dispatch_request
       rv = self.dispatch_request()
     File "[snip]/.venv/lib64/python3.6/site-packages/flask/app.py", line 1936, 
in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "[snip]/.venv/lib64/python3.6/site-packages/airflow/www/auth.py", 
line 34, in decorated
       return func(*args, **kwargs)
     File "[snip]/.venv/lib64/python3.6/site-packages/airflow/www/views.py", 
line 598, in index
       user_permissions = 
current_app.appbuilder.sm.get_current_user_permissions()
     File "[snip]/.venv/lib64/python3.6/site-packages/airflow/www/security.py", 
line 273, in get_current_user_permissions
       {(perm_view.permission.name, perm_view.view_menu.name) for perm_view in 
role.permissions}
     File "[snip]/.venv/lib64/python3.6/site-packages/airflow/www/security.py", 
line 273, in <setcomp>
       {(perm_view.permission.name, perm_view.view_menu.name) for perm_view in 
role.permissions}
   AttributeError: 'NoneType' object has no attribute 'name
   
   **What you expected to happen**:
   Render the requested page correctly.
   
   **How to reproduce it**:
   Randomly visit any airflow page in the UI. 
   
   **Anything else we need to know**:
   Appears to be random, but frequently, maybe about every 5 page visits. Could 
be session related? Or cache?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to