Skip to content

File changes are shown in OnlyOffice but don't appear in Files app #12

Closed

Description

@rnwgnr

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

Nextcloud: 18.0.0 (happens with SQLite and MariaDB Backend) , internal store only.
DocumentServer_Communtiy version: 0.1.1
Still happens 18.0.3 and Document Server 0.1.5

Whenever editing a file in OnlyOffice, the changes are not reflected in the "Files" app:

  • The timestamp of the file does not change.
  • When downloading the file, the changes are lost.

Nevertheless when opening the file again in OnlyOffice, the changes are there.

I guess OnlyOffice caches the document internally and the changes are not copied back to the users storage folder.

Activity

  1. KopfKrieg commented on Jan 18, 2020

    @KopfKrieg

    I just want to add it also happens with PostgreSQL as database (and redis as cache).

  2. pkmkrishnakumar-zz commented on Jan 21, 2020

    @pkmkrishnakumar-zz

    This happens in Document Server_Community version: 0.1.2
    Similar to others, I too have same issue of not saving the document, but changes reflects in onlyoffice alone. But its been saved few minutes after inactive session .

    And if the document is being collaborated, sessions of the users are not terminated even if the user closes the window or onlyoffice.
    I hope the problem is hiding in termination of session. If the session is closed, document will be saved automatically. So we need to have an icon or some thing like that to close the session when closing the window or closing onlyoffice. And we need force save option as in onlyoffice

    And the requirement is file has to be saved if the current user / last collaborated user closes their window.

  3. apg1980 commented on Jan 22, 2020

    @apg1980

    I can confirm this issue as well.
    I can edit and watch the changes in the web interface.
    But no file sync is initated and no files version is created as well the timestamp did not change.
    Nextcloud running on ubuntu 18.04, php7.3fpm, latest postgresql.
    This error comes up several times in an hour:
    {"reqId":"J8CAcxdnyyTHiHMCF2qE","level":3,"time":"2020-01-22T08:20:43+01:00","remoteAddr":"","user":"--","app":"documentserver_community","method":"","url":"--","message":{"Exception":"OCA\\DocumentServer\\Document\\DocumentConversionException","Message":"save_code: d.rb.ua,La,d.Me,e.Document)})}null!=d.fa&&(this.memory.va(Ai.fa),this.ra.Dk(function(){e.Epb(d,a,!0,c)}))};this.Epb=function(d,a,c,z){var h=0,Ga=d.fa.length-1;if(1==a&&(h=d.Selection.xa,Ga=d.Selection.ya,h>Ga)){var f=Ga;Ga=h;h=f}0>Ga&&(Ga=0);0>h&&(h=0);f=d.fa;for(var La=this;h<=Ga&&h<f.length;++h){var n=f[h];switch(n.ka){case $f:var r=n.Ym();ff!==r?it(r,n.Qv(),function(d,a,c,e){oh===d?a.ewa()?d=Ai.Qca:(d=Ai.Pya,c=!0):d=a.zpa()?Ai.Mfa:Ai.mza;La.ra.ta(d,function(){gB(La.ra,La.bq.Qja++,a,{UE:function(){e(c)}})})},\nsave: Uncaught TypeError: Cannot read property 'ua' of null\nDoctRenderer:<result><error code=\"save\" /></result>\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":["/NEXTCLOUD-DATA/nextcloud-tmp/oc_tmp_q6UGwN-.xml"]},{"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":168,"function":"saveChanges","class":"OCA\\DocumentServer\\DocumentConverter","type":"->","args":["/NEXTCLOUD-DATA/data/appdata_ocl353ioyjno/documentserver_community/doc_4198266707",["38;CgAAADEAXwA1ADcANAABABwAAQAAAAUAAAACAAAAAAAAAAMAAAA=","26;CgAAADEAXwA1ADcANAACABwAAAAAAAAAAAA=","78;AgAAADEA//8BAF/X5hsU5QEAOQEAAAIAAAAGAAAABgAAAAYAAAAdAAAAHQAAABwAAAA1AC4ANAAuADIALgA0ADYALgBAAEAAUgBlAHYA"],"/NEXTCLOUD-DATA/data/appdata_ocl353ioyjno/documentserver_community/doc_4198266707/saved.docx","docx"]},{"file":"/var/www/nextcloud/apps/documentserver_community/lib/Document/SaveHandler.php","line":56,"function":"saveChanges","class":"OCA\\DocumentServer\\Document\\DocumentStore","type":"->","args":[4198266707,[{"__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"},{"__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"},{"__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"},{"__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":[4198266707]},{"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":56,"CustomMessage":"Error while applying changes for document 4198266707"},"userAgent":"--","version":"18.0.0.10","id":"5e27f8380f4c6"}

  4. Digiseb commented on Jan 23, 2020

    @Digiseb

    I also have this bug on three different Nextcloud instances, a completely fresh new installation, two upgrade versions. All on Ubuntu server 18.04. Program cannot be used. Are there already solutions here?

  5. hendrikreimers commented on Jan 24, 2020

    @hendrikreimers

    Can confirm it too, Ubuntu 18.04 different instances.

  6. dheule commented on Jan 24, 2020

    @dheule

    same here, Gentoo x86_64, MariaDB, updated instance ...

  7. nursoda commented on Jan 25, 2020

    @nursoda

    same here, NC18release on current Arch, NGINX, mariadb, documentserver 0.1.3, onlyoffice 4.1.2:

    • click on .odt (file opens in onlyoffice/communityeditionserver), edit it, press "x" to close app, all fine
    • reload files page, timestamp of just edited file is old
    • reopen file in onlyoffice: recent modifications are there
    • download file and open in libreoffice: recent modifications are NOT there

    Edit: Next day (!) the file timestamp has been updated and changes are visible to synced files also. New changes are not saved to the file to file but cached in OO again.

    Sidenote: "Convert using Onlyoffice" (from 3dot-menu) gives me "Bad response: Start tag expected, '<' not found" Edit: → This has been fixed in 0.1.4, at least for me it's working now: e.g. applying "Convert using Onlyoffice' on a .otd creates a .docx.

  8. nonplusnl commented on Jan 26, 2020

    @nonplusnl

    Same bug -- Upgraded Nextcloud18 on Ubuntu 18.04
    However, I notice that when I leave the browser tab with Onlyoffice in it sitting there, it appears to autosave every half hour or so. File gets written to disk with updated timestamp at :00 and :30 when changes are made in the meantime.
    So it appears, for me at least, that I cannot save manually ('Save' icon greyed out), and closing OnlyOffice loses changes. But waiting until scheduled :00/:30 autosave works?!

  9. oleua commented on Jan 28, 2020

    @oleua

    Same bug -- Upgraded Nextcloud18 on Ubuntu 18.04
    However, I notice that when I leave the browser tab with Onlyoffice in it sitting there, it appears to autosave every half hour or so. File gets written to disk with updated timestamp at :00 and :30 when changes are made in the meantime.
    So it appears, for me at least, that I cannot save manually ('Save' icon greyed out), and closing OnlyOffice loses changes. But waiting until scheduled :00/:30 autosave works?!

    As a temporary solution you may uncheck Autosave. However, it should be fixed somewhere... Maybe this 30 minutes delay is hard coded somehwhere?...

    image

  10. apg1980 commented on Jan 29, 2020

    @apg1980

    i can confirm that the saving behaviour in 0.1.4 is working quite better.
    file is saved after view seconds automatically.
    if you have disabled autosave in 0.1.3, the feature is set enabled after updating to 0.1.4.

  11. nursoda commented on Jan 29, 2020

    @nursoda

    Can't confirm that saving is any better. Still takes minutes at least until changes are visible via files app / webdav. But according to my (non-systematic) observations, it's not necessary to keep the Onlyoffice app open for the file to be saved. It just takes (way too much) time. Is that a conceptual issue?
    Edit: No change in respect to the "not saved timely" after update to 0.1.5 for me.

  12. dasunsrule32 commented on Jan 31, 2020

    @dasunsrule32

    I'm on 0.1.5 with the same issue, can't use it since I don't know it will save or not.

  13. apg1980 commented on Jan 31, 2020

    @apg1980

    Ok, i think i figured it out. Changes will be written to nextcloud after the next nextcloud cronjob was compleately run.

  14. dasunsrule32 commented on Jan 31, 2020

    @dasunsrule32

    This is where a hybrid background job mode between Cron and Ajax would be nice I suppose and then giving things like the document server the highest priority when it comes to Ajax. That way your files would always be up to date.

    5+ minutes isn't good enough for saving of docs from the document server to nextcloud.

  15. nursoda commented on Jan 31, 2020

    @nursoda

    Triggering a mini-'save-this-document'-Ajax-Job would be sufficient. It doesn't have to be a full cron job after closing a document. But I definitely consider it a bug that changes are not saved upon Document/OnlyOffice-app-close if "real cron" is configured (which is recommended).

  16. 239 remaining items

  17. ferdiga commented on Nov 3, 2023

    @ferdiga

    Is this issue still occurs ?

    I think Only Office saves changes not instantly (neither with and without manual saving) as one would expect, but only after some time.

  18. pallebone commented on Nov 3, 2023

    @pallebone

    Is this issue still occurs ?

    I think Only Office saves changes not instantly (neither with and without manual saving) as one would expect, but only after some time.

    Problem is that if someone saves then someone else comes to edit it then potentially changes get lost.

  19. ferdiga commented on Nov 4, 2023

    @ferdiga

    that's the main (and crucial) reason why I am not using this app

  20. kintaro1981 commented on Apr 7, 2024

    @kintaro1981

    I tried document server 0.1.16 and it "fixed" for me (NC managed by hetzner - storage share).

    In my case modifications made in onlyoffice are synced back to nextcloud (windows) clients every 5 minutes, not perfect but better than nothing.

    take a look here and try:
    #318 (comment)

    the only problem is that modified date/time of files in the client filesystem is not the same as in nextcloud server

  21. oleua commented on Apr 7, 2024

    @oleua

    I tried document server 0.1.16 and it "fixed" for me (NC managed by hetzner - storage share).

    In my case modifications made in onlyoffice are synced back to nextcloud (windows) clients every 5 minutes, not perfect but better than nothing.

    This is done through cron service. So, potentially you may try to decrease it to 1 mins.
    Of course, in case of realtime collaboration the changes in UI are observed immediately.

    the only problem is that modified date/time of files in the client filesystem is not the same as in nextcloud server

    Check your NC locale settings, and the settings at the hoster.

    PS Meanwhile, have you tried this OO in docker https://hub.docker.com/r/thomisus/onlyoffice-documentserver-unlimited ?

  22. dodancs commented on Sep 25, 2024

    @dodancs

    I have recently came across this exact issue.
    Nextcloud: 29.0.7 (docker / production-apache)
    Onlyoffice: 7.5 up to 8.1
    Onlyoffice app: 9.4.0

    Whenever I make changes to a document. the changes are present when opened through onlyoffice but when I download the file from Nextcloud or sync it to my PC, it is always the old version of the file without the latest changes.

    Here are my logs when that happens:

    ==> /var/log/onlyoffice/documentserver/converter/out.log <==
    [2024-09-25T19:52:58.018] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - Start Task
    
    ==> /var/log/onlyoffice/documentserver/docservice/out.log <==
    [2024-09-25T19:52:58.032] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - AddTask saveFromChanges
    
    ==> /var/log/onlyoffice/documentserver/converter/out.log <==
    [2024-09-25T19:52:58.038] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - downloadFileFromStorage list 1954134065/Editor.bin,1954134065/output.txt
    [2024-09-25T19:52:58.040] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - downloadFileFromStorage complete
    [2024-09-25T19:52:58.040] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - downloadFileFromStorage list
    [2024-09-25T19:52:58.056] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - processChanges end
    [2024-09-25T19:52:58.818] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - stdout:
    [2024-09-25T19:52:58.818] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - stderr:
    [2024-09-25T19:52:58.818] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - ExitCode (code=0;signal=null;error:0)
    [2024-09-25T19:52:58.822] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - processUploadToStorageChunk path=1954134065_6709/changes.zip; sha256=37060b9d2567667e2a856e50c3a260b8ea6e2087151deca5ad103db44c7ca7f4
    [2024-09-25T19:52:58.822] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - processUploadToStorageChunk path=1954134065_6709/changesHistory.json; sha256=855ccb1d7d4c29e32130482dc9d70a67cf6ee7e5b1dcde89ce96ef8355bc49c1
    [2024-09-25T19:52:58.822] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - processUploadToStorageChunk path=1954134065_6709/output.xlsx; sha256=566fbd7f36901525789d9936e62c5b09e3f06b6ed3202bcd53a40beb95dc273d
    [2024-09-25T19:52:58.825] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - processUploadToStorage complete
    [2024-09-25T19:52:58.825] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - output (data={"ctx":{"tenant":"localhost","docId":"1954134065","userId":"oc7f8of1z1om_example1","shardKey":"1954134065"},"cmd":{"wopiParams":null,"c":"sfc","id":"1954134065","userid":"oc7f8of1z1om_example","userindex":1,"data":null,"title":"output.xlsx","outputformat":257,"outputpath":"output.xlsx","status_info":0,"savekey":"1954134065_6709","jsonparams":{"documentLayout":{"openedAt":1727301144223}},"lcid":9,"useractionid":"oc7f8of1z1om_example","useractionindex":1,"nobase64":true,"status_info_in":3172963,"originformat":257}})
    [2024-09-25T19:52:58.825] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - postProcess
    [2024-09-25T19:52:58.826] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - deleteFolderRecursive
    [2024-09-25T19:52:58.827] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - End Task
    
    ==> /var/log/onlyoffice/documentserver/docservice/out.log <==
    [2024-09-25T19:52:58.829] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - receiveTask start: {"ctx":{"tenant":"localhost","docId":"1954134065","userId":"oc7f8of1z1om_example1","shardKey":"1954134065"},"cmd":{"wopiParams":null,"c":"sfc","id":"1954134065","userid":"oc7f8of1z1om_example","userindex":1,"data":null,"title":"output.xlsx","outputformat":257,"outputpath":"output.xlsx","status_info":0,"savekey":"1954134065_6709","jsonparams":{"documentLayout":{"openedAt":1727301144223}},"lcid":9,"useractionid":"oc7f8of1z1om_example","useractionindex":1,"nobase64":true,"status_info_in":3172963,"originformat":257}}
    [2024-09-25T19:52:58.841] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - Start commandSfcCallback
    [2024-09-25T19:52:58.842] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - getCallbackByUserIndex: userIndex = 1 callbacks = {"userIndex":1,"callback":"http://nextcloud/apps/onlyoffice/track?doc=XYZ"}
    [2024-09-25T19:52:58.842] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - Callback commandSfcCallback: callback = http://nextcloud/apps/onlyoffice/track?doc=XYZ
    [2024-09-25T19:52:58.844] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - commandSfcCallback forgotten no empty: isSendHistory = false
    [2024-09-25T19:52:58.844] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - commandSfcCallback presence: count = 0
    [2024-09-25T19:52:58.861] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - postData request: url = http://nextcloud/apps/onlyoffice/track?doc=XYZ;data = {"key":"1954134065","status":2,"url":"http://oon.example.com/cache/files/data/1954134065_6709/output.xlsx/output.xlsx?md5=XYZ&expires=1727294879&shardkey=1954134065&filename=output.xlsx","history":{},"users":["oc7f8of1z1om_example"],"actions":[{"type":0,"userid":"oc7f8of1z1om_example"}],"lastsave":"2024-09-25T19:52:43.000Z","notmodified":false,"filetype":"xlsx"}
    
    ==> /var/log/onlyoffice/documentserver/converter/out.log <==
    [2024-09-25T19:52:58.870] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - ackTask addResponse
    [2024-09-25T19:52:58.870] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - ackTask ack
    
    ==> /var/log/onlyoffice/documentserver/docservice/out.log <==
    [2024-09-25T19:52:59.008] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - postData response: data = {"error":1}
    [2024-09-25T19:52:59.008] [WARN] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - sendServerRequest returned an error: data = {"error":1}
    [2024-09-25T19:52:59.008] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - commandSfcCallback restore 7 status
    [2024-09-25T19:52:59.064] [WARN] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - storeForgotten
    [2024-09-25T19:52:59.071] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - getCallbackByUserIndex: userIndex = 1 callbacks = {"userIndex":1,"callback":"http://nextcloud/apps/onlyoffice/track?doc=XYZ"}
    [2024-09-25T19:52:59.110] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - cleanupCacheIf db.affectedRows=1
    [2024-09-25T19:52:59.110] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - storeForgotten cleanupRes=true
    [2024-09-25T19:52:59.110] [DEBUG] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - End commandSfcCallback
    [2024-09-25T19:52:59.111] [INFO] [localhost] [1954134065] [oc7f8of1z1om_example1] nodeJS - receiveTask end
    
  23. LucaGatto commented on Aug 11, 2025

    @LucaGatto

    Hi there, since I encountered the same issue again and haven't seen any activity since last year, should I assume that the bug is still present and will never be fixed? Thanks.

  24. JonnyHaystack commented on Aug 11, 2025

    @JonnyHaystack

    @LucaGatto Personally I've not used this app in years since it caused me data loss of important data twice, but at least from what I've seen on this issue over the years, there's no indication of the developers acknowledging or trying to fix this absolutely critical bug. If I were you I would never trust this app again. Maybe try Collabora - that's been okay for me.

  25. LucaGatto commented on Aug 11, 2025

    @LucaGatto

    @JonnyHaystack Thanks for the quick reply! We chose this option because it seemed the best, especially when dealing with MS files and formatting. We will have a look at Collabora.

  26. ferdiga commented on Aug 11, 2025

    @ferdiga

    @LucaGatto
    we use a dedicated Collabora CODE docker installation and do regularly updates - which works fine, but we usually wait a few days after publishing as sometimes bugs or new incompatible features are introduced. A reinstall of a prior docker version solves such issues.

  27. rororow commented on Nov 8, 2025

    @rororow

    We are having this issue in our org. Please, developers; this is critical!

  28. arnowelzel commented on Nov 8, 2025

    @arnowelzel

    @rororow I really recommend to move to Collabora and Nextcloud Office. This is the "official" solution for Nexcloud and it is well maintained and much better integrated in Nextcloud compared to OnlyOffice. I understand, that this may be a big change for your organization and the UI looks different, but in the long term this would save a lot of trouble.

  29. yummiweb commented on Sep 13, 2026

    @yummiweb

    It’s been a while since the last reply, but I’m bringing this up again—precisely because of that:

    Unfortunately, this solution doesn't work for environments where Nextcloud users log in using LDAP/AD credentials and then access an SMB share (where the documents are stored) using those same credentials (via "save in session" or Apache Kerberos).

    I am not aware of any instance—nor have I ever succeeded—where a setup like the one described above works with anything other than the combination of the "OnlyOffice App" and the "Documentserver App."

    This is likely because the quasi-internal Nextcloud Documentserver (the app) can utilize the user's session credentials, whereas external "Collabora" or external "Documentserver" instances naturally cannot.

    Unfortunately, this also applies to the "Collabora App" within Nextcloud. I would imagine the "Collabora App" should be capable of this if it used methods similar to the "Documentserver App," but at the moment, it doesn't seem to work.

    Sadly, the "OnlyOffice App / Documentserver App" combination is still plagued by long-standing issues. However, right now, I don't know of any other solution that can handle such SMB shares (or other storage mounted via "External Storage" using "save in session" or Apache Kerberos).

    My hopes are currently pinned on "EuroOffice," though that would require a corresponding "EuroOffice Documentserver App," as it unfortunately does not work with the standard "Documentserver App" at all.

  30. chadek commented on Sep 15, 2026

    @chadek
    Collaborator

    Fixed for v0.4.0, by #396. Your reading of it in 2020 was correct: the changes were in this server's own store and were not copied back to the user's storage until much later, or at all.

    What was wrong. The editor's "all changes are saved" meant the changes had reached this server's database, not that they had reached the file. Nothing wrote the file until the last participant had left and the Cleanup background job had run. On an instance whose cron is slow, misconfigured, or set to AJAX, a document could be edited all day with nothing on disk — and a browser closed at the wrong moment lost the lot. Worse, the server never noticed an editor leaving at all: a document server that holds a WebSocket learns of it from the socket closing, but this one is polled over HTTP, so the pending poll was simply dropped and nothing ran to notice.

    What changed (#396, and #387 for the session accounting):

    • While you are editing. A save writes the document out if it has been longer than autosave_interval (60 s by default, 0 turns it off) since the last write — from the editing path itself, not from the background job. It costs one document assembly per interval per document being edited, however much is typed in between, and none at all while nobody is typing.
    • When the last editor leaves. The editor says goodbye on its way out and the server acts on it: the session ends, the people still in the document are told, and if that was the last participant the document is written and disposed of immediately. Two paths, because sdkjs only covers one: its own close command, and a beacon sent by the page hosting the editor frame (it has to be the host page — a request started by a frame that is being detached is cancelled with it).
    • Expired sessions no longer count as participants. Rows were only deleted by the background job, so between two runs the table held every session that had ever stopped polling. Counting those meant a document was never seen to be empty, and the write fell back to whenever the job next ran — which is the wait this issue is about.
    • The background job still runs, and now writes documents that are being edited instead of skipping them, so it still catches a browser that crashed or a server restarted mid-edit. It is no longer what saving depends on.

    To change the interval:

    occ config:app:set documentserver_community autosave_interval --value=120
    

    Proof. Two regression tests, driving real editors in headless chromium and reading the file on disk after each step — no cron, no occ documentserver:flush anywhere in the run. Against master just now, Nextcloud 34, ONLYOFFICE connector 10.1, bundled Euro-Office 9.3.4:

    tests/rig/autosave_test.py — the file is written while the document is open:

    ==> [1] type AUTO485531, nothing else
       file: {'AUTO485531': True} | doc folders: 1 | changes: 71
    
    ==> [2] type AUTO485532 straight away, inside the 45s interval
       file: {'AUTO485531': True, 'AUTO485532': False}
    
    ==> [3] wait out the interval, then type AUTO485533
       file: {'AUTO485531': True, 'AUTO485532': True, 'AUTO485533': True}
    
    ==> [4] type AUTO485534 and close the editor
       closing: destroyEditor()
       file: {'AUTO485531': True, 'AUTO485532': True, 'AUTO485533': True, 'AUTO485534': True}
       doc folders: 0 | changes: 0 | sessions: 0
    
       VERDICT: saving during editing works
    -- autosave: PASS in 183s
    

    Step 1 is the whole issue: the text is in the Nextcloud file seconds after being typed, with the document still open. Step 2 is the cost control — a save inside the interval must not re-assemble the document. Step 4 is closing the editor: everything is in the file and the document is disposed of on the spot.

    tests/rig/leave_test.py — two participants, and nobody runs anything:

    ==> [1] both type
       sessions: 2
    
    ==> [2] A closes the editor while B is still in the document
       A closing: destroyEditor()
       sessions: 1 | doc folders: 1 | changes: 158
    
    ==> [3] B keeps typing, and it still reaches the file
       file: {'LEAVE49059-A1': True, 'LEAVE49059-B1': True, 'LEAVE49059-B2': True}
    
    ==> [4] B types once more and closes the tab
       file: {'LEAVE49059-A1': True, 'LEAVE49059-B1': True, 'LEAVE49059-B2': True, 'LEAVE49059-B3': True}
       doc folders: 0 | changes: 0 | sessions: 0
    
    ==> [5] reopen the document: the editor must show what was typed
       markers missing from the reopened document: none
    
       VERDICT: leaving a document saves it
    -- leave: PASS in 284s
    

    Step 2 is the other half of it — one person leaving must not end the document for everybody else — and step 5 reopens the file and asks the editor's own document model what it displays, rather than trusting the write.

    The whole suite is green on master as of this comment: formats, smoke (every format opens, edits and reaches the file), flush-live, autosave, leave, twotab, coedit, coedit-xlsx, forcesave, chat. It runs in CI on pull requests and weekly, so this does not quietly regress again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions