jupyter-server / jupyter_server

The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
https://jupyter-server.readthedocs.io
BSD 3-Clause "New" or "Revised" License
487 stars 304 forks source link

Buffered message don't replay but discarding #508

Open lumberbot-app[bot] opened 3 years ago

lumberbot-app[bot] commented 3 years ago

Hi,

Recently, I have some troubles with replaying buffered message. When running some cells, and close chrome tab. A few minutes later, reopen it. The running cells message don't show below the cells.

I have read #4105, #4110. So I run conda install -c conda-forge jupyterlab to update the version of notebook. but the problem still exists.

This is the output of jupyter troubleshoot. jupyter troubleshoot.log

This is the output of jupyter lab --debug. jupyter lab --debug.log

In jupyter lab --debug, I just open chrome tab, running cells below. When it running on cell 3, I close it, wait some minutes and reopen it. But the buffered messages don't show. jupyterlab

Does anybody know how to solve it? Thanks in advance!


Originally opened as jupyter/notebook#5243 by @NEOherozzz, migration requested by @kevin-bates

lumberbot-app[bot] commented 3 years ago

@NEOherozzz commented: Does anyone has ideas to fix this?

lumberbot-app[bot] commented 3 years ago

@amangarg96 commented: @NEOherozzz Not a fix, but a work around - do not close/refresh the chrome tab.

Once you refresh the chrome tab, the messages from the kernel do reach the browser but the cell and message mapping is lost, so the browser does not know on which cell to render the output.

To reconnect to the kernel, use the 'Reconnect to kernel' button instead - image

lumberbot-app[bot] commented 3 years ago

@lfdversluis commented: Got the same issue. I closed my browser tab because I had a long running process and turned of my pc (jupyter lab is running headless remote). Saw nothing in the morning and only Discarding 200 buffered messages for ... in the console. @amangarg96's suggestion does not work for me as it perfectly fine was still connected to the kernel (now idle). Reconnecting to kernel did nothing for me.

lumberbot-app[bot] commented 3 years ago

@amangarg96 commented: Hi @lfdversluis , My suggestion was only for cases when the tab has not been closed or refreshed.

I don't think there's any way to retrieve the messages once the message-to-cell mapping is lost

lumberbot-app[bot] commented 3 years ago

@dsvanidze commented: Is there any solution? It is important to get all outputs and messages for an active kernel after refreshing a tab or closing a browser window.

lumberbot-app[bot] commented 3 years ago

@huaiyizhao commented: This feature is badly needed. Imagine when you run the code on a remote server yesterday and no output shows on your reconnected browser tab now