Uncaught errors during collab.receive

I’m currently testing the collab module in cases where two users start with the same document and then perform multiple steps (e.g 10-30) before doing the first rebase using collab.receive.
So far I encountered the two errors Join positions not around a split and Invalid content for node list_item, which were both thrown inside receive.
I suppose these errors are bugs and the receive method should never throw any uncaught errors during standard document collaboration, right? Or do we need to handle these errors and revert to some kind of merge strategy?

Unfortunately, these errors are rather hard to reliably reproduce. I really hope they can be fixed nevertheless as they cause problems during collaboration use cases. I’ll do my best to find a way to reproduce them, but maybe the provided information is already enough to help fix them.

I think this patch will fix this. The errors you are seeing happen when changes from another user cause changes made locally to become invalid (for example, you can’t join two blocks if someone inserted content between them). I changed the error model of the Transform abstraction (a few times) in the recent overhaul, and forgot to call the right method in rebaseSteps – which is supposed to simply drop steps that are no longer valid, not crash the program.

That makes sense, thanks for the patch! I’ll test it as soon as I upgrade to the latest master.

EDIT: I just tested the latest version and was not able to reproduce the errors. This is great!

1 Like