mher / flower

Real-time monitor and web admin for Celery distributed task queue
https://flower.readthedocs.io
Other
6.5k stars 1.09k forks source link

Error when reloading page after unauthorized login: tornado.httpclient.HTTPClientError: HTTP 400: Bad Request #1404

Open philippgoehl opened 4 weeks ago

philippgoehl commented 4 weeks ago

Describe the bug When using OAuth and logging in with an unauthorized user (tested using Google OAuth) at first an error message is displayed. When reloading the page the following Error Message (find below) is displayed.

To Reproduce Steps to reproduce the behavior:

  1. Use Google OAuth as authentication
  2. Login with a Google Account that is unauthorized
  3. Receiving an error message in the Flower UI
  4. Reload the page
  5. Error is thrown

Expected behavior No Error? It was suggested to open an issue - so here it is :)

Error Message

flower   -> flower:2.0.0 tornado:6.4.1 humanize:4.11.0
software -> celery:5.4.0 (opalescent) kombu:5.4.2 py:3.12.6
            billiard:4.2.1 py-amqp:5.2.0
platform -> system:Linux arch:64bit
            kernel version:5.15.49-linuxkit-pr imp:CPython
loader   -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled

deprecated_settings: None

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tornado/web.py", line 1790, in _execute
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flower/views/auth.py", line 44, in get
    user = await self.get_authenticated_user(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tornado/auth.py", line 987, in get_authenticated_user
    response = await http.fetch(
               ^^^^^^^^^^^^^^^^^
tornado.httpclient.HTTPClientError: HTTP 400: Bad Request

Kind regards!