Discussions related to Shared Editing, Distributed Apps, and Yjs. Questions about Yjs should go to discuss.yjs.dev. Bug reports to the issue tracker.
ydoc.store.pendingDs === null && ydoc.store.pendingStructs === null
that you can be certain that you are missing some updates. Otherwise, you simply have to initialize a fresh sync.
TypeError: Cannot read property 'encrypt' of undefined
Module.encrypt
49 | return /** @type {PromiseLike<Uint8Array>} */ (promise.resolve(data))
50 | }
51 | const iv = crypto.getRandomValues(new Uint8Array(12))
> 52 | return crypto.subtle.encrypt(
| ^ 53 | {
54 | name: 'AES-GCM',
55 | iv
Hey @cbenz_gitlab,
that's really funny and is actually what I thought when I started the project. I was a huge fan of Haskell, but that's pretty useless if you want to create collaborative applications. But why did it have to be JavaScript?? WHYYY JS!!
Now I really like JavaScript. It's a really fun language.
The actual reason is that I named the underlying CRDT algorithm YATA - Yet Another Transformation Approach. So Yjs is the js implementation of the Y(ATA) CRDT. Also, the Y kinda looks like two branches merging, which is what Yjs does. So when I name a variable ytext or ymodel, I immediately know that the data is observable and automatically merges with other peers :)
am I the only one facing this issue after updating y-webrtc?
TypeError: Cannot read property 'encrypt' of undefined Module.encrypt 49 | return /** @type {PromiseLike<Uint8Array>} */ (promise.resolve(data)) 50 | } 51 | const iv = crypto.getRandomValues(new Uint8Array(12)) > 52 | return crypto.subtle.encrypt( | ^ 53 | { 54 | name: 'AES-GCM', 55 | iv
[encrypt] this library only work for https
Hi All, I'm working with y-websocket right now, and i'm wondering if anyone has experience adding messages to the server. I want clients to be aware when someone adds another "room", so that an added room gets added to other connected clients. Initially I thought i could just use the same WebsocketProvider to wrap the other providers to sync the client state using custom message types. I've gotten started but i keep running into issues with the persistence layer and i feel stuck. Any ideas?
The issue is if i just send a regular message like Websocket.send("stateUpdate") the server crashes with an Index out of bounds error.
Y.Map
and have set up a Y.UndoManager
to track updates to it. I now make a series of, for instance, 20 adds, deletes and updates to the Y.Map
. Then I decide that I want to undo these most of these changes, back to, say, the 3rd change. I could do this by calling undoManager.undo
17 times, but is there any way to revert straight to the 3rd change (e.g. by saving a pointer to the undoManager
state before each change)? The use case is that I want to give the user a menu of the last n
changes, so that the user can revert straight back to a previous state, without having to unwind each action one at a time.