Often hit "File Changed" prompt when running with jupyterlab>=4.1.0
Closed this issue · 2 comments
Description
When running with jupyterlab>=4.1.0, it is fairly common to hit the "FIle Changed" prompt in a RTC session when saving. An error like "Different hash found for RTC:notebook_name.ipynb" can also be present in the console.
This issue was only present when running jupyterlab with the jupyter-collaboration extension; it is not present when running jupyterlab without the jupyter-collaboration extension.
rtc-file-changed-issue.webm
Reproduce
Follow the instructions for Installing JupyterLab Real-Time Collaboration, also pasted here:
pip install --upgrade pip
git clone https://github.com/jupyterlab/jupyter_collaboration
cd jupyter_collaboration
# install monorepo
pip install -e ".[dev,test]"
# install local dependencies as editable
pip install -e projects/jupyter-collaboration-ui -e projects/jupyter-docprovider -e projects/jupyter-server-ydoc
# link lab extensions
jupyter labextension develop --overwrite projects/jupyter-collaboration-ui
jupyter labextension develop --overwrite projects/jupyter-docprovider
Then install jupyterlab, e.g. pip install jupyterlab==4.2.1
. I tested several different versions of jupyterlab. The lowest version I was able to reproduce the issue with was 4.1.0. The highest version I was not able to reproduce the issue with was 4.0.13. An example pip freeze
that I used can be found here [1]. The only difference in the set of packages I tested different versions of jupyterlab was the jupyterlab version itself.
Once jupyterlab is installed, run jupyter lab
, open a notebook with RTC, and start editing and saving. You can also try holding down the hotkey to save if you want - I do this at one point in the video above. You should run into a "File Changed" error fairly quickly, though it might take some trying.
Expected behavior
No "File Changed" errors when no actual outside file changes take place. Running RTC with Jupyterlab<=4.0.13 does not have this issue, at least not nearly as common or widespread.
Context
Reproducible on different filesystems on both mac and linux, as well as different chrome versions.
[1]
Output of pip freeze
(the only difference in pip freeze
output between different tests was the jupyterlab package version):
anyio==4.4.0
appnope==0.1.4
argcomplete==3.3.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.15.0
beautifulsoup4==4.12.3
bleach==6.1.0
cattrs==23.2.3
certifi==2024.6.2
cffi==1.16.0
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
comm==0.2.2
coverage==7.5.3
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.8
executing==2.0.1
fastcore==1.5.44
fastjsonschema==2.19.1
filelock==3.14.0
flaky==3.8.1
fqdn==1.5.1
ghapi==1.0.4
github-activity==0.3.0
h11==0.14.0
httpcore==1.0.5
httpx==0.27.0
identify==2.5.36
idna==3.7
importlib_resources==6.4.0
iniconfig==2.0.0
ipykernel==6.29.4
ipython==8.25.0
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.4
json5==0.9.25
jsonpointer==2.4
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter-collaboration @ file:///Users/andy/pg/tmp/jupyter-collaboration/projects/jupyter-collaboration
-e git+ssh://git@github.com/jupyterlab/jupyter-collaboration.git@6d900376e5fc1dd76b5001eddd11787d64ea095f#egg=jupyter_collaboration_monorepo
jupyter-collaboration-ui @ file:///Users/andy/pg/tmp/jupyter-collaboration/projects/jupyter-collaboration-ui
jupyter-docprovider @ file:///Users/andy/pg/tmp/jupyter-collaboration/projects/jupyter-docprovider
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter-server-ydoc @ file:///Users/andy/pg/tmp/jupyter-collaboration/projects/jupyter-server-ydoc
jupyter-ydoc==2.0.1
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyter_releaser==1.8.3
jupyter_server==2.14.1
jupyter_server_fileid==0.9.2
jupyter_server_terminals==0.5.3
jupyterlab==4.2.1
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.2
Markdown==3.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib-inline==0.1.7
mdformat==0.7.17
mdurl==0.1.2
mistune==3.0.2
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
nodeenv==1.9.1
notebook_shim==0.2.4
numpy==1.26.4
overrides==7.7.0
packaging==24.0
pandas==2.2.2
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pipx==1.6.0
pkginfo==1.11.0
platformdirs==4.2.2
pluggy==1.5.0
pre-commit==3.7.1
prometheus_client==0.20.0
prompt_toolkit==3.0.46
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.22
pycrdt==0.8.27
pycrdt-websocket==0.13.4
Pygments==2.18.0
pypiserver==2.1.1
pytest==8.2.2
pytest-console-scripts==1.4.1
pytest-cov==5.0.0
pytest-jupyter==0.10.1
pytest-timeout==2.3.1
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
pytz==2024.1
PyYAML==6.0.1
pyzmq==26.0.3
referencing==0.35.1
requests==2.32.3
requests-cache==1.2.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.18.1
Send2Trash==1.8.3
six==1.16.0
sniffio==1.3.1
soupsieve==2.5
sqlite-anyio==0.2.0
stack-data==0.6.3
terminado==0.18.1
tinycss2==1.3.0
toml==0.10.2
tornado==6.4.1
tqdm==4.66.4
traitlets==5.14.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.12.1
tzdata==2024.1
uri-template==1.3.0
url-normalize==1.4.3
urllib3==2.2.1
userpath==1.9.2
virtualenv==20.26.2
wcwidth==0.2.13
webcolors==24.6.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==12.0
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Welcome to the Jupyter community! 🎉
Related to or a duplicate of #312