documentserver_community
documentserver_community copied to clipboard
Edits and changes made in Onlyoffice are not synced into Nextcloud
Issue
Edits and changes made in Onlyoffice are not saved into Nextcloud and the next sync from Nextcloud to Onlyoffice destroys all changes made in Onlyoffice. This results in loss of work.
Expected Behavior
Edits and changes written in Onlyoffice sync to the local desktop environment and the changes done in the desktop environment sync to OnlyOffice
Actual Behavior
Files stored in the local desktop environment are synced flawlessly to Nextcloud. Onlyoffice opens them flawlessly and lets the user edit the document. After saving the document and or logging out from nextcloud changes are kept in OnlyOffice cache and never written to the actual document. When user opens same document from the desktop the changes have disappeared. If user saves the document with a small change, this change is synced to OnlyOffice overwriting the changes in the cache.
Possible Fix
Write cache data to file regularly and frequently. Recognize when user leaves Onlyoffice or closes file and write cache to file. In short: Copy the functionality of Google Docs.
Steps to Reproduce
- Use a desktop wordprocessor and create a document in a NextCloud synced folder in your desktop environment
- Log onto the Nextcloud web UI and open the file with OnlyOffice.
- Ask colleague to do the same
- Make changes in document
- Exit document
- Open document with desktop wordprocessor from local NextCloud synced folder.
- Notice that the changes never were saved to the file in NextCloud,.
- Open file in OnlyOffice from the Nextcloud web UI to notice changes are still there
- Close OnlyOffice
- Make minimal change in the desktop wordprocessor and save file locally.
- Let NextCloud sync
- Open file in OnlyOffice from the Nextcloud web UI to notice all changes made in OnlyOffice have been lost and overwritten with those made in the desktop environment
- Feel despair.
Context
We just lost 2 days worth of expensive work made by our consultant. This is becoming very expensive to us!
Your Environment
- Nextcloud 18.0.3
- OnlyOffice Community Server bundled with NextCloud 18
- Nextcloud desktop client 2.6.4 Linux
- Nextcloud desktop client 2.6.4 Mac
Edit: Tried also this cronjob proposed by @googol42 but it does NOT solve the issue
-
-
-
-
- php -f /var/www/yourdomain/occ documentserver:flush
-
-
-
I can confirm this behavior in an environment with Nextcloud 18.0.3, OnlyOffice Community Server bundled with NextCloud 18 and Nextcloud desktop client 2.5.1git on Debian 10.
A fix would be highly desirable to allow the deployment of Nextcloud Hub in productive environments.
The onlyoffice integration as it is now is not suitable for production. DO NOT USE IT, YOU WILL LOSE DATA. I do not know who to tag to get attention to this? This bug is causing economic losses at the monent.
Same here with v18.0.3 ...
Just got a mail from our consultant. She never opened the file from the desktop, only using Onlyoffice from our server. Seems like the data in the onlyoffice cache is never written to Nextcloud. The "Save as" function saves to cache, but the cache never gets written to Nextcloud. User gets false secure feeling about having backed up data while in real life it is stored in cache and lost.
See #78, #77, #12, #87 all reporting the same issue. I think we should try to get in touch with Nextcloud team directly. Any clue how to reach them?
@skjnldsv could you lead us to the right contact to raise awareness?
Of course! @icewind1991 @rullzer @nickvergessen @blizzz :)
IIRC it requires the tab to be closed so OO writes back the changes. It is by design of the OO backend however. I am not really involved there though.
I tried closing in various ways, could it be related to autosaving or fast collaboration? (See "Advanced settings..." in File tab.
In case of multiple users, does the writeout happen after any user closing the tab or the last user closing the tab?
My documents are saving on a normal cron-run. Not sure how often I can run cron though, every minute would be good for saving the documents (my current settings are for every 5 minutes):
*/5 * * * * php -f /var/www/nextcloud/cron.php
Mine are NOT saving on normal cron run.
IIRC it requires the tab to be closed so OO writes back the changes. It is by design of the OO backend however. I am not really involved there though.
Who would be involved? It would be good to get the attention of a person who can fix this before more damage is caused.
None of the cron settings leads to a working setup. However, I also cannot view the logs. I'm on a hosted environment (Hetzner, Germany), not sure if that makes a difference?
@icewind1991 @rullzer @nickvergessen @blizzz What should we do to get this tagged as a bug? Us discussing here does not contribute to much.
When setting Cron to AJAX it works. So it seems, either my hoster has messed up the cron Configuration or cron doesn't use the correct user name? There should be an indication in the OnlyOffice community server settings about the last time the cron ran successfully.
There should be an indication in the OnlyOffice community server settings about the last time the cron ran successfully.
There is in your cron setup page
There should be an indication in the OnlyOffice community server settings about the last time the cron ran successfully.
There is in your cron setup page
I know, but it will show up regardless if the Community Server was able to write the files. But it could be that I am missing the logs. I'll reach out to my hoster now.
Can confirm this issue. Changing the cron settings does not resolve this for me. Unfortunately this makes OO community server unusable.
To clarify, the "intended behaviour" is that documents are saved when the cron runs after all users close the document.
If your documents are not saving properly even some time after closing, please verify that your cron is functional (see skjnldsv's comment above) and check your nextcloud log for any errors that might have been thrown during saving.
I'm experiencing the same issues ( #103 ) as mention by OP, although without anyone else editing my file at the same time (someone was working with me on a paper, but they started working after I exited the editor and saved my file). I don't have issues with cron not working (as far as I know), so I don't know if mine and OPs issues are the same, but it seems to be an issue with the newer NextCloud versions. Seems to me that the editor either times out or gets "confused" as soon as another person edits the same file, or there is a writing issue from the cache.
Our cron is functional. Nevertheless, the changes are lost. This is worth to be tagged a bug.
Our cron is functional. Nevertheless, the changes are lost. This is worth to be tagged a bug.
Same here. I had this behavior, but I can not reproduce anymore. I’m using system cron on an own server.
Since I also haven't been able to solve the issue by adjusting the cron settings I contacted my hoster and asked him to address the problem. His response:
At the moment I don't have a solution for you and can only ask you to be patient until a new version with a correction of this error is being published.
I really think it would be great if this could be tagged as a bug and get the attention of the developers. As others in this thread also said, this is a serious problem which makes OO community server unusable and in part jeopardizes the whole idea of Nextcloud "Hub".
We've got the same problem. Please fix it.
i have got same issue
Same problem here. It seems to be a problem of writing data from the database back to the files nextcloud. I have the following warning in the /var/log/nextcloud.log all the time. Do you have the same errors in the logfile?
{"reqId":"1RFumGuNoErgHMyNyJqi","level":3,"time":"2020-04-01T09:00:22+02:00","remoteAddr":"","user":"--","app":"documentserver_community","method":"","url":"--","message":{"Exception":"OCA\DocumentServer\Document\DocumentConversionException","Message":"namespace error : Namespace prefix wp14 on sizeRelH is not defined\nr 3" hidden="false"/>wp:cNvGraphicFramePr/<wp14:sizeRelH relativeFrom="margin"\n ^\nnamespace error : Namespace prefix wp14 on pctWidth is not defined\nlse"/>wp:cNvGraphicFramePr/<wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth\n ^\nnamespace error : Namespace prefix wp14 on sizeRelV is not defined\n4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"\n ^\nnamespace error : Namespace prefix wp14 on pctHeight is not defined\n14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight\n ^\n","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/documentserver_community/lib/DocumentConverter.php","line":123,"function":"run","class":"OCA\DocumentServer\Document\ConverterBinary","type":"->","args":["/upload_tmp/oc_tmp_mqVjBS-.xml",null]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/DocumentConverter.php","line":78,"function":"runCommand","class":"OCA\DocumentServer\DocumentConverter","type":"->","args":[{"class":"OCA\DocumentServer\Document\ConvertCommand"}]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php","line":151,"function":"saveChanges","class":"OCA\DocumentServer\DocumentConverter","type":"->","args":["*** sensitive parameter replaced ",["78;AgAAADEA//8BAEtMDRkkwgUAhwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAA9v///xwAAAA1AC4ANAAuADIALgA0ADYALgBAAEAAUgBlAHYA","34;BgAAADYAMQAwAAIAHAABAAAABwAAAAIAAAAAAAAAAAAAAA=="],"/var/nc_data/appdata_ocrvn9u8e3bd/documentserver_community/doc_754877581/saved.docx","docx"]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/LocalAppData.php","line":100,"function":"OCA\DocumentServer\Document\{closure}","class":"OCA\DocumentServer\Document\DocumentStore","type":"->","args":[" sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php","line":164,"function":"getReadWriteLocalPath","class":"OCA\DocumentServer\LocalAppData","type":"->","args":[{"class":"OC\Files\SimpleFS\SimpleFolder"},{"class":"Closure"}]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/Document/SaveHandler.php","line":56,"function":"saveChanges","class":"OCA\DocumentServer\Document\DocumentStore","type":"->","args":[754877581,[{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"},{"class":"OCA\DocumentServer\Document\Change"}]]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php","line":69,"function":"flushChanges","class":"OCA\DocumentServer\Document\SaveHandler","type":"->","args":[754877581]},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\DocumentServer\BackgroundJob\Cleanup","type":"->","args":[null]},{"file":"/var/www/nextcloud/cron.php","line":125,"function":"execute","class":"OCP\BackgroundJob\Job","type":"->","args":[{"class":"OC\BackgroundJob\JobList"},{"class":"OC\Log"}]}],"File":"/var/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php","Line":64,"CustomMessage":"Error while applying changes for document 754877581"},"userAgent":"--","version":"18.0.3.0"}
Shouldn't we have a unique place to discuss this issue wich looks very important to a lot of people? The oldest one I found on the nextcloud repository is https://github.com/nextcloud/documentserver_community/issues/12 and the main one on ONLYOFFICE repository is https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/21 (with a specific interesting comment in https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/21#issuecomment-568745636)
Shouldn't we have a unique place to discuss this issue wich looks very important to a lot of people? The oldest one I found on the nextcloud repository is #12 and the main one on ONLYOFFICE repository is ONLYOFFICE/onlyoffice-nextcloud#21 (with a specific interesting comment in ONLYOFFICE/onlyoffice-nextcloud#21 (comment))
Yes it should, but not one of these reports on the issue has been tagged as a bug. Apparently it is not a bug? We solved the problem by removing Onlyoffice from our Nextcloud Hub immediately when this, erm, "undocumented feature" was identified. No files have been lost since, and work continues.
We solved the problem by removing Onlyoffice from our Nextcloud Hub immediately when this, erm, "undocumented feature" was identified. No files have been lost since, and work continues.
Same here. I've tried all kind of counter measures, also running /usr/bin/docker exec -t containername sudo -u www-data php occ documentserver:flush as cron job just produced "more sophisticated" data loss, like just the changes were left in the document but the rest was missing and things alike.
Our solution: use collabora as docker container. It is not as compatible with MS office docs as onlyoffice, but right now for us the only solution that works reliable with nextcloud. Not saving changes destroys the trust in cloud based work environments and brings future discussions for me ("...it just wasn't saved, I don't know...") I can not argue with the users anymore.
It's sad that the magnitude of this issue for user trust into nextcloud is somehow not noticed/ignored.