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

ERROR:asyncio:Task exception was never retrieved #237

Closed
hainm opened this issue Jun 13, 2019 · 6 comments · Fixed by #525
Closed

ERROR:asyncio:Task exception was never retrieved #237

hainm opened this issue Jun 13, 2019 · 6 comments · Fixed by #525

Comments

@hainm
Copy link

hainm commented Jun 13, 2019

hi,
I am trying voila (latest release from conda-forge). It's pretty nice.
The error is not serious but I still see a series of warning/error in terminal:

[Voila] Kernel shutdown: 82a56940-98ac-4280-9376-41f2d80fbe27
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /scr2/nguyen/miniconda3/lib/python3.7/site-packages/tornado/websocket.py:1102> exception=WebSocketClosedError()>
Traceback (most recent call last):
  File "/scr2/nguyen/miniconda3/lib/python3.7/site-packages/tornado/websocket.py", line 1104, in wrapper
    await fut
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/scr2/nguyen/miniconda3/lib/python3.7/site-packages/tornado/websocket.py", line 1106, in wrapper
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
WARNING:tornado.general:Got events for closed stream None

cheers

@maartenbreddels
Copy link
Member

Yeah, thansk for opening this issue, I've almost become blind to that warning. My guess is this is an issue upstream in jupyter_server. In any case, we keep this open until fixes.

@jtpio
Copy link
Member

jtpio commented Jan 27, 2020

This seems to be triggered by:

The shutdown call doesn't make it to the server all the time (especially with Firefox), which leads to other issues such as memory consumption (as already mentioned in #173, #209, #479).

But when it does, a request to shut down the kernel is sent over Websocket, but the browser tab is closed immediately after, closing the WS connection abruptly.

@maartenbreddels
Copy link
Member

So the websocket is closed from the browser side before the shutdown is send, maybe the shutdown call is async?

@jtpio
Copy link
Member

jtpio commented Jan 27, 2020

We might actually want to dispose the kernel with kernel.dispose() in the beforeunload handler, which should clear the socket properly.

@jtpio
Copy link
Member

jtpio commented Jan 27, 2020

Opened #525.

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

Successfully merging a pull request may close this issue.

3 participants