Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document is not saved in nextcloud #21

Closed
Floflobel opened this issue Oct 29, 2018 · 57 comments
Closed

Document is not saved in nextcloud #21

Floflobel opened this issue Oct 29, 2018 · 57 comments

Comments

@Floflobel
Copy link

Floflobel commented Oct 29, 2018

Hello,

I have a big problem with a specific document. The document is stored on nextcloud and is edited with onlyoffice-documentserver (5.1.5-59).
The file is shared with several people thanks to a link.
During the edition the document is not saved in in nextcloud the date of the last edition is several days before. While we are downloading the document, it is not up to date.

If we open this document with onlyoffice there are no problem it is up to date. However, we can download the latest change directly in nextcloud.

  • Onlyoffice Operating System: Debian 9
  • Package come from repository

How do I may debug this problem? It is a specific problem on a single file.

@Floflobel
Copy link
Author

Any news ?

@alexanderonlyoffice
Copy link
Member

Hello @Floflobel, please specify some additional information:

  1. Send us a screenshot of the address settings of ONLYOFFICE integration app from Nextcloud;
  2. Please send us also logs of the Document Server and Nextcloud. You may send them to support@onlyoffice.com with a note "For technical support";
  3. If I understood it right, you are also using ONLYOFFICE Community Edition?

If we open this document with onlyoffice there are no problem it is good up to date.

@Floflobel
Copy link
Author

Floflobel commented Nov 5, 2018

  1. 47992803-29079080-e0ee-11e8-9285-17477f8fcdf9
  2. Log send by mail
  3. Of course

@Floflobel Floflobel changed the title Document not save in nextcloud Document is not save in nextcloud Nov 5, 2018
@Floflobel Floflobel changed the title Document is not save in nextcloud Document is not saved in nextcloud Nov 5, 2018
@alexanderonlyoffice
Copy link
Member

@Floflobel, as you use Document Server which is installed as a part of the Community Edition, you need to add virtual path of the Document Server to the address in Nextcloud settings, because Community Server of the Community Edition works as proxy and redirect all requests to the Document Server. Example: https://your_portal_address/ds-vpath/

Please also remember to check if JWT is enabled in Document Server. If yes, JWT should be enabled in Nextcloud.

@Floflobel
Copy link
Author

  • I completed all the fields missing with the url in the parameters nextcloud
  • I restarted my lxd container with onlyoffice
  • I restarted nextcloud

The file is still not backed up for 7 days. I tried to force the backup directly into onlyoffice but it did not do anything.
The file is shared with several users and I see that a user is permanently connected, could the problem come from here?

@Floflobel
Copy link
Author

I performed the test to let a user permanently logged on a document. I made some changes on it, then closed the document everywhere except on one user. In fact, the file is not saved in nextcloud until all the users close the document.

  • Is it possible to add a function that regularly forces the backup in nextcloud?
  • There is a backup function in onlyoffice but it does not seem to save the file on nextcloud. Is it possible that when you click on the button "Save", the document is well saved in nextcloud?
    screenshot from 2018-11-07 11-30-47

@alexanderonlyoffice
Copy link
Member

@Floflobel, the file won't be finalized until all editing session are closed.

Is there any error message when clicking on the 'Save' button on the page with ONLYOFFICE integration app in Nextcloud?

@NanoSector
Copy link

NanoSector commented Nov 13, 2018

I am having the same issue, but my setup is different.
Both my NextCloud server and the Document Editor server run Fedora 29, where the OnlyOffice editor runs in its Docker container. For both, I am using a Let's Encrypt certificate, this seemed to be related to other similar errors. I've copied fullchain.pem into onlyoffice.crt, and privkey.pem into onlyoffice.key in the document editor's data directory, mounted outside the container.

On the NextCloud front, I am receiving this error:

{"reqId”:”-snip-”,”level":3,"time":"2018-11-13T17:43:16+00:00","remoteAddr”:”-snip-,”user":"--","app":"onlyoffice","method":"POST","url":"\/nextcloud\/index.php\/apps\/onlyoffice\/track?doc=…”,”message":"Track with empty or not correct hash: Signature verification failed","userAgent":"--","version":"14.0.3.0”}

I hope this helps.

@alexanderonlyoffice
Copy link
Member

Hello @Yoshi2889, have you checked the accessibility of Nextcloud and Document Server for each other using wget command? Check the accessibility of Nextcloud for Document Server from inside the container.

Did you use this instruction (Installation of SSL certificates section) to install certificates to the Document Server?

@Floflobel
Copy link
Author

@alexanderonlyoffice Yes, but it is a real problem that generates a loss of data.

I have no error when I click on the button "save" in onlyoffice.

@NanoSector
Copy link

NanoSector commented Nov 14, 2018

Both servers can see each other and can receive data from each other.

I've followed the https instructions on that page like I described. If I use a browser to open the onlyoffice "it's working" page it uses the proper certificate and doesn't complain about it being invalid or anything.

I've even created a new container and now the nextcloud error is gone and there isn't anything logged in either server, but it still doesn't work.

@alexanderonlyoffice
Copy link
Member

@Floflobel, please turn on extended logging for Nextcloud logs, reproduce the issue and send us full log or a part for the period when the issue was reproduced. Instruction can be found here.

@Yoshi2889, please specify if JWT is enabled in Document Server and Nextcloud. You can check it in local.json in /etc/onlyoffice/documentserver/.

If yes, please add the following section to config.php of Nextcloud:

'onlyoffice' =>
  array (
    "jwt_secret" => "secret",
    "jwt_header" => "header"
	)

Secret and header should match the corresponding values from local.json.

@NanoSector
Copy link

@alexanderonlyoffice I do not have JWT enabled, but the issue seems to have disappeared for me overnight, I did not touch anything...

@LinneyS
Copy link
Member

LinneyS commented Dec 10, 2018

@Floflobel

Is it possible to add a function that regularly forces the backup in nextcloud?

We are working on the implementation of the command "forcesave"

@Floflobel
Copy link
Author

@Floflobel

Is it possible to add a function that regularly forces the backup in nextcloud?

We are working on the implementation of the command "forcesave"

@LinneyS
Will the command "forcesave" be done regularly even if the document is open or only a manual option?

@Floflobel
Copy link
Author

Hey @LinneyS, have you got any news on this issue and implementation of the command "forcesave" ?

@Floflobel
Copy link
Author

Floflobel commented May 14, 2019

Hello @LinneyS, any news on this important request ?

@msumm
Copy link

msumm commented Aug 20, 2019

As pointed out in #118 the problem might be hot-fixed by disabling the Versions App (in particular when the files to edit are located on an external storage).

@jannishuebl
Copy link

@LinneyS we are facing the same issue. The current behavior is not very obvious for my users.
It is currently a blocker for us, because we rely on the files being uptodate for being downloaded.

@Floflobel
Copy link
Author

Can we get a feedback on the implementation of the "forcesave" command? Is it planned for soon or does it already exist?

@jannishuebl
Copy link

Still not using onlyoffice because of this issue, can we provide some Help? Do you think is issue could be implemented, by some external Person? Or is it to complicated?

Some Feedback would be great!

@j0hj0h
Copy link

j0hj0h commented Dec 12, 2019

@alexanderonlyoffice did i get it right: you suggest that this is a configuration issue and it should actually work in the current version that a document is saved BEFORE all clients have closed it?

@alexanderonlyoffice
Copy link
Member

@Floflobel, we apologize for the delayed response. We are still working on the implementation of forcesave feature in integration with Nextcloud. Unfortunately, I cannot tell you the exact time frames, as there are some technical issues with its implementation.

@j0hj0h, please specify what issue exactly you meant under 'this'. At the moment the final version of the file is built only when all editing sessions are over.

@Floflobel
Copy link
Author

@alexanderonlyoffice Thank you for your answer, it is important for us to be kept informed of the progress of this problem.

@nikkilocke
Copy link

nikkilocke commented Dec 23, 2019

@alexanderonlyoffice

Can you please confirm that, if multiple people are editing a document with OnlyOffice, the file in Nextcloud is only updated when the last person closes their edit window?

And can you define what closing their edit window means, technically? For instance, if someone opened a document on 29 October, and kept the document open on their desktop computer until 20 December, then there was an Internet routing problem between them and the Nextcloud server such that they couldn't reach the server, and they closed their browser and cleared their browser cache (in an attempt to reconnect), would all changes to the document since 29 October be lost?

If so, that would explain what just happened to us, and why we no longer have any records of our meeting minutes since 29 October!

I think this is a serious flaw, and have had to uninstall OnlyOffice as a result. I am very interested in whether/when this is going to be fixed.

@alexanderonlyoffice
Copy link
Member

@nikkilocke, yes, the version of the file is built in 10 seconds after the last user has leaves the editing session (closes the tab with the file in browser), then it is saved in the storage.

All changes to the file are stored in Document Server's cache at the moment of editing till the editing is over. If there is an Internet disconnect, it is considered as tab closing and the version is built.

There is also one mechanism preventing from data loss: if the storage is inaccessible at the moment when the file is ready to be saved, the file will be saved in forgotten folder. For deb/rpm package installation it is placed in /var/lib/onlyoffice/documentserver/App_Data/cache/files/

There is one more option for now except force saving - it is "sessionidle": parameter in default.json config of the Document Server that is responsible for closing editing sessions due to users' inactivity. Its value can be set, for example, in the following way: "1h" or "1d" or "50m" etc.

If so, that would explain what just happened to us, and why we no longer have any records of our meeting minutes since 29 October!

Unfortunately, we cannot tell you the exact reason without analyzing additional information about the issue. Could you please specify the following:

  1. OS of the server where ONLYOFFICE Document Server is installed;
  2. Its installation type (docker or deb/rpm);
  3. Check the logs of the Document Server for any error entries.

@Floflobel
Copy link
Author

@alexanderonlyoffice Where can I find documentation on all the parameters in the .json files (default.json, local.json, production.json). I didn't know the "sessionidle" option and I haven't seen it documented.

After some tests this function temporarily solves the problem of saving in nextcloud.

@b3nis
Copy link

b3nis commented Mar 31, 2020

I have the same issue - already lost one document and some content in another one.

I cannot find the default.json file you are talking about @alexanderonlyoffice - the only content of the OnlyOffie folder is:

drwxr-xr-x  3 www-data www-data  4096 Feb 24 16:33 3rdparty
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 appinfo
drwxr-xr-x 20 www-data www-data  4096 Feb 24 16:33 assets
-rw-r--r--  1 www-data www-data    64 Feb 24 16:33 AUTHORS.md
-rw-r--r--  1 www-data www-data  4487 Feb 24 16:33 CHANGELOG.md
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 controller
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 css
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 img
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 js
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 l10n
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 lib
-rw-r--r--  1 www-data www-data 34520 Feb 24 16:33 LICENSE
-rw-r--r--  1 www-data www-data 14811 Feb 24 16:33 README.md
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 screenshots
drwxr-xr-x  2 www-data www-data  4096 Feb 24 16:33 templates

Running Nextcloud with the official docker version, updated to 18.0.3, and same behaviour. Of course running latest version of OnlyOffice and Document Server.
(running on Ubuntu Server 19.10 together with nginx, letsencrypt and mariadb in docker as well).

Thanks in advance!

@biva
Copy link

biva commented Apr 2, 2020

Thanks @Floflobel and @alexanderonlyoffice for the info. I have 2 questions though:

  1. I noticed that the "real" saving happens only every 15 minutes (at 9:00, 9:15, 9:30, ...). Is there a way to reduce this 15 minutes period to 1 minute? (I'm not the only one, it's mentioned here as well, with a period of 30 minutes: File changes are shown in OnlyOffice but don't appear in Files app nextcloud/documentserver_community#12 (comment))
  2. Where should I find default.json to reduce the inactivity time with sessionidle parameter? I'm using the Community Document Server App and the OnlyOffice App on Nextcloud and there's nothing under /etc/

@b3nis
Copy link

b3nis commented Apr 2, 2020

@biva, same for me. But it doesn't save for me at all. And it looks likes I am in the document many times when opening and closing it. I would love to have the capacity of, like, 4 ppl but I don't.
I can also not find the default.json.

@biva
Copy link

biva commented Apr 2, 2020

@b3nis did you close the tab? the browser? Did you restart your server?

@szaimen
Copy link

szaimen commented Apr 2, 2020

I think the default.json gets removed during the build process:
https://github.com/nextcloud/documentserver_community/blob/d6a76d2ceae02f3c2cee087971147ee14e4ba0ef/Makefile#L20

Afaik it should have been located in .../documentserver_community/3rdparty/onlyoffice/documentserver/server/Common/config/default.json
So I don't think that this will work.

BTW: you can find the default.json here https://github.com/ONLYOFFICE/server/blob/master/Common/config/default.json

Concerning the saving every 15min: That sounds like the documentserver_community is dependent on the nextcloud cron interval. So if you can adjust that time to one minute it would maybe solve the problem...
https://help.nextcloud.com/t/change-cron-job-interval-from-15-minutes-to-50-minutes/66436/4
but please notice: https://help.nextcloud.com/t/running-background-jobs-every-minute-instead-of-15-mins/37414/7

@alexanderonlyoffice
Copy link
Member

@b3nis and @biva, please note that if you are using preinstalled Community Document Server integrated in Nextcloud Hub, you need to contact Nextcloud support team, as this application was developed by their team. Please refer to this post on our forum.

@biva
Copy link

biva commented Apr 2, 2020

Thanks @alexanderonlyoffice and @szaimen ! We'll continue the discussion in nextcloud/documentserver_community#12

@rogercreagh
Copy link

@alexanderonlyoffice I'm puzzled why this has been closed since the bug exists in onlyoffice as well as the communitydocumentserver (CDS) (which presumably inherited the bug from only office).
We were getting the problem with OnlyOffice five months ago and had to give up using it. When NC18 was released with CDS we tried that to see if they had fixed the bug - but it was still happening.
Are you saying that there is a version of OnlyOffice available which has fixed the problem - if so where can we find it to install locally please?

@ibnpetr
Copy link
Member

ibnpetr commented Apr 5, 2020

@rogercreagh

Are you saying that there is a version of OnlyOffice available which has fixed the problem - if so where can we find it to install locally please?

Could you please specify what kind of problem do you mean.
Just make sure that you have the latest version of the Document Server installed and send us any information about the above mentioned mentioned issue.
Feel free to create a new issue if the symptoms are different.

@jannishuebl
Copy link

@ibnpetr The Problem is the following: Onlyoffice Documentserver is only sending a callback when all connections to the Documents are closed. This rises the following Problem:

As long as people have the Document opened, when the Document gets downloaded from Nextcloud the document is not the same as the one opened.

It is not clear, why no callback is send to Nextcloud, when the Editor "Saves" the Document to Onlyoffice.

For me this method should also be called when the editor saves:
https://github.com/ONLYOFFICE/server/blob/89db803eb5f1722ba84cb3ac9e94c503d434f6ea/DocService/sources/DocsCoServer.js#L730

This would call:

public function track($doc, $users, $key, $status, $url, $token) {

That are my findings so far, but I didn't have the time to dig deeper into it. Is there a reason why the hook is not executed everytime the editor saves?

@thmo
Copy link

thmo commented Jun 14, 2020

Experiencing the same issue (document not saved in nextcloud), with NC19, using the OnlyOffice app 4.2.0, and both, documentserver_community 0.1.5 as well as external documentserver 5.5.3.39.

Following this comment the problem lies within the integration app, probably not sending call-backs where needed.

See also #292, #296.

Imho this issue should be repoened.

@richardrey
Copy link

I have the same problem I cannot save the documents edited by OnlyOffice, I only save it as a copy I can save it otherwise no changes will be saved.

@jannishuebl
Copy link

jannishuebl commented Jul 24, 2020

@alexanderonlyoffice could you reopen this Ticket? Still not solved and really annoying! We are still not using onlyoffice because of this.

And I tell a lot of people not using onlyoffice because of this Bug. They would be your users not mine.

This is not a Bug within nextcloud or nextcloud-plugin, but in the external Integration like i showed in #21 (comment)

Thank you,

Jannis

@rogercreagh
Copy link

The arrogance of closing a live issue that causes users to loose data and makes the product not fit for use says a lot about OnlyOffice's attitude. They don't understand so they close their eyes to the issue in the hopes it will go away.
Other solutions (Collabora, Office365, GoogleDocs) are available and work properly.
This (ex-)user has gone away, and I encourage others to do likewise...

@fthommen
Copy link

There is still the ticket nextcloud/documentserver_community#100 open, which I think deals with the same issue

@jannishuebl
Copy link

Which Imho is the wrong project to address. It's not a problem with nextcloud or the nextcloud onlyoffice plugin, it's a bug/not feature of the Onlyoffice document server.

@b3nis
Copy link

b3nis commented Jul 27, 2020

I can only agree. Do not seem like a crazy thing to fix and causes a lot of issues. I have lost data because of this...

@LinneyS
Copy link
Member

LinneyS commented Sep 17, 2020

Hi all!
Try Keep intermediate versions when editing in settings in v6.0.0

@ghost
Copy link

ghost commented Sep 18, 2020

@LinneyS Can you explain what this means exactly ("Keep intermediate versions when editing"), i.e. what the positive effects are now with OnlyOffice? Does this finally solve the force save problem? Thanks a lot

@alexanderonlyoffice
Copy link
Member

@michaelflohr, "Keep intermediate versions when editing" option is responsible for saving the current state of the file by clicking on the 'Save' button while editing. This is exactly the force save feature, but with a different name.

Here in our Blog https://www.onlyoffice.com/blog/2020/09/onlyoffice-connector-v-6-0-0-for-nextcloud-with-force-save-is-available/ is more information about this feature added in ONLYOFFICE connector version 6.0.0.

@Floflobel
Copy link
Author

Thanks for the implementation of the "force save" function which was a very important element for us to be able to use onlyoffice in production.

I have a request that would solve a lot of problems. Is it possible to force save regularly all the documents being edited with this new function? (with a command line for example)

@celogeek
Copy link

Hi,
I have tried this on Nextcloud 20, with the docker image onlyoffice/documentserver.

Without the "keep intermediate", the document is saved in cached. After closing the document, it is saved for real when the cron job pass. For me, it is every 5 minutes.

With this option, I still have the autosave and the cron job, but when I explicitly click on the save button, it pushes it back to Nextcloud.

Now I can rely on this. Thanks a lot.

I also try the Nextcloud documentserver App that embeds directly the documentserver. This option is effectless, and we still have autosave + cron. To force a sync, I need to run the occ documentserver:flush command. This is less usable than the Save button.

I prefer to rely on explicit save to be sure it is sync, but having an autosaved just in case is reassuring.

@pongraczi
Copy link

Hi, please check my detailed debug, maybe the same source of the problem: nextcloud/documentserver_community#170 (comment)

@hoangdh
Copy link

hoangdh commented Nov 5, 2020

You can setting the config forcesave.

Ref: https://api.onlyoffice.com/editors/save#forcesave

@sneakyx
Copy link

sneakyx commented Nov 4, 2022

I came here by searching for an error in our setup.
After making an update to nextcloud, our files didn't update after editing with onlyoffice documentserver. Our setup is: we have both in seperate docker containers running on a proxmox vm and an extra nginx-vm that does the ssl-termination as reverse proxy.
After 3 months working on one specific file, it took a very long time to open the file. Then we realised, that the file stored in nextcloud was 3 months old and we found errors in docker log in the onlyoffice docker container:

[WARN] nodeJS - sendServerRequest returned an error: docId = 19352967; data = {"error":1}
[WARN] nodeJS - storeForgotten: docId = 19352967

If you find these errors, check your connection to nextcloud. In our case the nextcloud instance couldn't connect to onlyoffice. We had to add a line to /etc/hosts so that nextcloud finds onlyoffice.
We could solve this issue to our installation, but there remains two questions:

Where does the node part of onlyoffice store the temporary files? (I want to check if every file is transfered to nextcloud.)
Are other files automatically transfered to nextcloud when the connection is back again or do I have to open every file that was changed since the last 3 months?

Thanks.

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

No branches or pull requests