You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/10 18:30:03 UTC

[GitHub] [airflow] csgdotson opened a new issue #17540: Airflow 2.1.2 AttributeError: 'NoneType' object has no attribute 'name'

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] csgdotson commented on issue #17540: Airflow 2.1.2 AttributeError: 'NoneType' object has no attribute 'name'

Posted by GitBox <gi...@apache.org>.
csgdotson commented on issue #17540:
URL: https://github.com/apache/airflow/issues/17540#issuecomment-896243382


   Can this DB error from the log be related? 
   ```
   Aug  9 03:29:53 airflow-webserver: [SQL: INSERT INTO ab_permission (id, name) VALUES (nextval('ab_permission_id_seq'), %(name)s) RETURNING ab_permission.id]
   Aug  9 03:29:53 airflow-webserver: [parameters: {'name': 'userinfoedit'}]
   Aug  9 03:29:53 airflow-webserver: (Background on this error at: http://sqlalche.me/e/13/f405)
   ```
   
   If so, and this is simply a database permission issue, I don't understand how this error isn't consistently generated.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] csgdotson commented on issue #17540: Airflow 2.1.2 AttributeError: 'NoneType' object has no attribute 'name'

Posted by GitBox <gi...@apache.org>.
csgdotson commented on issue #17540:
URL: https://github.com/apache/airflow/issues/17540#issuecomment-896269846


   Yes, this is resolved, not a bug. The issue was a bad permission group on the ab_permission table. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] csgdotson closed issue #17540: Airflow 2.1.2 AttributeError: 'NoneType' object has no attribute 'name'

Posted by GitBox <gi...@apache.org>.
csgdotson closed issue #17540:
URL: https://github.com/apache/airflow/issues/17540


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #17540: Airflow 2.1.2 AttributeError: 'NoneType' object has no attribute 'name'

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17540:
URL: https://github.com/apache/airflow/issues/17540#issuecomment-896218772


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org