Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The editor content does not sync on different browsers #63

Open
1 of 2 tasks
tiavina-mika opened this issue Dec 13, 2023 · 9 comments
Open
1 of 2 tasks

The editor content does not sync on different browsers #63

tiavina-mika opened this issue Dec 13, 2023 · 9 comments
Assignees
Labels

Comments

@tiavina-mika
Copy link

tiavina-mika commented Dec 13, 2023

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

  • Browser [e.g. Chrome, Firefox]
  • Yjs version: yjs v13.6.10. y-webrtc: v10.2.6
@tim-hilt
Copy link

tim-hilt commented Dec 21, 2023

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
Copy link

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

@crystalthoughts
Copy link

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

@Vivekagent47
Copy link

Vivekagent47 commented Mar 22, 2024

@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"
    ]
}

@Toukassay
Copy link

So any news since so long ? It seems to be quite the core functionnality of this lib, right ?

@au-phiware
Copy link

One year on, and I experience the same issue 😞

@dmonad
Copy link
Member

dmonad commented Dec 10, 2024

The problem doesn't fix itself.

This is open source. You can fix it yourself. You may also pay me for fixing this issue. Unfortunately, none of my sponsors use this library. I only use it for demos.

I will eventually work on this. But I have higher priorities right now.

I hope you understand.

@au-phiware
Copy link

I understand. You caught me in a moment of frustration, I apologise.

Thanks for responding. Do we have any clues about where the problem lies? Do you have any intuition? I had some success using a custom signalling server, i.e., running the example server in this repo locally. I got it working between different Firefox containers (i.e., new private window) but not across different browsers. I don't see any errors, so I'm not sure where to begin.

One thought I had was, is it CORS related? But I ran the signalling server from the same domain, and then I realised that the symptoms don't make sense with typical CORS problems...

@dmonad
Copy link
Member

dmonad commented Dec 16, 2024

My guess is that this is related to browsers supporting different max-package sizes. y-webrtc expects that messages with arbitrary length can be sent. This is, unfortunately, not the case.

My standpoint is that this should be abstracted by the webrtc library. My recommendation is to extend the peerjs library to allow arbitrary message sizes between buffers.

However, it is also necessary to research the exact problem and how browser vendors expected this to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants