jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
140 stars 29 forks source link

Collaboration does not work #319

Open CaptainDario opened 1 week ago

CaptainDario commented 1 week ago

Description

After following the installation guide I expected the collaboration to work on my local network. But it turns out that it does not work. My two local machines also do not show up in the collaborators UI, only one can be seen.

Reproduce

  1. pip install jupyter-lab
  2. pip install jupyter-collaboration
  3. jupyter lab --port 8888 --ip xxxx --collaborative

Expected behavior

The changes I make in one browser window show up in the other one.

Context

Troubleshoot Output
$PATH:
    /home/dario/.pyenv/versions/3.11.5/bin
    /home/dario/.pyenv/libexec
    /home/dario/.pyenv/plugins/python-build/bin
    /home/dario/.pyenv/plugins/pyenv-virtualenv/bin
    /home/dario/.pyenv/plugins/pyenv-update/bin
    /home/dario/.pyenv/plugins/pyenv-doctor/bin
    /home/dario/.pyenv/shims
    /home/dario/.pyenv/bin
    /home/dario/.cargo/bin
    /usr/local/sbin
    /usr/local/bin
    /usr/sbin
    /usr/bin
    /sbin
    /bin
    /usr/games
    /usr/local/games
    /snap/bin
    /snap/bin
    /home/dario/dev/flutter/bin
    /home/dario/dev/bazel

sys.path:
    /home/dario/.pyenv/versions/3.11.5/bin
    /home/dario/.pyenv/versions/3.11.5/lib/python311.zip
    /home/dario/.pyenv/versions/3.11.5/lib/python3.11
    /home/dario/.pyenv/versions/3.11.5/lib/python3.11/lib-dynload
    /home/dario/.pyenv/versions/3.11.5/lib/python3.11/site-packages
    /home/dario/dev/Master-Thesis/DTrOCR/DTrOCR

sys.executable:
    /home/dario/.pyenv/versions/3.11.5/bin/python3.11

sys.version:
    3.11.5 (main, Sep  4 2023, 15:59:21) [GCC 11.4.0]

platform.platform():
    Linux-6.5.0-41-generic-x86_64-with-glibc2.35

which -a jupyter:
    /home/dario/.pyenv/versions/3.11.5/bin/jupyter
    /home/dario/.pyenv/shims/jupyter

pip list:
    Package                      Version        Editable project location
    ---------------------------- -------------- -------------------------------------------
    absl-py                      2.0.0
    aiosqlite                    0.20.0
    annotated-types              0.7.0
    anyio                        4.4.0
    argon2-cffi                  23.1.0
    argon2-cffi-bindings         21.2.0
    arrow                        1.3.0
    asgiref                      3.8.1
    asphalt                      4.12.0
    asphalt-web                  1.3.1
    asttokens                    2.4.1
    astunparse                   1.6.3
    async-generator              1.10
    async-lru                    2.0.4
    async-timeout                4.0.3
    asyncio-extras               1.3.2
    attrs                        23.2.0
    Babel                        2.15.0
    bcrypt                       4.1.2
    beautifulsoup4               4.12.3
    bleach                       6.1.0
    cachetools                   5.3.2
    certifi                      2023.11.17
    cffi                         1.16.0
    charset-normalizer           3.3.2
    click                        8.1.7
    comm                         0.2.2
    cryptography                 42.0.8
    debugpy                      1.8.1
    decorator                    5.1.1
    defusedxml                   0.7.1
    dnspython                    2.6.1
    DTrOCR                       1.0            /home/dario/dev/Master-Thesis/DTrOCR/DTrOCR
    email_validator              2.1.2
    executing                    2.0.1
    fastapi                      0.111.0
    fastapi-cli                  0.0.4
    fastapi-users                13.0.0
    fastapi-users-db-sqlalchemy  6.0.1
    fastjsonschema               2.20.0
    filelock                     3.13.1
    flatbuffers                  23.5.26
    fps_auth                     0.6.0
    fps_contents                 0.6.0
    fps_frontend                 0.6.0
    fps_jupyterlab               0.6.0
    fps_kernels                  0.6.0
    fps_lab                      0.6.0
    fps_login                    0.6.0
    fps_nbconvert                0.6.0
    fps_terminals                0.6.0
    fps_yjs                      0.6.0
    fqdn                         1.5.1
    fsspec                       2023.12.1
    gast                         0.5.4
    google-auth                  2.25.1
    google-auth-oauthlib         1.0.0
    google-pasta                 0.2.0
    greenlet                     3.0.3
    grpcio                       1.59.3
    h11                          0.14.0
    h5py                         3.10.0
    httpcore                     1.0.5
    httptools                    0.6.1
    httpx                        0.27.0
    httpx-oauth                  0.14.1
    idna                         3.6
    ipykernel                    6.29.4
    ipython                      8.25.0
    isoduration                  20.11.0
    jedi                         0.19.1
    Jinja2                       3.1.2
    json5                        0.9.25
    jsonpointer                  3.0.0
    jsonschema                   4.22.0
    jsonschema-specifications    2023.12.1
    jupyter_client               8.6.2
    jupyter_core                 5.7.2
    jupyter-events               0.10.0
    jupyter-lsp                  2.2.5
    jupyter_server               2.14.1
    jupyter_server_fileid        0.9.2
    jupyter_server_terminals     0.5.3
    jupyter-ydoc                 2.0.1
    jupyterlab                   4.2.2
    jupyterlab_pygments          0.3.0
    jupyterlab_server            2.27.2
    jupyverse                    0.6.0
    jupyverse_api                0.6.0
    keras                        2.14.0
    libclang                     16.0.6
    makefun                      1.15.2
    Markdown                     3.5.1
    markdown-it-py               3.0.0
    MarkupSafe                   2.1.3
    matplotlib-inline            0.1.7
    mdurl                        0.1.2
    mistune                      3.0.2
    ml-dtypes                    0.2.0
    mpmath                       1.3.0
    nbclient                     0.10.0
    nbconvert                    7.16.4
    nbformat                     5.10.4
    nest-asyncio                 1.6.0
    networkx                     3.2.1
    notebook_shim                0.2.4
    numpy                        1.26.2
    nvidia-cublas-cu12           12.1.3.1
    nvidia-cuda-cupti-cu12       12.1.105
    nvidia-cuda-nvrtc-cu12       12.1.105
    nvidia-cuda-runtime-cu12     12.1.105
    nvidia-cudnn-cu12            8.9.2.26
    nvidia-cufft-cu12            11.0.2.54
    nvidia-curand-cu12           10.3.2.106
    nvidia-cusolver-cu12         11.4.5.107
    nvidia-cusparse-cu12         12.1.0.106
    nvidia-nccl-cu12             2.18.1
    nvidia-nvjitlink-cu12        12.3.101
    nvidia-nvtx-cu12             12.1.105
    oauthlib                     3.2.2
    opt-einsum                   3.3.0
    orjson                       3.10.5
    overrides                    7.7.0
    packaging                    23.2
    pandocfilters                1.5.1
    parso                        0.8.4
    pexpect                      4.9.0
    Pillow                       10.1.0
    pip                          23.2.1
    platformdirs                 4.2.2
    prometheus_client            0.20.0
    prompt_toolkit               3.0.47
    protobuf                     4.23.4
    psutil                       6.0.0
    ptyprocess                   0.7.0
    pure-eval                    0.2.2
    pwdlib                       0.2.0
    pyasn1                       0.5.1
    pyasn1-modules               0.3.0
    pycparser                    2.22
    pycrdt                       0.8.27
    pycrdt-websocket             0.13.5
    pydantic                     2.7.4
    pydantic_core                2.18.4
    Pygments                     2.18.0
    PyJWT                        2.8.0
    python-dateutil              2.9.0.post0
    python-dotenv                1.0.1
    python-json-logger           2.0.7
    python-multipart             0.0.9
    PyYAML                       6.0.1
    pyzmq                        26.0.3
    referencing                  0.35.1
    requests                     2.31.0
    requests-oauthlib            1.3.1
    rfc3339-validator            0.1.4
    rfc3986-validator            0.1.1
    rich                         13.7.1
    rich-click                   1.8.3
    rpds-py                      0.18.1
    rsa                          4.9
    ruamel.yaml                  0.18.6
    ruamel.yaml.clib             0.2.8
    Send2Trash                   1.8.3
    setuptools                   65.5.0
    shellingham                  1.5.4
    six                          1.16.0
    sniffio                      1.3.1
    soupsieve                    2.5
    SQLAlchemy                   2.0.31
    sqlite-anyio                 0.2.2
    stack-data                   0.6.3
    starlette                    0.37.2
    sympy                        1.12
    tensorboard                  2.14.0
    tensorboard-data-server      0.7.2
    tensorflow                   2.14.0
    tensorflow-estimator         2.14.0
    tensorflow-io-gcs-filesystem 0.34.0
    termcolor                    2.4.0
    terminado                    0.18.1
    tinycss2                     1.3.0
    torch                        2.1.1
    torchaudio                   2.1.1
    torchvision                  0.16.1
    tornado                      6.4.1
    traitlets                    5.14.3
    triton                       2.1.0
    typer                        0.12.3
    types-python-dateutil        2.9.0.20240316
    typing_extensions            4.8.0
    ujson                        5.10.0
    uri-template                 1.3.0
    urllib3                      2.1.0
    uvicorn                      0.30.1
    uvloop                       0.19.0
    watchfiles                   0.22.0
    wcwidth                      0.2.13
    webcolors                    24.6.0
    webencodings                 0.5.1
    websocket-client             1.8.0
    websockets                   12.0
    Werkzeug                     3.0.1
    wheel                        0.42.0
    wrapt                        1.14.1

Command Line Output

[output.txt](https://github.com/user-attachments/files/15951486/output.txt)

davidbrochart commented 1 week ago
  1. pip install jupyter-lab

It's pip install jupyterlab.

3. jupyter lab --port 8888 --ip xxxx --collaborative

You shouldn't need --collaborative.

Could you close your document and open it again? The reason is that if a document was opened in non-collaborative mode in a previous session and automatically opened in your workspace, it will still be opened in non-collaborative mode (i.e. without the RTC: drive prefix). Reopening it will use the RTC drive.

CaptainDario commented 1 week ago

Thank you for your quick reply!

I tried that and it did not work. Additionally, I tried creating a new notebook which also shows the same result. However, the users are visible in the sidebar but the changes do not sync.

image image
CaptainDario commented 1 week ago

Could you explain the RTC drive prefix? I cannot see any prefix anywhere.

davidbrochart commented 1 week ago

You should see something like that in the launcher ("RTC" above "Notebook"):

image

CaptainDario commented 1 week ago

For me it does not show that, any idea what could be the reason for that?

davidbrochart commented 1 week ago

I don't know, maybe try installing jupyterlab and jupyter-collaboration in a fresh environment.