-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Closed
Labels
Description
Apache Airflow version
3.1.1
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
I recently updated Airflow from 3.1.0 to 3.1.1 without changing anything else.
When I go to the login page, I get the following error:
Internal Server Error
This may be related to #57534
Here is the stacktrace:
airflow: 2025-10-30T08:21:03.323764Z [error ] Exception on /login/ [GET] [airflow.providers.fab.www.app] loc=app.py:1744
airflow: Traceback (most recent call last):
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
airflow: ctx.push()
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/flask/ctx.py", line 375, in push
airflow: self.session = session_interface.open_session(self.app, self.request)
airflow: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/flask/sessions.py", line 363, in open_session
airflow: s = self.get_signing_serializer(app)
airflow: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/flask/sessions.py", line 353, in get_signing_serializer
airflow: return URLSafeTimedSerializer(
airflow: ^^^^^^^^^^^^^^^^^^^^^^^
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/itsdangerous/serializer.py", line 222, in __init__
airflow: self.is_text_serializer: bool = is_text_serializer(serializer)
airflow: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: File "/home/airflow/.local/lib/python3.11/site-packages/itsdangerous/serializer.py", line 39, in is_text_serializer
airflow: return isinstance(serializer.dumps({}), str)
airflow: ^^^^^^^^^^^^^^^^
airflow: AttributeError: '_LazySafeSerializer' object has no attribute 'dumps'
airflow: INFO: 35.191.79.16:37756 - "GET /auth/login/?next=https://preprod.airflow.xxxxxxx.org/home HTTP/1.1" 500 Internal Se>
airflow: ERROR: Exception in ASGI application
airflow: + Exception Group Traceback (most recent call last):
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in >
airflow: | result = await app( # type: ignore[func-returns-value]
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/fastapi/applications.py", line 1082, in __call__
airflow: | await super().__call__(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/applications.py", line 113, in __call__
airflow: | await self.middleware_stack(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
airflow: | raise exc
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
airflow: | await self.app(scope, receive, _send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 29, in __call__
airflow: | await responder(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 130, in __call__
airflow: | await super().__call__(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 46, in __call__
airflow: | await self.app(scope, receive, self.send_with_compression)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
airflow: | await self.app(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
airflow: | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
airflow: | raise exc
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
airflow: | await app(scope, receive, sender)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 716, in __call__
airflow: | await self.middleware_stack(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 736, in app
airflow: | await route.handle(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 462, in handle
airflow: | await self.app(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/fastapi/applications.py", line 1082, in __call__
airflow: | await super().__call__(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/applications.py", line 113, in __call__
airflow: | await self.middleware_stack(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
airflow: | raise exc
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
airflow: | await self.app(scope, receive, _send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
airflow: | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
airflow: | raise exc
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
airflow: | await app(scope, receive, sender)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 716, in __call__
airflow: | await self.middleware_stack(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 736, in app
airflow: | await route.handle(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/routing.py", line 462, in handle
airflow: | await self.app(scope, receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/wsgi.py", line 81, in __call__
airflow: | await responder(receive, send)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/wsgi.py", line 106, in __call__
airflow: | async with anyio.create_task_group() as task_group:
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
airflow: | raise BaseExceptionGroup(
airflow: | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
airflow: +-+---------------- 1 ----------------
airflow: | Traceback (most recent call last):
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
airflow: | ctx.push()
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/ctx.py", line 375, in push
airflow: | self.session = session_interface.open_session(self.app, self.request)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/sessions.py", line 363, in open_session
airflow: | s = self.get_signing_serializer(app)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/sessions.py", line 353, in get_signing_serializer
airflow: | return URLSafeTimedSerializer(
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/itsdangerous/serializer.py", line 222, in __init__
airflow: | self.is_text_serializer: bool = is_text_serializer(serializer)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/itsdangerous/serializer.py", line 39, in is_text_seria>
airflow: | return isinstance(serializer.dumps({}), str)
airflow: | ^^^^^^^^^^^^^^^^
airflow: | AttributeError: '_LazySafeSerializer' object has no attribute 'dumps'
airflow: |
airflow: | During handling of the above exception, another exception occurred:
airflow: |
airflow: | Traceback (most recent call last):
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/wsgi.py", line 109, in __call__
airflow: | await anyio.to_thread.run_sync(self.wsgi, environ, self.start_response)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
airflow: | return await get_async_backend().run_sync_in_worker_thread(
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2485, in run_sync_i>
airflow: | return await future
airflow: | ^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 976, in run
airflow: | result = context.run(func, *args)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/starlette/middleware/wsgi.py", line 147, in wsgi
airflow: | for chunk in self.app(environ, start_response):
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 2552, in __call__
airflow: | return self.wsgi_app(environ, start_response)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 2532, in wsgi_app
airflow: | response = self.handle_exception(e)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 1727, in handle_exception
airflow: | server_error = self.ensure_sync(handler)(server_error)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/airflow/providers/fab/www/views.py", line 82, in show_>
airflow: | return render_template("airflow/traceback.html"), 500
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/templating.py", line 147, in render_template
airflow: | return _render(app, template, context)
airflow: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/templating.py", line 128, in _render
airflow: | app.update_template_context(context)
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 997, in update_template_context
airflow: | context.update(func())
airflow: | ^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask_login/utils.py", line 405, in _user_context_proc>
airflow: | return dict(current_user=_get_user())
airflow: | ^^^^^^^^^^^
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask_login/utils.py", line 370, in _get_user
airflow: | current_app.login_manager._load_user()
airflow: | File "/home/airflow/.local/lib/python3.11/site-packages/flask_login/login_manager.py", line 362, in _load_user
airflow: | user_id = session.get("_user_id")
airflow: | ^^^^^^^^^^^
airflow: | AttributeError: 'NoneType' object has no attribute 'get'
airflow: +------------------------------------
What you think should happen instead?
The login page should be displayed
How to reproduce
This issue occurs when I navigate to https://my-airflow-domain.com/home
Operating System
Debian 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
I use LDAP authentication, configured in the webserver_config.py
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct