Filechanges visible in onlyoffice but not in nextcloud

We have nextcloud installed and the onlyoffice app and are using the community document server installed via nextcloud app. Now changes in documents are only reflected when opening the document in onlyoffice. Downloading said document it shows up in local libreoffice in an old version. On a non nethserver nextcloud I have a similar problem, but there it is possible to workaround by save copy as documenttype from within onlyoffice. But in neth nextcloud/onlyoffice there is an a message: Unknown error apearing in webinterface.

Aparently the changes in documents by onlyoffice are reflected only in a database, but not flushed back to the filesystem.

Please let me know, what info I can provide to further debug this situation and find a fix/solution.

There is much colaborative work in the files modified with onlyoffice, so the actual version of the files are crucial to us. Thanks in advance on helping me flush the db content to filesystem. For safety reasons I did a backup, so any instruction will be very apreceated.

I you use Firefox, please open the developer tools with Strg+Shift+I and see if you can get some more information about the error…

1 Like

POSThttps://cloud.ourdomain.tld/index.php/apps/documentserver_community/3rdparty/onlyoffice/documentserver/downloadas/2950998195?cmd=%7B%22c%22%3A%22save%22%2C%22id%22%3A%222950998195%22%2C%22userid%22%3A%22ocfyeq7dbfhr_71E49E87-1317-47FF-9E26-B5538B2BA1C9%22%2C%22outputformat%22%3A65%2C%22title%22%3A%22CHUV%20-%20IT%20Security%20ECG%20Tender%20v2%20Marcel.docx%22%2C%22nobase64%22%3Atrue%2C%22savetype%22%3A3%2C%22saveindex%22%3A1%2C%22userconnectionid%22%3A%22ocfyeq7dbfhr_71E49E87-1317-47FF-9E26-B5538B2BA1C92%22%7D
[HTTP/1.1 500 Internal Server Error 2023ms]

I already tried deactivating the versions App from nextcloud, as I read that this could solve this, but it didn’t.

This post describes the same problem.

I don’t know, if its a problem with said document, as creating a new document, I at least can download the document from within onlyoffice and there the changes are reflected…

@Elleni

Hi

Could the error be related to Nextcloud with Samba External Storage?

That is: The files OnlyOffice modifies, are they stored in NC with External Storage (on Samba)?

If so, this may help:

My 2 cents
Andy

Hi Andy. No its no external storage.

OK, then that’s not the issue!

The modifications just in db (thus visible in onlyoffice) but not in filesystem thus not reflected when office document is downloaded should somehow be possible to at least workaround by somehow doing a manual flush from within console with occ command. It would be quite important to be able to do this, as they worked colaborative some days on those files.

I have seen, that they also have embeded some documents within the office document. As that was not supported by onlyoffice, they had downloaded the files, done that with a local libreoffice, and uploaded it back to the nextcloud…

Executing occ documentserver:flush as root in shell did not help either… I don’t know, if a server reboot will help, but I’ll try tonite to see where it gets. If I could only get the status of the files written to the disk, I would then try if libreoffice-online is the way to go, but first I need the files downloadable with the latest versions. Tried disabling ransomeware detection, but no luck with that one either…

Any logs I could check to find the source and hopefully fix?

Is there a possibility to see log from document server? If I could get rid of the unknown error message, at least we could File/Save copy as from within onlyoffice to get files downloaded with latest version.

I also rebooted the server and reinstalled community document server and onlyoffice apps. Did not help…

From what I’ve read, it happens with the Community Document Server (aka nextcloud’s document server app) and probably does not happen with the document server installed for instance with mrmarkuz module.
As you posted, there are open pinned issues:


Workarounds you could test:


https://api.onlyoffice.com/editors/save#forcesave
1 Like

As a sidenode - tried installing colabora online, which worked but the app does not start documents.
grafik

Thought maybe worth a try to check if the modifications from within onlyoffice could be reflected there too, but unfortunatelly it does not even start.

The most important thing for me is to get the content in database of onlyoffice back to the filesystem so the files can get downloaded with their newest version. All else can be evaluated later, like dnutans recomandation on having a look at community repos.

WHAT BECAME CLEAR FOR ME ONLY NOW IS THAT ONLYOFFICE APP FROM NEXTCLOUD IS IN NO WAY READY FOR PRODUCTION!

Also colabora online obviously is also more than just a matter of activating the two apps built-in code server and colabora online app.

Edit to add that at least download copy as pdf from within onlyoffice seems to work. Not ideal, but at least one can download the files as pdfs…

By the way something is going wrong with nextcloud log here. It cant be normal that those file rize to such an extent, I think. Actual nextcloud.log: 12M and nextcloud.log.1 101MB!

A random copy from console shows meaningless content like: “og:url” content=“https://cloud.domain.tld/”/><meta property=“og:type” content=“website”/><meta property=“og:image” content=“https://cloud.domain.tld/index.php/apps/theming/icon?v=0”/><link rel=“stylesheet” href="/index.php/apps/theming/styles?v=0"/><meta name=“robots” content=“noindex, nofollow”/>\t\n\t<body id=“body-login”>\n\t\t\n\t<div id=“nojavascript”>\n\t\t

\n\t\t\tThis application requires JavaScript for correct operation. Please <a href=“https://www.enable-javascript.com/” target="_blank" rel=“noreferrer noopener”>enable JavaScript and reload the page.\t\t
\n\t\n\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-loginUsername” value=“IiI=”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-loginAutocomplete” value=“dHJ1ZQ==”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-loginThrottleDelay” value=“MA==”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-loginResetPasswordLink” value=“IiI=”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-loginCanResetPassword” value=“dHJ1ZQ==”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-webauthn-available” value=“dHJ1ZQ==”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-config” value=“eyJzZXNzaW9uX2xpZmV0aW1lIjoxNDQwLCJzZXNzaW9uX2tlZXBhbGl2ZSI6dHJ1ZSwiYXV0b19sb2dvdXQiOmZhbHNlLCJ2ZXJzaW9uIjoiMjAuMC45LjEiLCJ2ZXJzaW9uc3RyaW5nIjoiMjAuMC45IiwiZW5hYmxlX2F2YXRhcnMiOnRydWUsImxvc3RfcGFzc3dvcmRfbGluayI6bnVsbCwibW9kUmV3cml0ZVdvcmtpbmciOmZhbHNlLCJzaGFyaW5nLm1heEF1dG9jb21wbGV0ZVJlc3VsdHMiOjAsInNoYXJpbmcubWluU2VhcmNoU3RyaW5nTGVuZ3RoIjowLCJibGFja2xpc3RfZmlsZXNfcmVnZXgiOiJcXC4ocGFydHxmaWxlcGFydCkkIn0=”>\n\t\t\t\t\t<input type=“hidden” id=“initial-state-core-capabilities” value="eyJjb3JlIjp7InBvbGxpbnRlcnZhbCI6NjAsIndlYmRhdi1yb290IjoicmVtb3RlLnBocFwvd2ViZGF2In0sImJydXRlZm9yY2UiOnsiZGVsYXkiOjB9LCJmaWxlcyI6eyJiaWdmaWxlY2h1bm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.
After opening it, try to save the file. After that, I learned from @stephdl, you see the command which was sent and you can copy it to a terminal and execute for more information.

3 Likes

There are multiple tabs, I’ll post those that might be usefull.
Header:
POST
https://cloud.ourdomain.tld/index.php/apps/documentserver_community/3rdparty/onlyoffice/documentserver/downloadas/2950998195?cmd={“c”:“save”,“id”:“2950998195”,“userid”:“ocfyeq7dbfhr_C6B6FF6C-ECEF-40E0-9F42-46A73E826501”,“outputformat”:65,“title”:“Filename.docx”,“nobase64”:true,“savetype”:3,“saveindex”:1,“userconnectionid”:“ocfyeq7dbfhr_C6B6FF6C-ECEF-40E0-9F42-46A73E8265011”}

Reply:

Diese Anwendung benötigt JavaScript zum ordnungsgemäßen Betrieb. Bitte aktiviere JavaScript und lade die Seite neu.
# Nextcloud

## Interner Serverfehler

Der Server konnte die Anfrage nicht fertig stellen.

Sollte dies erneut auftreten, sende bitte die nachfolgenden technischen Einzelheiten an Deinen Server-Administrator.

Weitere Details können im Server-Protokoll gefunden werden.

### Technische Details

* Entfernte Adresse: 192.168.x.y
* Anfragekennung: YLY0WlNaIdsk5B@vMXlzJAAAAAk

[Nextcloud](https://nextcloud.com) – ein sicherer Ort für all Deine Daten

Can this help?

Yes, I can confirm this. The Nextcloud php version has issue was reliable data saving. It seems to work if in Nextcloud you use ajax in background tasks, but I would not trust it. Note - cron is the recommend way to do background tasks. This is a pity because this php version has reallowed mobile editing and has no 20 user limits.

I can confirm there is no issues with mrmarkuz’s https://wiki.nethserver.org/doku.php?id=onlyoffice or with Nextcloud app OnlyOffice connector working with a standalone OnlyOffice installation.

1 Like

Thanks for posting this. I would love to try mrmarkuz version, but my problem is that for a project members have worked on documents within actual onlyoffice (nextcloud app) installation, and I cannot afford to loose all this work, thus I don’t know if the filechanges currently only saved in the database could would still be available if I remove the nextcloud app onlyoffice and follow mrmarkuz guide during this project at least maybe better wait and make the transistion afterwards.

If I switch setting to ajax cron - is there a way to push a flush in order to check if then changes are written back to the filesystem?

Perhaps you can install a vm with a second nethserver and @mrmarkuz version installed and try to dump and import the database.

1 Like

Thanks for the suggestion, but I have not the time to do so I am afraid. So I think we’ll use onlyoffice till this project finishes, then will ditch onlyoffice app and evaluate if we want to use either @mrmarkuz onlyoffice or if for production libreoffice would be more suitable. Would you consider onlyoffice from mrmarkuz production ready?

I really would like to know how I can trigger this ajax cron job once changed in the nextcloud settings to see if this could be a possible workaround.

Yes, you do not want to break the connection until you make a save.

Hopefully there is not too many Onlyoffice files so my suggestion is viable. I would open the cached Onlyoffice files then copy and paste the content into a Onlyoffice local desktop install, saving each Onlyoffice file locally. Then upload back to Nextcloud.

If there are too many Onlyoffice files with cache changes to do this process I am unsure what to suggest. But I will say that any disturbance to the OnlyOffice connection including a restart will result data loss.

Maybe if you snapshot where you are you can try of few things.

1 Like