yjs / y-webrtc

WebRTC Connector for Yjs
MIT License
464 stars 112 forks source link

The editor content does not sync on different browsers #63

Open tiavina-mika opened 9 months ago

tiavina-mika commented 9 months ago

Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.

Checklist

Describe the bug The editor content is sync across the tabs of the same browsers. But it does not sync with different browsers.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/github/tiavina-mika/tiptap-editor-mui
  2. Open the page in another tabs
  3. Write something
  4. The content is shared accross the tabs
  5. Open the page in another browser
  6. The content is not the same

Expected behavior The editor content should be the same on different browsers.

Environment Information

tim-hilt commented 9 months ago

I can confirm, that I have the same issue.

Link to minimal reproduction example: https://github.com/tim-hilt/syncedstore/blob/webrtc-minimal-repro/app/page.tsx

It works with y-websocket though.

iamnafets commented 7 months ago

90% sure this is because the default signaling servers have crashed. Host your own and things seem to work.

crystalthoughts commented 7 months ago

I had problems with firefox using this library, maybe it's related.

Vivekagent47 commented 6 months ago

@iamnafets I also have same problem, but I found out that when we console.log peers, they are being added to bcPeers, not to the webrtcPeers. But I dont know how to make them add in the webrtcPeers

{
    "added": [
        "1348b4c7-04f9-465b-98d3-55f1c211926f"
    ],
    "removed": [],
    "webrtcPeers": [],
    "bcPeers": [
        "1348b4c7-04f9-465b-98d3-55f1c211926f"
    ]
}