Hi Chris -
I've had a chance to install 5.8.0b2, and to test the app which was getting these ConnectionClosedOK errors with the new version. Although the new version no longer gets the ConnectionClosedOK error, in its place I'm seeing a couple new errors:
(1) Many times per session (when running with browser bots) I get the following chain of errors in the server logs:
Exception in ASGI application
Traceback (most recent call last):
File "d:\proj\ssel-otree5\venv\lib\site-packages\anyio\streams\memory.py", line 81, in
receive
return self.receive_nowait()
File "d:\proj\ssel-otree5\venv\lib\site-packages\anyio\streams\memory.py", line 76, in
receive_nowait
raise WouldBlock
anyio.WouldBlock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\base.py", line 41
, in call_next
message = await recv_stream.receive()
File "d:\proj\ssel-otree5\venv\lib\site-packages\anyio\streams\memory.py", line 101, in
receive
raise EndOfStream
anyio.EndOfStream
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\proj\ssel-otree5\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", l
ine 377, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "d:\proj\ssel-otree5\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py",
line 75, in __call__
return await
self.app(scope, receive, send)
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\applications.py", line 119,
in __call__
await self.middleware_stack(scope, receive, send)
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\errors.py", line
181, in __call__
raise exc
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\errors.py", line
159, in __call__
await
self.app(scope, receive, _send)
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\base.py", line 63
, in __call__
response = await self.dispatch_func(request, call_next)
File "d:\proj\ssel-otree5\venv\lib\site-packages\otree\middleware.py", line 23, in disp
atch
response = await call_next(request)
File "d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\base.py", line 45
, in call_next
raise RuntimeError("No response returned.")
RuntimeError: No response returned.
(2) Occasionally (maybe once every two or three testing sessions), I get a client-side 500 error - this is the thing which worries me more, I think:
Application error (500)
RuntimeError: Unexpected ASGI message 'websocket.send', after sending 'websocket.close'.
Traceback
File d:\proj\ssel-otree5\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py, line 275, in asgi_send+
File d:\proj\ssel-otree5\venv\lib\site-packages\starlette\middleware\sessions.py, line 75, in send_wrapper+
File d:\proj\ssel-otree5\venv\lib\site-packages\starlette\websockets.py, line 69, in send+
File d:\proj\ssel-otree5\venv\lib\site-packages\starlette\websockets.py, line 137, in send_text+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\channels\utils.py, line 31, in send+
File C:\Program Files\Python37\lib\asyncio\base_events.py, line 579, in run_until_complete+
File C:\Program Files\Python37\lib\asyncio\runners.py, line 43, in run+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\channels\utils.py, line 34, in sync_send+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\channels\utils.py, line 46, in sync_group_send+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\views\abstract.py, line 1080, in _mark_completed_and_notify+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\views\abstract.py, line 913, in _run_aapa_and_notify+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\views\abstract.py, line 980, in inner_dispatch_gbat+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\views\abstract.py, line 878, in get+
File d:\proj\ssel-otree5\venv\lib\site-packages\otree\views\abstract.py, line 870, in inner_dispatch+
File d:\proj\ssel-otree5\venv\lib\site-packages\anyio\_backends\_asyncio.py, line 743, in run+
File d:\proj\ssel-otree5\venv\lib\site-packages\anyio\_backends\_asyncio.py, line 805, in run_sync_in_worker_thread+
If you're interested, I can share my code (or set up a heroku project and add you as a collaborator). Please let me know.
Thanks,
--Chris