Issue when peer got reconnected after disconnected by using webrtc provider

Hi everyone,

I’m currently trying to run two instances of this demo (but changed the provider to webrtc) on my local (using two different port). When one instance (user1) got disconnected and then got reconnected again, at first both content from user1 and user will get synced again.

But when user1 tries to add new content, user2 will not receive the update from user1 anymore, but update user2 will still be received by user1 (the updates will become one-direction only).

I’ve created a one-minute video screencast here in case my explanation is not clear enough.

But this issue didn’t occur when I tried this by using websocket provider. are there some extra configuration needed to make sure y-webrtc can handle this scenario? or is this a bug on y-webrtc? please let me know if I’m missing something or if you need more information.

Note: this is the only change I’ve made on the code:

// const provider = new WebsocketProvider(‘wss://’, ‘prosemirror-demo’, ydoc) // commented this
const provider = new WebrtcProvider(‘demo-ywebrtc’, ydoc);


Hey, thank you for the recording and all!

Can you please open a ticket in ?

I’m currently a bit overloaded with work, but I will try to look into it at soon as possible.

It seems that user2 doesn’t receive all updates, and is blocking receiving more updates until the missing updates are received. It is nice that provided a method to reproduce the issue.

It might help to upgrade Yjs to the latest version. I think yjs-demos still runs an older version of Yjs that is missing some bugfixes that might be relevant.

Thanks for looking into this,

Hi Kevin,
Thanks for your hard work on this project,
I’ve moved the discussion to y-webrtc’s github page as you asked, thanks for your help!


1 Like