jupyterlab / jupyter-collaboration

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

Timeline slider is broken when using "Open from path" #392

Closed krassowski closed 1 week ago

krassowski commented 3 weeks ago

Description

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at n (544.20c789155db30fb50597.js?v=20c789155db30fb50597:1:2052)
    at 544.20c789155db30fb50597.js?v=20c789155db30fb50597:1:2494

Reproduce

  1. Launch https://gist.github.com/krassowski/d4f0030f95af9f63c1dea288fc7e00dd
  2. Create a notebook
  3. Go to File menu → Open From Path
  4. Enter "Untitled.ipynb"
  5. See error in console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at n (544.20c789155db30fb50597.js?v=20c789155db30fb50597:1:2052)
    at 544.20c789155db30fb50597.js?v=20c789155db30fb50597:1:2494

This comes from:

https://github.com/jupyterlab/jupyter-collaboration/blob/20a3735e2e4fc81de5d94f1ea88ff16240d58779/packages/docprovider-extension/src/filebrowser.ts#L157-L170

of note, documentPath slicing result is wrong in this case too

Expected behavior

No error

Context