Skip to content

[v3.0.0rcx] Closing a chat session throws server error #1301

Open
@srdas

Description

@srdas

This opens one of the issues in Issue #1293 as a separate issue.

References PR #1290

When closing a chat session (by clicking on the "x"), a websocket error is thrown, shown in the log below:

[I 2025-03-25 13:09:24.720 ServerApp] Saving the content from room text:chat:49f07d46-142c-4549-adee-b6c45d2c751e
[I 2025-03-25 13:09:24.722 YDocExtension] Saving file: sd3.chat
[E 2025-03-25 13:09:32.271 ServerApp] Failed to write message
    Traceback (most recent call last):
      File "/opt/anaconda3/envs/v3/lib/python3.12/site-packages/jupyter_server_ydoc/handlers.py", line 278, in send
        self.write_message(message, binary=True)
      File "/opt/anaconda3/envs/v3/lib/python3.12/site-packages/tornado/websocket.py", line 332, in write_message
        raise WebSocketClosedError()
    tornado.websocket.WebSocketClosedError

To reproduce from scratch:

  1. Do a dev install of v3 as a contributor using the documentation here.
  2. Start Jupyter Lab from the Terminal.
  3. Open a new chat window (use the +Chat button)
  4. Try some queries and chat in the chat window.
  5. Close the chat window by clicking the "x" in the top bar.
  6. Examine the log in the Terminal to see the error above.

Note: (a) The chat file <*.chat> is being saved correctly. (b) Error persists after upgrading tornado, jupyterlab, notebook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by users

    Type

    No type

    Projects

    Status

    3.x backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions