I am trying to get my Quart app working with flask_oidc_ext but it fails. Is it because there is no asyncio support for flask_oidc_ext? I use import quart.flask_patch but it does not help. Any help is greatly appreciated.
When I start the server and navigate to http://localhost:8080, I am redirected to the login page provided by Keycloak. This works as expected. However, after I am authenticated, I see the following error:
[2021-05-04 16:03:25,067] Error in ASGI Framework
Traceback (most recent call last):
File "../venv/lib/python3.7/site-packages/hypercorn/asyncio/context.py", line 39, in _handle
await invoke_asgi(app, scope, receive, send)
File "../venv/lib/python3.7/site-packages/hypercorn/utils.py", line 239, in invoke_asgi
await app(scope, receive, send)
File "../venv/lib/python3.7/site-packages/quart/app.py", line 2069, in __call__
await self.asgi_app(scope, receive, send)
File "../venv/lib/python3.7/site-packages/quart/app.py", line 2092, in asgi_app
await asgi_handler(receive, send)
File "../venv/lib/python3.7/site-packages/quart/asgi.py", line 31, in __call__
_raise_exceptions(done)
File "../venv/lib/python3.7/site-packages/quart/asgi.py", line 234, in _raise_exceptions
raise task.exception()
File "../lib/python3.7/asyncio/tasks.py", line 223, in __step
result = coro.send(None)
File "../venv/lib/python3.7/site-packages/quart/asgi.py", line 79, in handle_request
await asyncio.wait_for(self._send_response(send, response), timeout=timeout)
File "../lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "../lib/python3.7/asyncio/futures.py", line 178, in result
raise self._exception
File "../lib/python3.7/asyncio/tasks.py", line 223, in __step
result = coro.send(None)
File "../venv/lib/python3.7/site-packages/quart/asgi.py", line 93, in _send_response
async for data in body:
File "../venv/lib/python3.7/site-packages/quart/wrappers/response.py", line 124, in _aiter
for data in iterable: # type: ignore
TypeError: 'coroutine' object is not iterable
Hello,
I followed the link: https://github.com/pgjones/quart/issues/103 and found it is closed.
I am trying to get my Quart app working with flask_oidc_ext but it fails. Is it because there is no asyncio support for flask_oidc_ext? I use import quart.flask_patch but it does not help. Any help is greatly appreciated.
test_oidc.py:
When I start the server and navigate to http://localhost:8080, I am redirected to the login page provided by Keycloak. This works as expected. However, after I am authenticated, I see the following error: