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

Download from HumHub yields old version of document due to browser caching #28

Closed
dreua opened this issue Dec 22, 2020 · 5 comments
Closed

Comments

@dreua
Copy link

dreua commented Dec 22, 2020

Steps to reproduce

  1. Download a document directly from HumHub (i.e. click on it as a post attachment and then "Download x.x kB"). I tested all this with Spreadsheets / XLSX but filetype shouldn't matter.
  2. Edit the document in OnlyOffice (i.e. click on it again and then "Edit Document", change something, close.)
  3. Reload the page (Ideally we would get the latest version without reloading but that may be another issue.)
  4. Download the file again. (Same as in 1)

Expected Results

Downloaded file has the latest changes.

Actual Results

When using HTTPS or Chromium browser: Downloaded file is outdated, the same as in in step 1.

Tested browsers

Chromium 85.0.4183.102 (Developer Build): Issue appears via both HTTP and HTTPS
Firefox 81.0: Issue appears via HTTPS. On HTTP only the very last change may be missing if you download right after closing the editor. After navigation in HumHub or page reload, you get the latest version. (My best guess is that HTTPS enables the progressive web app which in turn changes something in the caching.)
(Both running on Linux / Fedora 32)

Further information

If you slightly change the download url (right click on Download button-> copy url) e.g. the argument download=0 to download=1 or any other value, you get the latest version.
Example: https://my-server/index.php?r=file%2Ffile%2Fdownload&guid=b7a22780-9a71-471e-b9ae-ab7a55a9951a&download=12345

Downloading from within onlyoffice (i.e. "Edit Document”, top left “File” -> “Download as”) also works correctly but I must assume it is rarely used compared to direct download from humhub.

Questions

  1. Can someone confirm or deny that issue? (I don't have access to any other Humhub + OO instance.)
  2. Can we fix it?

Versions

Server: CentOS 8, DocumentServer in Docker container accessible through an Apache reverse proxy for SSL. Same Apache serves HumHub on a different subdomain.

Humhub 1.7.1
ONLYOFFICE Connector for HumHub 2.1.4

@alexanderonlyoffice
Copy link
Member

@dreua, please specify some additional information about your environment and the issue:

  1. Do you encounter problems when working with spreadsheets only or with other file formats?
  2. How do you enable HTTPS? Please send us the guide you are using for that.
  3. Please send us an archive with all Document Server logs to support@onlyoffice.com with a note "For technical support 2LVL". Folder is /app/onlyoffice/DocumentServer/logs/documentserver/ on the host, if mounted. If you did not mount the folder, please look for it inside the container /var/log/onlyoffice/documentserver/.
  4. Currently installed version of the Document Server.

Please note that you need to wait about 15-20 seconds after the browser tab with file is closed, as there is a file conversion and save delay.

@dreua
Copy link
Author

dreua commented Dec 23, 2020

Hey @alexanderonlyoffice, thanks for your reply! Were you not able to reproduce the issue or haven't you tried yet?

It seems to me that this is a caching issue that would need to be fixed in humhub or the onlyoffice-humhub plugin, the document server is not really involved in that imho. I forgot to mention that I instantly get the newest version when I download with a different browser (one that hasn't downloaded that document before) and I do not see a request in the Apache access log whenever I get an old version of a file, therefore I think it must be the browser cache.

To your requests for more information:

  1. Same with text documents (docx).
  2. I didn't follow a guide, it's just Apache with mod_md and mod_ssl. I roughly described my setup in Module not working for HTTPS-Only HumHub installations #3 (comment)
  3. Done
  4. The latest available from Dockerhub, the Humhub plugin says 6.1.0.83.

Please note that you need to wait about 15-20 seconds after the browser tab with file is closed, as there is a file conversion and save delay.

I gave it a few minutes but still get the same old version in the same browser. I think I once got a version that was older than a day.

@alexanderonlyoffice
Copy link
Member

@dreua, we checked the case and we also encountered the problem with caching. The reason of the problem is in implementation of caching in HumHub and it cannot be solved on the connector's side. We would recommend you to try to contact HumHub team regarding this issue.

Temporary solution would be to disable cache in HumHub or to download the files from the editor directly: File tab -> Download as... option.

@dreua
Copy link
Author

dreua commented Dec 30, 2020

@alexanderonlyoffice Thank you for your investigation and clarification!

@dreua
Copy link
Author

dreua commented Mar 19, 2021

Fix confirmed with 1.8.1, closing. Thanks to everyone involved! ❤️

@dreua dreua closed this as completed Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants