jupyterlab-git: Git extension causing issues for Jupyterlab 3.x

Description

I am seeing this issue mentioned here while using git extension jupyterlab-git version=0.31.0a0 jupyterlab version=3.0.16

https://github.com/jupyterlab/jupyterlab/issues/10435 Raising this issue as per this suggestion: https://github.com/jupyterlab/jupyterlab/pull/10505#issuecomment-873350982

Reproduce

Using git diff is breaking JupyterLab functionality

  1. Open .ipynb image

  2. Do a git diff on a .py file image

  3. this causes .py file is empty image

  4. .ipynb file has empty cells image

Expected behavior

JupyterLab works well till I do git diff. If I restart the server via hub control, it works till I do git diff

Context

  • Python package version: 3.6.12
  • Extension version: 0.31.0a0
  • Git version:2.27.0
  • Operating System and its version: NAME=“Red Hat Enterprise Linux Server” VERSION=“7.6 (Maipo)” ID=“rhel”
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Web Browser Output
Paste the output from your browser web console here.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (15 by maintainers)

Most upvoted comments

@krassowski @fcollonval Removed jupyterlab-lsp and jupyter-lsp. Still seeing the issue

sh-4.2$ jupyter labextension list

JupyterLab v3.1.0b0
/opt/rh/rh-python36/root/usr/share/jupyter/labextensions
        jupyterlab-jupytext v1.3.3 enabled OK (python, jupytext)
        jupyterlab-plotly v5.1.0 enabled OK
        jupyterlab-system-monitor v0.8.0 enabled OK (python, jupyterlab-system-monitor)
        jupyterlab-topbar-extension v0.6.1 enabled OK (python, jupyterlab-topbar)
        nbdime-jupyterlab v2.1.0 enabled OK
        @dunovank/jupyterlab_legos_ui v0.1.5 enabled OK (python, jupyterlab_legos_ui)
        @ijmbarr/jupyterlab_spellchecker v0.6.0 enabled OK (python, jupyterlab-spellchecker)
        @jupyter-server/resource-usage v0.6.0 enabled OK (python, jupyter-resource-usage)
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/git v0.31.0-alpha.0 enabled OK (python, jupyterlab-git)
        @ryantam626/jupyterlab_code_formatter v1.4.10 enabled OK (python, jupyterlab-code-formatter)
        @ryantam626/jupyterlab_sublime v0.4.1 enabled OK (python, jupyterlab_sublime)

Other labextensions (built into JupyterLab)
   app dir: /opt/rh/rh-python36/root/usr/share/jupyter/lab
        @jupyterlab/debugger v3.0.12 enabled OK
        @jupyterlab/toc v5.0.12 enabled OK
        jupyterlab-dash v0.4.0 enabled OK

sh-4.2$ pip list | grep jupyter

jupyter                       1.0.0
jupyter-client                6.2.0
jupyter-console               6.1.0
jupyter-core                  4.6.3
jupyter-dash                  0.4.0
jupyter-resource-usage        0.6.0
jupyter-server                1.9.0
jupyter-server-mathjax        0.2.3
jupyter-telemetry             0.0.5
jupyterhub                    1.1.0
jupyterhub-ldapauthenticator  1.3.0
jupyterlab                    3.1.0b0
jupyterlab-code-formatter     1.4.10
jupyterlab-execute-time       2.0.4
jupyterlab-git                0.31.0a0
jupyterlab-latex              3.0.0
jupyterlab-legos-ui           0.1.5
jupyterlab-pygments           0.1.2
jupyterlab-server             2.6.0
jupyterlab-spellchecker       0.6.0
jupyterlab-sublime            0.4.1
jupyterlab-system-monitor     0.8.0
jupyterlab-topbar             0.6.1
jupyterlab-widgets            1.0.0
jupyterthemes                 0.20.0

error trace with git diff on .md file

codemirror.js:2954 Uncaught (in promise) TypeError: t.iter is not a function
    at Wi (codemirror.js:2954)
    at yo (codemirror.js:4794)
    at new Ea (codemirror.js:7900)
    at Ea (codemirror.js:7854)
    at new $ (197.54a4c128136fe4bf…4c128136fe4bf4459:1)
    at le.createDiffView (197.54a4c128136fe4bf…4c128136fe4bf4459:1)
    at 197.54a4c128136fe4bf…4c128136fe4bf4459:1
codemirror.js:8606 Uncaught TypeError: this.doc.iter is not a function
    at Ea.<anonymous> (codemirror.js:8606)
    at Ea.setSize (codemirror.js:3947)
    at Wl (codemirror.js:6653)
    at codemirror.js:6625
    at An (codemirror.js:3929)
    at Ea.operation (codemirror.js:8615)
    at Nl (codemirror.js:6624)
    at codemirror.js:6641

error trace when I open .md file

Uncaught (in promise) TypeError: t.iter is not a function
    at Wi (codemirror.js:2954)
    at yo (codemirror.js:4794)
    at new Ea (codemirror.js:7900)
    at Ea (codemirror.js:7854)
    at new $ (197.54a4c128136fe4bf4459.js?v=54a4c128136fe4bf4459:1)
    at le.createDiffView (197.54a4c128136fe4bf4459.js?v=54a4c128136fe4bf4459:1)
    at 197.54a4c128136fe4bf4459.js?v=54a4c128136fe4bf4459:1
codemirror.js:8606 Uncaught TypeError: this.doc.iter is not a function
    at Ea.<anonymous> (codemirror.js:8606)
    at Ea.setSize (codemirror.js:3947)
    at Wl (codemirror.js:6653)
    at codemirror.js:6625
    at An (codemirror.js:3929)
    at Ea.operation (codemirror.js:8615)
    at Nl (codemirror.js:6624)
    at codemirror.js:6641
(anonymous) @ codemirror.js:8606
(anonymous) @ codemirror.js:3947
Wl @ codemirror.js:6653
(anonymous) @ codemirror.js:6625
An @ codemirror.js:3929
operation @ codemirror.js:8615
Nl @ codemirror.js:6624
(anonymous) @ codemirror.js:6641
codemirror.js:8606 Uncaught TypeError: this.doc.iter is not a function
    at Ea.<anonymous> (codemirror.js:8606)
    at Ea.setSize (codemirror.js:3947)
    at Wl (codemirror.js:6653)
    at codemirror.js:6625
    at An (codemirror.js:3929)
    at Ea.operation (codemirror.js:8615)
    at Nl (codemirror.js:6624)
    at codemirror.js:6641