OnlyOffice syncing

Hello,

Nextcloud version (eg, 12.0.2): 18.0.3 all apps up to date
Operating system and version (eg, Ubuntu 17.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): 2.4.38
PHP version (eg, 7.1): 7.3

The issue you are facing:

Maybe it’s something I completeley misunderstood about the way it works, but we already lost 2 files (the 2 first we created) so I decided to ask:

  • I create a file online using the “+” button, a new spreadsheet document
  • I edit that file, adding content … so far so good.
  • if I go back later on that file, everything is ok … content is ok
  • I forgot to mention that the file was created online in a synced folder
  • now if I open the file locally on my computer (even just a “Preview” on a Mac), it looks empty
  • first reaction of user is “I’m looking at the wrong file, this one is empty, moving to trash” and then “where is my file ???”
  • erasing the file on the local system is propagated online, file is erased, everything lost …
  • after 2 similar situations, we started investigating … when the file is created, everything is ok online but the local synced copy is just created empty and never synced after that … the local file stays empty.
  • if I do a “File->Save As” from OnlyOffice, a new copy is created (in the folder I choose, if I stay in the same folder I have a (2) copy), that file is properly synced with local folder with all the last modifications
  • if I edit with OnlyOffice that new copy, that works … but the local copy is again not updated

In fact it’s like the file is properly synced only once at the time of creation (or duplication) but never synced afterwards …

So question is : did I understand correctly ? is there something special to do to have the local copy synced ?

Thanks
Pierre

Hello,
I have the same problem and it seems that there is no issue. There are many others topics on this subject :

(Last posts are recent)

Hello,
Yes I see also this one:

I suspect that the onlyoffice file save delay is conflicting with NextCloud’s caching systems somehow.

I observed exactly what you describe on my system:

  • Create an OnlyOffice document online
  • Preview or open it on a mac running the sync client and the document is empty.

The file seems to sync OK if I open and close it again in Onlyoffice.

You can probably work around the problem by having your users create online documents in one folder, then move them to the desired folder after creation. Or create them using a filename modifier (eg “xNew Document”), then removing the modifier after the initial save (rename “xNew Document” to “New Document”). For safety (given what I see in onlyoffice-documentserver issues) you may need to do this any time you are editing online.

I’ve seen something similar that does not involve the sync client at all.

I have been evaluating OnlyOffice and Collabora for the last year or so. 3 - 4 times per week I open a specific .docx file, add a new line in OnlyOffice, close it, open it in Collabora, and add another word. I want to track that both products are working correctly and that my scheduled update routines have not broken anything.

About 10% of the time, when I open the file in Collabora I do not see the edits I just made in OnlyOffice.

If I close Collabora (without saving), and re-open it, sometimes the text added in OnlyOffice is there, sometimes it is not. If the text is still missing, I find that if I return to OnlyOffice the text is missing there, too.

I get more reliable (but still imperfect) results in my test document when:

  • I click the mouse in a different part of the document before closing it (instead of typing with the keyboard only)
  • then use the ‘Open file location’ button at the top right to exit OnlyOffice

I dont really understand.

If you know where the edits are saved by onlyoffice, I am very interested. I noticed that each time I create a document, a folder is created in / var / www / nextcloud / data / appdata_ocd8kznrb8xp / documentserver_community

Do you use cronjob, because when the cron is running it will be take the files out of the documentserver of OnlyOffice.

I tried to use cron and Ajax. It’s the same problem.
It works for you ? (With the application)

Yes, but Collabora work better for me.
I setup a remote documentserver for OO and Collabora.

But you use onlyoffice AND community document server application.
I have these errors in the logs but I dont know if there is a link :

stream_get_contents(): supplied resource is not a valid stream resource at /var/www/nextcloud/apps/documentserver_community/lib/Document/FontManager.php#67

fclose(): supplied resource is not a valid stream resource at /var/www/nextcloud/apps/documentserver_community/lib/Document/FontManager.php#66

Sabre\DAV\Exception\BadRequest: Expected filesize of 3166857 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2113536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.

OCP\Files\NotFoundException:

I get this error:

[text] Error: OCP\Files\NotFoundException: at <>

  1. /var/www/html/apps/text/lib/Service/DocumentService.php line 363
    OCA\Text\Service\DocumentService->getFileById(2708202, “benjamin”)
  2. /var/www/html/apps/text/lib/Service/ApiService.php line 160
    OCA\Text\Service\DocumentService->getFileForSession(OCA\Text\Db\Session {id: 87}, null)
  3. /var/www/html/apps/text/lib/Controller/SessionController.php line 81
    OCA\Text\Service\ApiService->sync(2708202, 87, “I2MSqeznJSkQlFm … X”, 0, “”, false, true)
  4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Text\Controller\SessionController->sync(2708202, 87, “I2MSqeznJSkQlFm … X”, 0, “”, false, true)
  5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Text\Controller\SessionController {}, “sync”)
  6. /var/www/html/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Text\Controller\SessionController {}, “sync”)
  7. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main(“OCA\Text\Cont … r”, “sync”, OC\AppFramework\ … {}, {_route: “text.Session.sync”})
  8. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: “text.Session.sync”})
  9. /var/www/html/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ … {}, {_route: “text.Session.sync”})
  10. /var/www/html/lib/base.php line 1008
    OC\Route\Router->match("/apps/text/session/sync")
  11. /var/www/html/index.php line 38
    OC::handleRequest()

POST /index.php/apps/text/session/sync
from 172.18.0.5 by benjamin at 2020-03-31T20:35:56+00:00

Very same issue here.
I fear I lost some data of a day of collaborative work due to tomorrow, as now I cannot open one of the documents anymore. It states loading 100% and than stops while nothing is synced to the fs with a similar serror massage as shown in the post above me.
If I now copy the file, I get an empty one as copy.
I had a similar case before, where the last changes were only saved after duplicating the document.

(talking to myself…)

I no longer see this issue after upgrading onlyoffice to v5.5.1.76 and nextcloud to v18.0.4.2

This procedure used to reliably give me an empty file in Word on my Mac every time; now it does not:

  • create a new document in nextcloud using onlyoffice and add some content
  • open the file in Word (v16.36) on my mac as soon as it is downloaded by the nextcloud desktop client (v. 2.6.4stable)

But you are talking about Document Server and Nextcloud, I never had issues with that configuration, the problem is with NC18 and the Community Document Server.