Dear all,
I am running a otree 3.3.11 experiment (due to compatibility with some older code) and am encountering some strange behaviour, where participants sometimes get stuck on wait pages. They are not advanced after all members of the group arrive, however reloading the page client-side forwards them to the appropriate page. Thus they somehow seem to get disconnected from the server.
The logs in the server report issues such as:
Error in ASGI Framework
Traceback (most recent call last):
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/hypercorn_otree/asyncio/spawn_app.py", line 14, in _handle
await invoke_asgi(app, scope, receive, send)
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/hypercorn_otree/utils.py", line 199, in invoke_asgi
await asgi_instance(receive, send)
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/channels/sessions.py", line 183, in __call__
return await self.inner(receive, self.send)
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/channels/middleware.py", line 41, in coroutine_call
await inner_instance(receive, send)
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/channels/consumer.py", line 59, in __call__
[receive, self.channel_receive], self.dispatch
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/channels/utils.py", line 51, in await_many_dispatch
await dispatch(result)
File "/Users/alex/anaconda3/envs/otree_timedemand/lib/python3.7/site-packages/channels/consumer.py", line 75, in dispatch
raise ValueError("No handler for message type %s" % message["type"])
ValueError: No handler for message type wait_page_ready
or:
ERROR Task exception was never retrieved
future: <Task finished coro=<WSStream._cancel_due_to_timeout() done, defined at /app/.heroku/python/lib/python3.7/site-packages/hypercorn_otree/protocol/ws_stream.py:351> exception=LocalProtocolError('Connection cannot be closed in state ConnectionState.LOCAL_CLOSING')>
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/hypercorn_otree/protocol/ws_stream.py", line 352, in _cancel_due_to_timeout
await self._send_wsproto_event(CloseConnection(code=CloseReason.ABNORMAL_CLOSURE))
File "/app/.heroku/python/lib/python3.7/site-packages/hypercorn_otree/protocol/ws_stream.py", line 320, in _send_wsproto_event
data = self.connection.send(event)
File "/app/.heroku/python/lib/python3.7/site-packages/wsproto/connection.py", line 100, in send
"Connection cannot be closed in state %s" % self.state
wsproto.utilities.LocalProtocolError: Connection cannot be closed in state ConnectionState.LOCAL_CLOSING
This leads me to belief that this is some error with ASGI / hypercorn / Django Channels. Any Idea what the concrete issue might be and on how I might be able to fix this?
Package Version
-------------------- --------
asgiref 3.2.7
colorama 0.4.1
dj-database-url 0.5.0
Django 2.2.12
django-vanilla-views 1.0.6
h11 0.12.0
h2 4.0.0
hpack 4.0.0
hyperframe 6.0.1
otree 3.3.11
pip 20.1.1
priority 2.0.0
psycopg2 2.8.6
pytz 2019.2
setuptools 47.1.1
sqlparse 0.4.2
termcolor 1.1.0
toml 0.10.2
typing-extensions 3.10.0.2
wheel 0.34.2
whitenoise 4.1.3
wsproto 1.0.0