jupyterlab / jupyter-collaboration

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

RTC breaks notebook links #202

Open thesuperzapper opened 11 months ago

thesuperzapper commented 11 months ago

Description

When you click the "notebook" button, you get a 404:

This is because of the extra "RTC:" which is added to the file path (which is not actually there):

Reproduce

  1. Ensure pip install notebook is installed
  2. Try clicking the notebook button
  3. See 404
welcome[bot] commented 11 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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. welcome 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! :wave:
Welcome to the Jupyter community! :tada:

jrouly commented 10 months ago

This issue also impacts the voila-dashboards extension (issue). The URL seems to prepend the filename with RTC: which looks like it breaks a number of expectations.

jochym commented 10 months ago

This also affects jupyterlab-latex (https://github.com/jupyterlab/jupyterlab-latex/issues/224) for the same reason. It is even worse - the RTC is present even if the RTC is disabled with --YDocExtension.disable_rtc=True while the extension is enabled (just RTC is disabled). Please treat it as high priority - it renders multiple use cases impossible.

jrouly commented 10 months ago

Based on discussion in https://github.com/jupyterlab/jupyter-collaboration/issues/183 I suspect now that the downstream plugins breaking may be considered a feature, not a bug.

However the original issue report here as to a broken feature within JupyterLab itself is pretty damning.

Podolyakofs commented 10 months ago

Also this affects jupyterlab-h5web#121, same file path error

frankebersoll commented 9 months ago

This also affects jupyterlab_rise: Slideshows won't work when RTC is enabled because of invalid links, you get 404 all over the place. Same for "File > Save and export notebook as..."

betolink commented 8 months ago

I ran into the same issue with https://github.com/silx-kit/jupyterlab-h5web/issues/121 Is this a problem with the extensions?

@fcollonval @davidbrochart

davidbrochart commented 8 months ago

Is this a problem with the extensions?

Yes it probably doesn't support custom drives.

BwL1289 commented 7 months ago

Same with search and replace. I'm opening a ticket there.

davidbrochart commented 7 months ago

I'm not going to fix every extension, it might be better to open an issue there.

krassowski commented 7 months ago

Calling every extension out there broken is a bit of a strong statement. Incompatible sounds more accurate for me. Could JupyterLab (or the collaboration extension) provide a compatibility layer router to resolve the links prefixed with RTC: correctly?

davidbrochart commented 7 months ago

I must say it's not very clear to me why the RTC drive could not register itself as the default JupyterLab drive in the first place, removing the need for the RTC: prefix.

martinRenou commented 7 months ago

I must say it's not very clear to me why the RTC drive could not register itself as the default JupyterLab drive in the first place, removing the need for the RTC: prefix.

I think I'd go in the other direction, saying I don't understand why the default drive (the one providing the content from the server) shouldn't be treated as any other drives, prefixing its path properly.

davidbrochart commented 7 months ago

But still, it feels there should be a notion of a "default drive", right? So the issue would remain, could the RTC drive register itself as this default drive?

martinRenou commented 7 months ago

could not register itself as the default JupyterLab drive in the first place,

That's actually the thing, the "default drive" does not register itself as a drive, it's not a drive (in the sense of JupyterLab).

I believe it's the root cause of extensions assuming drives are not a thing and paths do not specify the drive. This design probably does not make the custom drive approach very welcome.

davidbrochart commented 7 months ago

So what about making the "default drive" a proper drive, which would come with a default implementation in JupyterLab, and that could be swapped by an extension?

martinRenou commented 7 months ago

So what about making the "default drive" a proper drive, which would come with a default implementation in JupyterLab, and that could be swapped by an extension?

💯 for that

davidbrochart commented 7 months ago

I think https://github.com/davidbrochart/jupyterlab-remote-contents goes in that direction.

loichuder commented 7 months ago

Yes it probably doesn't support custom drives.

I'm not going to fix every extension, it might be better to open an issue there.

As far as jupyterlab-h5web is concerned, I'll be happy to add support for custom drives myself but I cannot find a documentation link nor an example for this.

Could JupyterLab (or the collaboration extension) provide a compatibility layer router to resolve the links prefixed with RTC: correctly?

That would be super helpful for extension maintainers :+1:

andreytaboola commented 4 months ago

Any updates on the fix for this bug? We also have issues opening notebooks using "notebook" and "NbClassic" Thank you

davidbrochart commented 4 months ago

There is ongoing work.