-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
maybeStep can also fail with an exception #873
Comments
Yes, this is by design. The method expects the step to be in the same coordinate space as the document you're trying to apply it to—you can't just try to apply any step to any document. The checks during application are about the structure of the step fitting into the document, not about the positions it refers to being valid for that document. I think you have some other bug where the steps are being mapped incorrectly (or not being mapped when they should be). |
Thanks for confirming this. I will dig deeper. |
I found a reproduction: #874 |
we intermittently see steps which can be applied cleanly locally, but induce an error when this plugin attempts to rebase them on top of remote confirmed steps. i am aware that the possibility of `maybeStep()` throwing is [by design](ProseMirror/prosemirror#873). locally i'm seeing desirable behavior with the patch here, which simply ignores the failed steps altogether. things i'm unsure of: 1. does more need to be done to purge these failed steps from any other unconfirmed steps that may be present? 1. is there something i could be doing outside of the collab plugin to make these steps more invertable/rebasable? i haven't been able to isolate a simplified repro case for this error yet but i'm happy to describe the scenario in more detail if it would be helpful. the short version is unsurprisingly, 'its complicated' 🙃 fwiw, with the same code, this uncaught error occurs for us with orders of magnitude more frequency in [email protected] than it does in [email protected]
we intermittently see steps which can be applied cleanly locally, but induce an error when rebased on top of remote confirmed steps. i am aware that `maybeStep()` possibly throwing is [by design](ProseMirror/prosemirror#873). locally i'm seeing desirable behavior with the patch here, which simply ignores the failed steps altogether. things i'm unsure of: 1. does more need to be done to purge these failed steps from any other unconfirmed steps that may be present? 1. is there something i could be doing outside of the collab plugin to make these steps more invertable/rebasable? i haven't been able to isolate a simplified repro case for this error yet but i'm happy to describe the scenario in more detail if it would be helpful. the short version is (unsurprisingly), 'its complicated' 🙃 fwiw, with the same code, we're seeing this error orders of magnitude more frequently in [email protected] than [email protected]
Issue details
During rebase on the server I am using
maybeStep
like it is used in collab module, but I am observing thatmaybeStep
can also fail with an exception:I find this surprising.
Steps to reproduce
I have not yet been able to come up with the reproduction. I am currently observing this in our logs and investigating.
ProseMirror version
The text was updated successfully, but these errors were encountered: