Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after login #12

Open
srdecny opened this issue Jan 27, 2021 · 1 comment
Open

Crash after login #12

srdecny opened this issue Jan 27, 2021 · 1 comment

Comments

@srdecny
Copy link
Member

srdecny commented Jan 27, 2021

I was trying to run online-text-flow-server in a docker container (fresh build from the current master, using the Dockerfile in repo). I access the application at localhost:5002/textflow in a browser on localhost, I see the login page, but after I try to login (with the default elitr/elitr login/pw), it crashes -- see the logs. The login page is inacessible after the crash.

~/r/online-text-flow on master ◦ docker run -it --rm -p 5002:5002 online-text-flow:latest /bin/sh                                                                                                                            
/ # online-text-flow server --host 0.0.0.0 --port 5002
 * Path: textflow
 * Opts: {'host': '0.0.0.0', 'port': 5002, 'debug': False, 'use_reloader': False}
 * Menu: ['en', 'de', 'cs'] 
 * Serving Quart app 'elitr.onlinetextflow.server'
 * Environment: production
 * Please use an ASGI server (e.g. Hypercorn) directly in production
 * Debug mode: False
 * Running on http://0.0.0.0:5002 (CTRL + C to quit)
[2021-01-27 22:26:20,315] Running on http://0.0.0.0:5002 (CTRL + C to quit)
[2021-01-27 22:26:27,368] 172.17.0.1:56834 GET /textflow/ 1.1 302 167 4590
[2021-01-27 22:26:27,378] 172.17.0.1:56834 GET /textflow/login 1.1 200 1559 7517
[2021-01-27 22:26:27,527] 172.17.0.1:56834 GET /favicon.ico 1.1 404 103 1310
[2021-01-27 22:26:31,550] 172.17.0.1:56834 POST /textflow/login 1.1 302 157 1944
[2021-01-27 22:26:31,554] Error in ASGI Framework
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/Hypercorn-0.11.2-py3.9.egg/hypercorn/asyncio/context.py", line 39, in _handle
    await invoke_asgi(app, scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/Hypercorn-0.11.2-py3.9.egg/hypercorn/utils.py", line 239, in invoke_asgi
    await app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/app.py", line 2117, in __call__
    await self.asgi_app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/app.py", line 2140, in asgi_app
    await asgi_handler(receive, send)
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/asgi.py", line 33, in __call__
    _raise_exceptions(done)
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/asgi.py", line 256, in _raise_exceptions
    raise task.exception()
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/asgi.py", line 84, in handle_request
    await asyncio.wait_for(self._send_response(send, response), timeout=timeout)
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 478, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/asgi.py", line 98, in _send_response
    async for data in body:
  File "/usr/local/lib/python3.9/site-packages/Quart-0.14.1-py3.9.egg/quart/wrappers/response.py", line 129, in _aiter
    for data in iterable:  # type: ignore
TypeError: 'coroutine' object is not iterable
[2021-01-27 22:26:31,555] 172.17.0.1:56834 GET /textflow/ 1.1 500 - 1878

The app was installed with python3 ./setup.py install. client and events seems to work just fine. Do you know where the error could be? It doesn't seem like the error is in the code itself, but rather in the libraries used. I see the lib versions are not pinned -- perhaps one of them got updated recently and now it's broken? I've looked at Hypercorn's and Quart's issue tracker, but nothing relevant. Could you please provide the lib versions you're using?

@srdecny
Copy link
Member Author

srdecny commented Jan 27, 2021

Using python:3.6 as the base image for the Dockerfile seems to solve this issue. it would be nice to have the Python version requirements specified, and the library versions pinned (at least >=), so we know which versions work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant