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

Cells disappearing #7523

Open
Nimahoj opened this issue Nov 19, 2024 · 20 comments
Open

Cells disappearing #7523

Nimahoj opened this issue Nov 19, 2024 · 20 comments
Labels

Comments

@Nimahoj
Copy link

Nimahoj commented Nov 19, 2024

Image

Hi, Since yesterday I have been facing an issue during running of cells, where randomly the cells will disappear. Randomly, all the cells after the last executed cell disappear, leaving the page blank (white) in that section. The issue if fixed if I re-open the notebook, but I sometimes face it again further down below.

@Nimahoj Nimahoj added bug status:Needs Triage Applied to issues that need triage labels Nov 19, 2024
@AaronCiuffo245484
Copy link

Please answer the following questions for yourself before submitting an issue

Description

Jupyter Notebooks opened under Jupyter Lab 4.3.1 under a python 3.11.4 environment on a MacOS 15.1 displays a blank area where the cells should be after scrolling up or down in the notebook. The most recently executed cell and its output tends to display.

This impacts the following browsers

  • Chrome Version 131.0.6778.70 (Official Build) (arm64)
  • Zen (Firefox) browser Version 1.0.1-a.19 (Firefox 132.0.1) (aarch64)

Reloading a notebook (CMD+R) will reload the notebook and all cells will again be visible.

Reproduce

  1. Open a notebook with a large number of cells (> 5?) and execute cells
  2. Work for 10-15 minutes, scroll up and down
  3. Screen is blank as shown in original comment.

Expected behavior

Cells should always display.

Context

  • Operating System and version: MacOS Sequoia 15.1
  • Browser and version:
    • Chrome Version 131.0.6778.70 (Official Build) (arm64)
    • Zen (Firefox) browser Version 1.0.1-a.19 (Firefox 132.0.1) (aarch64)
  • Jupyter Version Information
$ jupyter --version                                           (main) X
Selected Jupyter core packages...
IPython          : 8.29.0
ipykernel        : 6.29.5
ipywidgets       : not installed
jupyter_client   : 8.6.3
jupyter_core     : 5.7.2
jupyter_server   : 2.14.2
jupyterlab       : 4.3.1
nbclient         : 0.10.0
nbconvert        : 7.16.4
nbformat         : 5.10.4
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.3
Troubleshoot Output
n]
$ jupyter troubleshoot                                        (main) X
$PATH:
	/Users/a/.pyenv/versions/3.11.4/bin
	/opt/homebrew/Cellar/pyenv/2.4.17/libexec
	/opt/homebrew/Cellar/pyenv/2.4.17/plugins/python-build/bin
	/Users/a/.pyenv/shims
	/opt/homebrew/bin
	/opt/homebrew/sbin
	/usr/local/bin
	/System/Cryptexes/App/usr/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
	/Applications/iTerm.app/Contents/Resources/utilities
	/Users/a/bin/
	/usr/local/bin

sys.path:
/Users/a/.pyenv/versions/3.11.4/bin
/Users/a/.pyenv/versions/3.11.4/lib/python311.zip
/Users/a/.pyenv/versions/3.11.4/lib/python3.11
/Users/a/.pyenv/versions/3.11.4/lib/python3.11/lib-dynload
/Users/a/.pyenv/versions/3.11.4/lib/python3.11/site-packages

sys.executable:
/Users/a/.pyenv/versions/3.11.4/bin/python3.11

sys.version:
3.11.4 (main, Aug 9 2023, 16:03:33) [Clang 14.0.3 (clang-1403.0.22.14.1)]

platform.platform():
macOS-15.1-arm64-arm-64bit

which -a jupyter:
/Users/a/.pyenv/versions/3.11.4/bin/jupyter
/Users/a/.pyenv/shims/jupyter

pip list:
Package Version
------------------------- --------------
anyio 4.6.2.post1
appnope 0.1.4
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 24.2.0
babel 2.16.0
beautifulsoup4 4.12.3
bleach 6.2.0
certifi 2024.8.30
cffi 1.17.1
charset-normalizer 3.4.0
comm 0.2.2
debugpy 1.8.8
decorator 5.1.1
defusedxml 0.7.1
executing 2.1.0
fastjsonschema 2.20.0
fqdn 1.5.1
h11 0.14.0
httpcore 1.0.7
httpx 0.27.2
idna 3.10
ipykernel 6.29.5
ipython 8.29.0
isoduration 20.11.0
jedi 0.19.2
Jinja2 3.1.4
json5 0.9.28
jsonpointer 3.0.0
jsonschema 4.23.0
jsonschema-specifications 2024.10.1
jupyter_client 8.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.14.2
jupyter_server_terminals 0.5.3
jupyterlab 4.3.1
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.3
MarkupSafe 3.0.2
matplotlib-inline 0.1.7
mistune 3.0.2
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
notebook_shim 0.2.4
overrides 7.7.0
packaging 24.2
pandocfilters 1.5.1
parso 0.8.4
pexpect 4.9.0
pip 24.3.1
platformdirs 4.3.6
prometheus_client 0.21.0
prompt_toolkit 3.0.48
psutil 6.1.0
ptyprocess 0.7.0
pure_eval 0.2.3
pycparser 2.22
Pygments 2.18.0
python-dateutil 2.9.0.post0
python-json-logger 2.0.7
PyYAML 6.0.2
pyzmq 26.2.0
referencing 0.35.1
requests 2.32.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.21.0
Send2Trash 1.8.3
setuptools 65.5.0
six 1.16.0
sniffio 1.3.1
soupsieve 2.6
stack-data 0.6.3
terminado 0.18.1
tinycss2 1.4.0
tornado 6.4.1
traitlets 5.14.3
types-python-dateutil 2.9.0.20241003
typing_extensions 4.12.2
uri-template 1.3.0
urllib3 2.2.3
wcwidth 0.2.13
webcolors 24.11.1
webencodings 0.5.1
websocket-client 1.8.0

Browser Output
NA

@RRosio
Copy link
Collaborator

RRosio commented Nov 19, 2024

Thank you for opening this issue @Nimahoj, and for providing more information @AaronCiuffo245484!
It looks like this issue is not exactly like #7375 as that was a blank page after upgrading. Also, I see that you are using JupyterLab here, is this issue also persisting when you use Jupyter Notebook? If there is any output in the dev console, it would be helpful to see it as well! It might be a good idea to report this issue in the JupyterLab repository.

@krassowski
Copy link
Member

Browser console logs after it happens would be super useful

@AaronCiuffo245484
Copy link

I'll try to get browser console output. my primary browser has lousy console reporting.

@krassowski
Copy link
Member

Does the issue disappear when downgrading JupyterLab to 4.3.0?

@AaronCiuffo245484
Copy link

@krassowski I'm loath to downgrade on this install; it's part of a project that's working (mostly) and took longer than I want to think about to get setup for a variety of reasons.

@Nimahoj
Copy link
Author

Nimahoj commented Nov 20, 2024

Hi @AaronCiuffo245484 , Thank you for providing more information. It's my first time reporting an issue on github, and I'll use your template in the future

@Nimahoj
Copy link
Author

Nimahoj commented Nov 20, 2024

hi @krassowski , I downgraded to 4.3.0 and the issue looks to have gone away

@AaronCiuffo245484
Copy link

AaronCiuffo245484 commented Nov 20, 2024

Here's the console output from Zen (1.0.1-a.19 (Firefox 132.0.1) (aarch64)) that's experiencing the blank page issue.

console-export-2024-11-20_10-35-21.txt

I'm unfamiliar with the console reporting features. If I've done something wrong or you need more details, let me know.

Here's one more for good measure
console-export-2024-11-20_12-7-36.txt

@krassowski
Copy link
Member

Thank you, this is super helpful. Unfortunately, this confirms my fear that this is a regression uncovered by jupyterlab/jupyterlab#16950 which was included in JupyterLab 4.3.1. I think that that PR did not introduce the bug, but uncovered an existing issue that was masked by the scrollbar calculation being reset after each cell operation. For now I recommend downgrading to JupyterLab 4.3.0 or switching windowing mode to defer or none in Settings Editor → Notebook.

Uncaught (in promise) Error: Sizer 7 has incorrect offset.
    _getItemMetadata http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    getOffsetForIndexAndAlignment http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    scrollToItem http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    n http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    I http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    execute http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    execute http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1
    _executeKeyBinding http://localhost:8888/static/lab/jlab_core.e3a3a97fe081da5cfa40.js?v=e3a3a97fe081da5cfa40:1

@krassowski
Copy link
Member

I opened jupyterlab/jupyterlab#16978 and marked it as a release blocker for 4.3.2.

I would even consider yanking 4.3.1 from PyPI but not sure yet.

@AaronCiuffo245484
Copy link

@krassowski Changing the settings on 4.3.1 solved the issue for me. Thanks for the tip. I'll keep an eye on this thread for version information.

Thanks again!

@jtpio
Copy link
Member

jtpio commented Nov 21, 2024

I would even consider yanking 4.3.1 from PyPI but not sure yet.

OK. Since we updated Notebook to JupyterLab 4.3.1 recently, we may want to wait a little bit more here (for 4.3.2) before making the final 7.3.0 release.

@jtpio jtpio mentioned this issue Nov 21, 2024
2 tasks
@celestinoxp
Copy link

celestinoxp commented Nov 22, 2024

Hello, I also had problems with blank cells... in my case I'm using Windows 11, Python 3.11 and jupyterlab 4.3.1, but it also happened in other previous versions of jupyterlab. The browser is Google Chome (latest version, example: version 131.0.6778.86).

In my case, I'm using machine learning models for several hours, typically all night and while I'm sleeping. This morning only 3 cells showed the values, everything else was blank. I don't know if it helps, but my notebook has more than 200 cells...

@AaronCiuffo245484
Copy link

@celestinoxp

See kassowski's message above for the full context, but this worked for me:

For now I recommend downgrading to JupyterLab 4.3.0 or switching windowing mode to defer or none in Settings Editor → Notebook.

@celestinoxp
Copy link

But has anyone discovered the source of the problem?

A - How can we help investigate?

B - Is it just an incompatibility between the latest jupyterlab and notebook packages?

@AaronCiuffo245484
Copy link

@celestinoxp I'm not a dev here, but it looks like the devs have found the problem. That same message has a possible workaround if you must stay on 4.3.1.

@RRosio RRosio removed status:Needs Info status:Needs Triage Applied to issues that need triage labels Nov 26, 2024
@krassowski
Copy link
Member

Can you all please test jupyterlab/jupyterlab#17000 in your browser by clicking Launch Binder icon: Binder - it may take a while to load and might require a few restarts in worst case and confirm whether this solves the issue?

@AaronCiuffo245484
Copy link

AaronCiuffo245484 commented Nov 27, 2024

@krassowski I've left this to run for about 10-15 minutes and I still see the chasing circles in my browser (Zen) with the message "Starting repository: krassowski/jupyterlab/fix-disappearing-cells". Do I need to do anything to get it to launch?

EDIT: Right after I posted this, it started working. I opened a notebook here. I haven't managed to trigger disappearing cells yet. Can you suggest a process that will do that?

@krassowski
Copy link
Member

I've left this to run for about 10-15 minutes and I still see the chasing circles

Yes, depending on which node from federation gets assigned you would either get a pre-built image or would need to wait for it to build which is ~15 minutes. Next time (and as more people in different test it) it should be faster

EDIT: Right after I posted this, it started working. I opened a notebook here. I haven't managed to trigger disappearing cells yet. Can you suggest a process that will do that?

Well, hopefully no process will trigger them on this version anymore, but in the other thread someone suggested these steps: jupyterlab/jupyterlab#16978 (comment). But if you are able to trigger the bug in the released version with some of your own notebooks and if these do not contain confidential information I would suggest uploading them on Binder and trying to play around with them to get more testing coverage of less obvious cases. Of note the binder instances are per user so it is not like uploading things publicly but I always recommend against uploading anything sensitive just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants