MaluNoPeleke commented on issue #59334:
URL: https://github.com/apache/airflow/issues/59334#issuecomment-3645967854

   Same problem for us with 3.1.4:
   
   ```
   [2025-12-12T10:43:47.855610Z] {base_auth_manager.py:107} ERROR - JWT token 
is not valid: Signature has expired
   INFO:     192.168.143.2:33500 - "GET /favicon.ico HTTP/1.1" 500 Internal 
Server Error
   ERROR:    Exception in ASGI application
     + Exception Group Traceback (most recent call last):
     |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_utils.py", line 
79, in collapse_excgroups
     |     yield
     |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py",
 line 183, in __call__
     |     async with anyio.create_task_group() as task_group:
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^
     |   File 
"/home/airflow/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py",
 line 783, in __aexit__
     |     raise BaseExceptionGroup(
     | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
     +-+---------------- 1 ----------------
       | Traceback (most recent call last):
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py",
 line 409, in run_asgi
       |     result = await app(  # type: ignore[func-returns-value]
       |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/fastapi/applications.py", 
line 1082, in __call__
       |     await super().__call__(scope, receive, send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/applications.py", 
line 113, in __call__
       |     await self.middleware_stack(scope, receive, send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 186, in __call__
       |     raise exc
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 164, in __call__
       |     await self.app(scope, receive, _send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 29, in __call__
       |     await responder(scope, receive, send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 130, in __call__
       |     await super().__call__(scope, receive, send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 46, in __call__
       |     await self.app(scope, receive, self.send_with_compression)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/cors.py",
 line 85, in __call__
       |     await self.app(scope, receive, send)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py",
 line 182, in __call__
       |     with recv_stream, send_stream, collapse_excgroups():
       |                                    ^^^^^^^^^^^^^^^^^^^^
       |   File "/usr/python/lib/python3.12/contextlib.py", line 158, in 
__exit__
       |     self.gen.throw(value)
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_utils.py", line 
85, in collapse_excgroups
       |     raise exc
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py",
 line 184, in __call__
       |     response = await self.dispatch_func(request, call_next)
       |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/middlewares/refresh_token.py",
 line 45, in dispatch
       |     new_user = await self._refresh_user(current_token)
       |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/middlewares/refresh_token.py",
 line 67, in _refresh_user
       |     user = await resolve_user_from_token(current_token)
       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/security.py",
 line 101, in resolve_user_from_token
       |     raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, 
detail="Token Expired")
       | fastapi.exceptions.HTTPException: 401: Token Expired
       +------------------------------------
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py",
 line 409, in run_asgi
       result = await app(  # type: ignore[func-returns-value]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/fastapi/applications.py", 
line 1082, in __call__
       await super().__call__(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/applications.py", 
line 113, in __call__
       await self.middleware_stack(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 186, in __call__
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 164, in __call__
       await self.app(scope, receive, _send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 29, in __call__
       await responder(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 130, in __call__
       await super().__call__(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 46, in __call__
       await self.app(scope, receive, self.send_with_compression)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/cors.py",
 line 85, in __call__
       await self.app(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py",
 line 182, in __call__
       with recv_stream, send_stream, collapse_excgroups():
                                      ^^^^^^^^^^^^^^^^^^^^
     File "/usr/python/lib/python3.12/contextlib.py", line 158, in __exit__
       self.gen.throw(value)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_utils.py", line 
85, in collapse_excgroups
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py",
 line 184, in __call__
       response = await self.dispatch_func(request, call_next)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/middlewares/refresh_token.py",
 line 45, in dispatch
       new_user = await self._refresh_user(current_token)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/middlewares/refresh_token.py",
 line 67, in _refresh_user
       user = await resolve_user_from_token(current_token)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/security.py",
 line 101, in resolve_user_from_token
       raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, 
detail="Token Expired")
   ```


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