good92 opened a new issue, #41901:
URL: https://github.com/apache/airflow/issues/41901

   ### Apache Airflow version
   
   2.9.3
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After dleteion and recreation of the user admin to change its password, 
Airflow is no more accessible and fails with:
   `
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/fab/auth_manager/fab_auth_manager.py",
 line 183, in is_logged_in                                                      
              │
   │     return not self.get_user().is_anonymous                                
                                                                                
                                                     
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/werkzeug/local.py", line 
316, in __get__                                                                 
                                             
   │     obj = instance._get_current_object()                                   
                                                                                
                                                     
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/werkzeug/local.py", line 
520, in _get_current_object                                                     
                                             
   │     return get_name(local())  # type: ignore                               
                                                                                
                                                     
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_login/utils.py", line 
25, in <lambda>                                                                 
                                         
   │     current_user = LocalProxy(lambda: _get_user())                         
                                                                                
                                                    
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_login/utils.py", line 
370, in _get_user                                                               
                                         
   │     current_app.login_manager._load_user()                                 
                                                                                
                                                    
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_login/login_manager.py",
 line 364, in _load_user                                                        
                                       
   │     user = self._user_callback(user_id)                                    
                                                                                
                                                     
   │   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/fab/auth_manager/security_manager/override.py",
 line 1553, in load_user                                                        
     │
   │     if user.is_active:                                                     
                                                                                
                                                      AttributeError: 
'NoneType' object has no attribute 'is_active'     `
   
   ### What you think should happen instead?
   
   Airflow should be accessible and present the login form or a use full error 
to fix the user configuration - session reset,
   after admin user recreation.
   
   
   ### How to reproduce
   
   airflow users delete -u admin
   airflow users create --username admin --password admin --role Admin 
--firstname admin --lastname admin --email [email protected]
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==8.25.0
   apache-airflow-providers-celery==3.7.2
   apache-airflow-providers-cncf-kubernetes==8.3.3
   apache-airflow-providers-common-io==1.3.2
   apache-airflow-providers-common-sql==1.14.2
   apache-airflow-providers-docker==3.12.2
   apache-airflow-providers-elasticsearch==5.4.1
   apache-airflow-providers-fab==1.2.2
   apache-airflow-providers-ftp==3.10.0
   apache-airflow-providers-google==10.21.0
   apache-airflow-providers-grpc==3.5.2
   apache-airflow-providers-hashicorp==3.7.1
   apache-airflow-providers-http==4.12.0
   apache-airflow-providers-imap==3.6.1
   apache-airflow-providers-microsoft-azure==10.2.0
   apache-airflow-providers-mysql==5.6.2
   apache-airflow-providers-odbc==4.6.2
   apache-airflow-providers-openlineage==1.9.1
   apache-airflow-providers-postgres==5.11.2
   apache-airflow-providers-redis==3.7.1
   apache-airflow-providers-sendgrid==3.5.1
   apache-airflow-providers-sftp==4.10.2
   apache-airflow-providers-slack==8.7.1
   apache-airflow-providers-smtp==1.7.1
   apache-airflow-providers-snowflake==5.6.0
   apache-airflow-providers-sqlite==3.8.1
   apache-airflow-providers-ssh==3.11.2
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
     image:
       repository: apache/airflow
       tag: slim-2.9.3-python3.11
   
   with argocd configuration and K8sexecutor
   
   ### Anything else?
   
   unable to connect and reset the configuration
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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