Describe the bug
A clear and concise description of what the bug is.
Changes stopped being saved after some time of collaborative editing.
To Reproduce
not sure
Expected behavior
I expect all changes to be saved.
Client details:
Server details
Text app version: (see Nextcloud apps page)
Operating system:
Web server:
apache
Database:
mariadb
PHP version:
7.3
Nextcloud version: (see Nextcloud admin page)
16.0.5
Logs
debug text
Unsaved steps but collission with file, continue collaborative editing
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
We are seeing this too. Changes were not being updated for five+ minutes.
Note that we had both the "Text" module and the "Plain text editor" enabled at the same time. The changes were reflected in the "Plain text editor" immediately. We did not have trouble at first but have been more heavily and concurrenlty editing our test file.
This is a fresh Nextcloud 16.0.5 installation using Ubuntu Linux, PHP7, etc. The Nextcloud "Overview" gives a green checkmark with no issues.
Aside:
Any change to get hands on a broken document?
I'm sorry @@juliushaertl unfortunately, I indeed to make this file usable ASAP, so I couldn't leave it in the state it was in.
Renaming the file did not help. I had to copy it outside Nextcloud, erase it, and upload it again.
Are there some more detailed logs I might look into? I didn't find any, but maybe you could guide me..
The browser log would be interesting in those cases. If anyone encounters an issue please report that one as verbose as possible.
I have a live text document that can't be saved. It stopped updating while 5 people were editing it. It sends "Changes could not be sent yet" at the top of the page.
I made a copy of the file through Nextcloud and then the copy worked. But not the original.
I can attach the file but I do not know if it will show anything as the copy of the file worked for me.
And I can send logs if someone says what is needed and how.
Note:
This is using NextcloudPi v.1.17.1 on a Raspberry Pi 3b+. Kernel: 4.19.66-v7+, Nextcloud version 16.0.5
@ReleaseTheKnowledge You can send me a public share link of the file. Otherwise you will need to to the following to get broken document data:
select * from oc_text_steps WHERE document_id = 1441;Feel free to share it via mail (in my github profile)
Sent info.
Thanks, I'll look into that.
We've also encountered this issue, I can send you an e-mail with a public share link if that'd be useful?
It occurs on both Chrome and FF, on both Windows and Arch linux, the server is FreeBSD 11.3 running Nextcloud 16.0.6 with Text 1.0.2 on PHP 7.3. All of our files are in group folders, and all accounts authenticate with LDAP if that's relevant.
The error from the browser log when trying to edit the file is:
failed to apply steps due to collission, retrying editor.js:129:3534
value https://[our nextcloud domain]/apps/text/js/editor.js?v=03e73356d15664e71680:129
There are no entries in the nextcloud log.
That particular file has been stuck in a state with unsaved changes and not saving at all for 6 days now.
@kubasz Yes, please, a share link would be great.
@juliushaertl You should receive an e-mail with the link and password now
Thanks a lot @kubasz and @ReleaseTheKnowledge for sharing the failed documents.
I think I found the underlying issue that is actually a race-condition when pushing the steps to the database. If multiple users push steps at the same time, there might be two different set of steps added from the same base version in https://github.com/nextcloud/text/blob/b63d8b35e7ca8a0b98ed9a5f66771368800d09c5/lib/Service/DocumentService.php#L180-L202
I'll prepare a fix and a workaround to fix existing broken documents next week.
for the record, we have found similar problems when 10+ people would join a document at the same time, many of which editing. some styling commands wouldn't apply, or it would be seen by a client but not another, and on reload, the first one wouldn't see it anymore.
it seems consistent with a race condition, and i'm happy to hear there's a fix in preparation!
I've encountered this same bug, @juliushaertl - have you found a fix for this and for existing documents?
I'm having the same problem. This is now part of Nextcloud 18 and therefore used by my Nextcloud users... @juliushaertl is there any way we can help you? Do you need more information?
What's particularly bad about this bug, is that normal users will not have any indication that anything isn't working. Both users encountering the race can keep typing, and both of their version will silently fail to be saved, and end in data loss. The only way they can know is if they open the browser's console...
Most helpful comment
Thanks a lot @kubasz and @ReleaseTheKnowledge for sharing the failed documents.
I think I found the underlying issue that is actually a race-condition when pushing the steps to the database. If multiple users push steps at the same time, there might be two different set of steps added from the same base version in https://github.com/nextcloud/text/blob/b63d8b35e7ca8a0b98ed9a5f66771368800d09c5/lib/Service/DocumentService.php#L180-L202
I'll prepare a fix and a workaround to fix existing broken documents next week.