[Bug]: Shared document is empty after multiple people edit it
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
We're experiencing problems with nextcloud while editing documents (onlyoffice) - after doing below steps to reproduce end result is that file is completely empty and it's not being saved. We're able to reproduce it and found related errors in the logs.
We noticed the following error when checking Logging in NC admin Error index Exception: Call to a member function getId() on bool in file '/var/www/nextcloud/apps/files_versions/lib/Storage.php' line 197
Steps to reproduce
- person A creates a new file, e.g. docx, in a shared folder and he edits it (put some text inside)
- person B opens the same file and it sees the content inside from point 1) and add additionally some text
- person A and person B close the file
- no matter with person opens the file, it's empty
Expected behavior
File should not be empty, changes should be saved and preserved.
Installation method
Community Manual installation with Archive
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nc01.doing.ch"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "24.0.4.1",
"overwrite.cli.url": "https:\/\/nc01.doing.ch",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_smtpauth": 1,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "CH",
"filelocking.enabled": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6380
},
"log_type": "file",
"logfile": "nextcloud.log",
"loglevel": 1,
"logdateformat": "F d, Y H:i:s",
"mail_smtpsecure": "ssl",
"onlyoffice": {
"verify_peer_off": true,
"jwt_header": "AuthorizationJwt"
},
"maintenance": false,
"app_install_overwrite": [
"integration_whiteboard"
],
"theme": ""
}
}
List of activated Apps
Enabled:
- accessibility: 1.10.0
- activity: 2.16.0
- admin_audit: 1.14.0
- bruteforcesettings: 2.4.0
- calendar: 3.5.0
- circles: 24.0.1
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contacts: 4.2.0
- dashboard: 7.4.0
- dav: 1.22.0
- drawio: 1.0.3
- emlviewer: 1.0.2
- end_to_end_encryption: 1.10.0
- federatedfilesharing: 1.14.0
- federation: 1.14.0
- files: 1.19.0
- files_accesscontrol: 1.14.1
- files_antivirus: 3.3.1
- files_lock: 24.0.1
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- groupfolders: 12.0.1
- integration_whiteboard: 0.0.14
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- metadata: 0.16.0
- notifications: 2.12.0
- oauth2: 1.12.0
- onlyoffice: 7.5.4
- password_policy: 1.14.0
- photos: 1.6.0
- privacy: 1.8.0
- provisioning_api: 1.14.0
- recommendations: 1.3.0
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- spreed: 14.0.4
- support: 1.7.0
- survey_client: 1.12.0
- systemtags: 1.14.0
- text: 3.5.1
- theming: 1.15.0
- twofactor_backupcodes: 1.13.0
- twofactor_email: 2.5.0
- twofactor_totp: 6.4.0
- updatenotification: 1.14.0
- user_status: 1.4.0
- viewer: 1.8.0
- workflowengine: 2.6.0
Disabled:
- contactsinteraction: 1.5.0
- encryption
- files_external
- files_mindmap: 0.0.26
- files_pdfviewer: 2.5.0
- mail: 1.13.8
- nextcloud_announcements: 1.13.0
- openotp_auth
- user_ldap
- weather_status: 1.4.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"eqqr0IjWgey1X0gyULjF","level":3,"time":"2022-09-08T07:49:18+00:00","remoteAddr":"ip_hidden","user":"email_hidden","app":"index","method":"POST","url":"/index.php/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtaXNsYXZAZG9pbmcuY2giLCJvd25lcklkIjoib2ZmaWNlQGRvaW5nLmNoIiwiZmlsZUlkIjo1NDI1MCwiZmlsZVBhdGgiOiJcL1RlYW0gRXZlbnRzXC9UZXN0XC9UZXN0LmRvY3giLCJzaGFyZVRva2VuIjpudWxsLCJhY3Rpb24iOiJ0cmFjayJ9.KQjKTHfrsWnLbQB0lKJEkcaglxOuq-DDVV8cQ8_R7oU","message":"Call to a member function getId() on bool in file '/var/www/nextcloud/apps/files_versions/lib/Storage.php' line 197","userAgent":"Node.js/6.13","version":"24.0.4.1","exception":{"Exception":"Exception","Message":"Call to a member function getId() on bool in file '/var/www/nextcloud/apps/files_versions/lib/Storage.php' line 197","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"Error","Message":"Call to a member function getId() on bool","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_versions/lib/Hooks.php","line":56,"function":"store","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"write_hook","class":"OCA\\Files_Versions\\Hooks","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1290,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1160,"function":"runHooks","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":711,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":543,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":771,"function":"OCA\\Onlyoffice\\Controller\\{closure}","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":544,"function":"retryOperation","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"track","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","Line":197},"CustomMessage":"--"},"id":"63199e9ccacc6"}
Additional info
errors found in onlyoffice when this happen
[2022-09-08T07:49:18.167] [ERROR] nodeJS - sendServerRequest error: docId = 1513619393;url = https://url_hidden/index.php/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtaXNsYXZAZG9pbmcuY2giLCJvd25lcklkIjoib2ZmaWNlQGRvaW5nLmNoIiwiZmlsZUlkIjo1NDI1MCwiZmlsZVBhdGgiOiJcL1RlYW0gRXZlbnRzXC9UZXN0XC9UZXN0LmRvY3giLCJzaGFyZVRva2VuIjpudWxsLCJhY3Rpb24iOiJ0cmFjayJ9.KQjKTHfrsWnLbQB0lKJEkcaglxOuq-DDVV8cQ8_R7oU;data = {"key":"1513619393","status":2,"url":"https://url_hidden/cache/files/1513619393_4335/output.docx/output.docx?md5=yxS4ObTKP0XPxGDvWoIVAw&expires=1662624259&filename=output.docx","changesurl":"https://url_hidden/cache/files/1513619393_4335/changes.zip/changes.zip?md5=NAhFmTVT8WDfR7ApbribLQ&expires=1662624259&filename=changes.zip","history":{"serverVersion":"7.1.1","changes":[{"created":"2022-09-08 07:49:08","user":{"id":"oc42z7j8nxyl_user_hidden","name":"name_hidden"}}]},"users":["oc42z7j8nxyl_user_hidden"],"actions":[{"type":0,"userid":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Le6YWvVKQvpkRQKS_8Z19a1IRX578YqiJhB2FA","filetype":"docx"} Error: Error response: statusCode:500; headers:{"date":"Thu, 08 Sep 2022 07:49:18 GMT","server":"Apache/2.4.41 (Ubuntu)","strict-transport-security":"max-age=15552000; includeSubDomains","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-robots-tag":"none","x-xss-protection":"1; mode=block","upgrade":"h2","connection":"Upgrade, close","set-cookie":["oc42z7j8nxyl=qlqabht9fja8uiihj68smka7q0; path=/; secure; HttpOnly; SameSite=Lax","oc_sessionPassphrase=a9umF50snPcloe7Uby23ddECHwyPjFPFjT%2BZ7L5lCdQm347dL6e5KHk%2Fl0BTwticdihf1fllwmMhM8bWznArVB9v4cIiEwSPJmbqyFpcXx%2FeseEIY%2B9JqHVHYXTruwmQ; path=/; secure; HttpOnly; SameSite=Lax","oc42z7j8nxyl=ln8l6a492hicnoqnmq437mu7qk; path=/; secure; HttpOnly; SameSite=Lax","__Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax","__Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-store, no-cache, must-revalidate","pragma":"no-cache","content-security-policy":"default-src 'self'; script-src 'self' 'nonce-a09LcTNGbDk4TGozeFNVZlMxTlkxVTNlNExRV1V5WVh0emdxRW1HaHo5dz06NWJiL3Ntd1FwZmVXcEhWR01nQTZ1SFdJci9CL1pFTWozSHg0WmhESGhacz0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';","content-length":"3793","content-type":"text/html; charset=UTF-8"}; body:
nc_cloud_hidden
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
<h3>Technical details</h3>
<ul>
<li>Remote Address: ip_hidden</li>
<li>Request ID: eqqr0IjWgey1X0gyULjF</li>
</ul>
</div>
</main>
</div>
</div>
<footer role="contentinfo">
<p class="info">
<a href="https://url_hidden" target="_blank" rel="noreferrer noopener" class="entity-name">nc_cloud_hidden</a> – A safe home for our data! </p>
</footer>
</body>
at Request._callback (/snapshot/server/build/server/Common/sources/utils.js)
at Request.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
at Request.emit (events.js:400:28)
at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
at Request.emit (events.js:400:28)
at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:519:28)
at IncomingMessage.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2022-09-08T07:49:18.167] [WARN] nodeJS - commandSfcCallback backoff limit exceeded: docId = 1513619393 [2022-09-08T07:49:18.180] [WARN] nodeJS - storeForgotten: docId = 1513619393
Hi, please report thos to https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues