question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collaborative WebRTC disconnects with big enough update

See original GitHub issue

Description

Collaborative WebRTC silently disconnects with too big display data being transferred.

Reproduce

from IPython.display import display
payload = "a" * 1024 * 256
display({"text/html": f"OK<!--{payload}-->"}, raw=True)

y-webrtc logging enabled with

// enable logging for all modules
localStorage.log = 'true'

webrtc-disconnects

Expected behavior

WebRTC would not disconnect silently. Either support large payloads or gracefully degrades.

Context

RobotKernel injects execution logs into notebook by displaying HTML links with large inline data URIs. Not beautiful, but has been working too well so far:

https://robotkernel.readthedocs.io/en/latest/_/lab/index.html?path=Example.ipynb&room=demo

/cc @bollwyvl

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bollwyvlcommented, Apr 19, 2022

So over on https://github.com/jupyterlite/jupyterlab-webrtc-docprovider/pull/3, I’ve hit many of the things from #241… probably would be ready to release that fairly soon. As it imports only @jupyterlab (and not @jupyterlite) APIs, and works just fine with main-line lab and retro, I think it wouldn’t even have to be marked beta.

Once that happens, I feel like replacing the existing provider in lite core with the nullprovider, and removing the y-webrtc dependency altogether is our best play: at worst, the few pages the reference it could say, _please ensure jupyterlite_webrtc_docprovider is installed, but otherwise wouldn’t have to change.

We could add a jupyterlite[webrtc] extra that also grabbed it, but it could just as easily be ignore-sys-prefix which might not be the intended behavior… I suppose we could add an entry_point that extended the jupyter lite build, but that seems unsatisifying.

Anyhow, what I haven’t explored yet is a simple, self-hosted signaling server to recommend, e.g. as a jupyterhub service: relying on unmirrorable, public/free services at runtime is always shady, I think it would be a good solution for many use cases, already, over a user sharing the jupyter_server instance 😱 .

1reaction
bollwyvlcommented, Apr 14, 2022

To sum up the progress on demonstrating this over on #600:

  • this works,
  • windows is weird
  • we should try to hoist the whole thing to a separate package, e.g. jupyterlab-webrtc-docprovider.
    • stock lite would not provide any yjs-related features (even behind a flag)
    • we can start it in this org, but then should consider moving it to jupyterlab-contrib: it would presumably work with stock JupyterLab, and an off-the-shelf singaling server could be hosted as a JupyterHub service, which sounds more robust than sharing jupyter servers.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending large files over webrtc data channel using Simple ...
I'm trying to send large files of size ~500mb over the data channel to the other ... Collaborative WebRTC disconnects with big enough...
Read more >
Twilio WebRTC TURN relay randomly stops working after a ...
Now I get the real disconnection when the ice connection state goes to 'failed'.
Read more >
HTTP, WebSocket, gRPC, or WebRTC - Which protocol is best?
In this post, we'll take a look at four popular solutions: HTTP, WebSocket, gRPC, and WebRTC. We will explore each protocol by investigating ......
Read more >
ICE in WebRTC: Server Setup and Relative Performance
A large percentage of WebRTC calls have network restrictions for calls ... ICE connection state: new => checking => disconnected Connection ...
Read more >
VidyoConnect for WebRTC (Native & Transcoded): Releases
An issue was resolved affecting VidyoConnect for Native WebRTC users who had issues getting disconnected from calls when using Google Chrome ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found