-
Notifications
You must be signed in to change notification settings - Fork 452
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
doc.submitOp() called from server #162
Comments
No, I haven't looked into this for some time now, but it would be nice to get some help from someone. |
Wow, quick response! Thanks @nickasd! But you won't believe this: I just tested the first code that you wrote and it just works. Maybe a bug was fixed in recent versions or the number is somehow intepreted as an integer, non-text. I am getting a "success" trying to delete an "a" from "abc123" with |
Regarding the failed submission, I suspect I've recently fixed that with this PR: #259 If it all seems in order, should I close this issue? |
@alecgibson Kudos to you, thanks! I think we can close this issue. |
@alecgibson I don't think the issue is resolved. @adelriosantiago trying to delete an "a" from "abc123" is supposed to work, what shouldn't work is deleting an "0" from "abc123".
|
@nickasd can you please put together a failing test case? |
It seems to have been fixed indeed. I was confused by the stack trace which didn't contain the line where I log the error (obviously). But in setting up the test case I possibly found another problem: both
|
@nickasd this looks like a separate issue. I've had a very quick dig, and it looks like it has to do with the combination of
We've got something like this happening:
I don't have a lot of time to think about how best to handle this right now - may be best to chat with @nateps and @ericyhwang in Wednesday's meeting. Potentially best to also move this to a new issue. My first instinct is that when we invoke a callback, we should first dissociate it from the op it was attached to, so that we don't get this repeat call (that or mark it as called, so we don't try to call it again), but I don't know what the ramifications of that behaviour might be. Actually, now thinking about it a bit more, perhaps we should be moving more towards having a light |
@alecgibson Thanks for your help! I opened a new report #272. |
I've found out that calling But I found a workaround to -more or less- solve the issue of writing from the server. It working good so far by creating a "fake" client running on a Chrome headless browser. It is not the best solution but it works well and all clients are refreshed as expected. In case someone is interested in this approach, the steps to create this "fake" client are:
|
@adelriosantiago That's a nice workaround, but let's hope that the issue will be fixed nonetheless. |
What is the correct way (if there is any) of applying a document operation from the server side? I noticed that when applying an invalid delete operation (one that tries to delete some text at a position where the text is different), an exception is thrown. I tried:
which raises the following exception:
and I tried also:
but here I get even 2 exceptions thrown outside of the catch block:
and
On the client I can simply use the first code without any problem.
The text was updated successfully, but these errors were encountered: