Skip to content

Editing Jupyter Notebook in RTC mode will not update checkpoint, keeps changing to "not trusted" and reverts to previous state #7065

Open
@jesssssssssssssssssss

Description

@jesssssssssssssssssss

Description

When editing a notebook with RTC enabled, the notebook will randomly revert to the last checkpoint (which was 7 days ago in this case) and all changes since then are lost. Neither Edit -> Undo or CTRL+Z will restore changes. Running my notebook requires VPN connection which I think might be part of the problem as the notebook will periodically change from "trusted" to "not trusted". When I then go to File -> Trust Notebook, it says something about the version I have open is not the same as the one on disk and asks me if I want to revert to the last checkpoint or overwrite the copy on disk. I always opt to overwrite with the version I have open, yet the checkpoint does not update and the issue persists. There seems to be no way to manually save the notebook other than downloading and re-opening it. I've opened and edited the document at some point in JupyterLab and not had this exact problem, but in doing this I have noticed another strange bug where I'll close and shut down the notebook, and upon reopening it, all cells in the notebook are duplicated (as in cells 1-20 appear, then at the end of the notebook there's cells 1-20 again). I've also copied a link to the document and opened it in an Incognito browser (Google Chrome) to test RTC when I first enabled it, but I closed and shut down the notebook before closing the browser.

Reproduce

I can't seem to figure out exactly what I'm doing to cause this behavior but here is essentially what's happened:

  1. Open document in Jupyter Notebook (while connected to VPN): http://localhost:8888/notebooks/RTC:Documents/file.ipynb
  2. Everything is fine, notebook is trusted, running individual cells works as normal.
  3. Open an instance of JupyterLab while I still had notebook open in a separate tab
  4. Shut down JupyterLab
  5. Return to the notebook tab
  6. All recent changes lost
  7. Restore changes and download notebook (since there is no way to manually save)
  8. Open downloaded copy of notebook in Jupyter Notebook
  9. Make a bunch of edits and run all cells
  10. Computer locked while notebook was running (possibly disconnecting me from the VPN and/or interrupting kernel)
  11. Unlock computer
  12. All recent changes lost again

Context

  • Operating System and version: Microsoft Windows [Version 10.0.19044.3086]
  • Browser and version: Chrome Version 116.0.5845.188
  • IPython : 8.15.0
  • ipykernel : 6.25.2
  • ipywidgets : 8.1.0
  • jupyter_client : 8.3.1
  • jupyter_core : 5.3.1
  • jupyter_server : 2.7.3
  • jupyterlab : 4.0.5
  • nbclient : 0.8.0
  • nbconvert : 7.8.0
  • nbformat : 5.9.2
  • notebook : 7.0.3
  • qtconsole : 5.4.4
  • traitlets : 5.9.0

Related/similar issues:
jupyterlab/jupyterlab#10852
jupyterlab/jupyterlab#11348
#484

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions