documentserver_community icon indicating copy to clipboard operation
documentserver_community copied to clipboard

Excel File - after close - client sync only after cron job run, wrong downloaded version, versioning failures

Open Githopp192 opened this issue 5 years ago • 6 comments

Actual behaviour

When editing i.e an EXCEL File - the File will not suddenly being synchronized to the Clients (i.e. Windows NC Agent). This only happens when the next PHP-Cron Job will run. (after it has run).

Also when leaving the Document (in this case the EXCEL File) and then push the Download button, the current Version of the Document will not be downloaded (instead it will download an old version).

Again here - the download is only working, when the next PHP-Cron Job will run. (after it has run).

This hit me once - because - i lost some of my data into the Excel through this behave.

Also - i think the NC versioning did not work as expected.

Steps to reproduce

every time when repeating those steps

Expected behaviour

  • all Changes to the document should have a reflection to:
  1. the Document itself (proper saving)
  2. Client Sychronization without delay
  3. File versioning is working properly

Server configuration details

Operating System: System Linux 4.18.0-240.1.1.el8_3.x86_64 Build => Hat

Webserver: Apache/2.4.37 (centos)

Database: mysql 10.3.17-MariaDB,

PHP version: PHP Version => 7.4.13

[PHP Modules] apcu bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext gmp hash iconv igbinary imagick intl json ldap libsmbclient libxml mbstring memcached msgpack mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline redis Reflection session shmop SimpleXML smbclient sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache

Nextcloud: - version: 19.0.5.2

{ "system": { "memcache.local": "\OC\Memcache\APCu", "filelocking.enabled": true, "redis": { "host": "REMOVED SENSITIVE VALUE", "timeout": 1.5, "password": "REMOVED SENSITIVE VALUE" }, "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ ], "datadirectory": "REMOVED SENSITIVE VALUE", "htaccess.RewriteBase": "/", "overwriteprotocol": "https", "dbtype": "mysql", "version": "19.0.5.2", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "maintenance": false, "theme": "", "loglevel": 0, "updater.release.channel": "stable", "auth.bruteforce.protection.enabled": true, "check_for_working_htaccess": true, "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_domain": "REMOVED SENSITIVE VALUE", "mail_smtpsecure": "tls", "mail_smtpauth": 1, "mail_smtpname": "REMOVED SENSITIVE VALUE", "mail_smtppassword": "REMOVED SENSITIVE VALUE", "mail_smtphost": "REMOVED SENSITIVE VALUE", "session_lifetime": 1200, "session_keepalive": false, "logfile": "/media/log/nextcloud.log", "knowledgebaseenabled": false, "log_rotate_size": 3145728, "mail_sendmailmode": "smtp", "app_install_overwrite": [ "passman",

Enabled:

  • accessibility: 1.5.0
  • activity: 2.12.1
  • analytics: 2.6.0
  • announcementcenter: 3.8.1
  • apporder: 0.11.0
  • audioplayer: 2.13.1
  • audioplayer_editor: 0.3.0
  • audioplayer_sonos: 1.2.0
  • bookmarks: 3.4.9
  • bruteforcesettings: 2.0.1
  • calendar: 2.0.4
  • circles: 0.19.11
  • cloud_federation_api: 1.2.0
  • comments: 1.9.0
  • contacts: 3.4.2
  • contactsinteraction: 1.0.0
  • cookbook: 0.7.7
  • cospend: 1.0.5
  • data_request: 1.6.0
  • dav: 1.15.0
  • deck: 1.2.2
  • dicomviewer: 1.2.2
  • documentserver_community: 0.1.8
  • drawio: 0.9.8
  • event_update_notification: 1.0.2
  • extract: 1.2.5
  • federatedfilesharing: 1.9.0
  • federation: 1.9.0
  • files: 1.14.0
  • files_3d: 0.3.3
  • files_antivirus: 3.1.0
  • files_automatedtagging: 1.9.0
  • files_downloadactivity: 1.8.0
  • files_markdown: 2.3.1
  • files_mindmap: 0.0.23
  • files_pdfviewer: 1.8.0
  • files_photospheres: 1.19.1
  • files_rightclick: 0.16.0
  • files_sharing: 1.11.0
  • files_trashbin: 1.9.0
  • files_versions: 1.12.0
  • files_videoplayer: 1.8.0
  • firstrunwizard: 2.8.0
  • flowupload: 1.1.2
  • forms: 2.0.4
  • gpxedit: 0.0.13
  • gpxmotion: 0.0.11
  • gpxpod: 4.2.2
  • groupfolders: 7.1.1
  • health: 0.1.3
  • impersonate: 1.6.1
  • issuetemplate: 0.7.0
  • logreader: 2.4.0
  • lookup_server_connector: 1.7.0
  • maps: 0.1.6
  • nextcloud_announcements: 1.8.0
  • notes: 3.6.4
  • notifications: 2.7.0
  • oauth2: 1.7.0
  • onlyoffice: 6.2.0
  • passman: 2.3.6
  • password_policy: 1.9.1
  • photos: 1.1.0
  • polls: 1.6.2
  • privacy: 1.3.0
  • provisioning_api: 1.9.0
  • quicknotes: 0.6.3
  • quota_warning: 1.8.0
  • rainloop: 7.0.3
  • ransomware_protection: 1.7.0
  • recommendations: 0.7.0
  • serverinfo: 1.9.0
  • settings: 1.1.0
  • sharebymail: 1.9.0
  • socialsharing_diaspora: 2.1.0
  • socialsharing_email: 2.1.0
  • socialsharing_facebook: 2.1.0
  • socialsharing_twitter: 2.1.0
  • spreed: 9.0.6
  • support: 1.2.1
  • suspicious_login: 3.2.1
  • systemtags: 1.9.0
  • tasks: 0.13.6
  • terms_of_service: 1.5.2
  • text: 3.0.1
  • theming: 1.10.0
  • timemanager: 0.1.6
  • twofactor_backupcodes: 1.8.0
  • twofactor_totp: 5.0.0
  • updatenotification: 1.9.0
  • video_converter: 0.1.5
  • viewer: 1.3.0
  • workflow_ocr: 1.19.1
  • workflow_pdf_converter: 1.4.0
  • workflow_script: 1.4.0
  • workflowengine: 2.1.0 Disabled:
  • admin_audit
  • breezedark
  • dashboard
  • drop_account
  • encryption
  • end_to_end_encryption
  • external
  • files_accesscontrol
  • files_external
  • files_fulltextsearch
  • fulltextsearch
  • fulltextsearch_elasticsearch
  • joplin
  • jsloader
  • passwords
  • registration
  • richdocuments
  • side_menu
  • socialsharing_googleplus
  • survey_client
  • user_ldap
  • weather

Githopp192 avatar Dec 11 '20 23:12 Githopp192

these are some message i saw into the nc.log -->

"2020-12-11T21:27:08+01:00","remoteAddr":"xxx.xxx.xxx.xxx", "user":"Michael","app":"no app in context","method":"GET","url":"/remote.php/webdav/Documents/Shopping/xxx.xlsx?downloadStartSecret=ctjfvlscnoo", "message":"Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200, "*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)", "*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)", "httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)", "*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"}, "debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)", "*listeners":{"...":"Over 20 items, aborting normalization"},"*wildcardListeners":[],"*listenerIndex":[],"*logger":null}}, "Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null", "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.57","version":"19.0.5.2"}

Just saw, that one Excel File - i did an update into - was only updated after 10 minutes, even if CRON is running now every 5 minutes ..

Document will be left in this way -->

ScreenShot1100

NC is using REDIS .. so i tried also to flush REDIS Cache to Disk .. same result (flushall).

Githopp192 avatar Dec 12 '20 10:12 Githopp192

Today did the Upgrade to NC Version: 20.0.4 - same issue

Githopp192 avatar Dec 19 '20 21:12 Githopp192

same issue here

robinm8 avatar Dec 19 '20 21:12 robinm8

The following fixes worked for me:

  1. On my Linux installation in /usr/share/webapps/nextcloud/config/config.php, appended the following to the $CONFIG array:
  array(
    'verify_peer_off => TRUE,'
  ),
  1. Added crontab entry for user running nextcloud via php-fpm etc.
  • on my Linux installation, the user is "http"
    • sudo crontab -u http -e
      */5  *  *  *  * php -f /usr/share/webapps/nextcloud/cron.php
      */1  *  *  *  * php -f /usr/share/webapps/nextcloud/occ documentserver:flush
      
  1. Edited /usr/share/webapps/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php
  • Followed the pull request #114
    • Modified line 130 to be:
      $cutoffTime = $this->timeFactory->getTime() - 30;
      
  1. Modified nextcloud admin settings onlyoffice:
  • checkmark "Disable certificate verification"
  • checkmark "Generate document preview"
  • un-checkmark "Keep intermediate versions when editing"
  • un-checkmark all of the customization section "Display ..."

After these fixes, excel files worked for me (YMMV)

robinm8 avatar Dec 21 '20 04:12 robinm8

Thx robinm8,

found a good article how OO will handle document savings -->

https://www.onlyoffice.com/blog/2020/04/save-and-force-save-in-onlyoffice-never-lose-a-document/

i think for my needs "verify_peer_off => TRUE,'" is not necessary; i think this is only needed, if you're using "Self-signed-Certs".

It seems, that one of the main issues here is, that OO will not flush the contents to disk in time, when you will leave the document (there's no real EXIT button in Nextcloud - only a button to open the "File Location".

And yes .. the "Flush command" does the Job.

The rest i did not change - and it seems to work.

Some time ago, when the OO-App did not exist yet as App into the NC App Store - i used an extra VM with Docker to run OO. And i must say - i never had issues - so it seems that the NC App Integration is not so "mature" as my Docker (OO) Installation was.

Githopp192 avatar Dec 23 '20 23:12 Githopp192

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 60 days. Thank you for your contribution!

Retaking repo management include inheritance of old, not treated, and probablty obsolete issues, this is why it was decided to mark issues as stale.

github-actions[bot] avatar Jul 22 '24 00:07 github-actions[bot]

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] avatar Sep 23 '24 00:09 github-actions[bot]

That was/is? a for ever problem in OnlyOffice .. since i switched to Nextclouf Office (Collabora) this problem was gone.

Githopp192 avatar Sep 23 '24 20:09 Githopp192