nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
356 stars 116 forks source link

Encryption corrupts documents after some hours #3151

Open michelleDeko opened 1 year ago

michelleDeko commented 1 year ago

Describe the bug I and co-workers wrote a documentation about a network in nextcloud office. After about 4 hours of writing the document suddenly went blank. I then tried to restore a older version with the "versions" feature, all corrupted. I then tried restarting NGinx and PHP, didn't help. After that I tried downloading it and open it with Microsoft Word. Word couldn't open it, because it was corrupted. Today it happend again with an Excel file.

To Reproduce Steps to reproduce the behavior:

  1. Open Word/Excel/(probably also PowerPoint) file
  2. Write something
  3. After some hours there are 2 possibilities: either it gets corrupted while you still write or it gets corrupted while it's closed.

Expected behavior It should not get corrupted.

Client details:

Server details

Operating system: Debian 12

Web server: NGinx

Database: MariaDB

PHP version: PHP 8.1

Nextcloud version: 27.0.2

Version of the richdocuments app 8.1.1

Version of Collabora Online 23.5.305

Logs #### Nextcloud log (data/nextcloud.log) ``` https://paste.miichelle.moe/upload/snail-shark-bee ```
juliusknorr commented 1 year ago

The errors look a bit like the keys are missing

"Couldn't re-calculate unencrypted size for files_versions/Schulmappen/Call Center.docx.v1657785659"
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "
"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_9854c095.publicKey existing mounts: "

This sounds a bit like https://github.com/nextcloud/richdocuments/issues/2996#issuecomment-1702546036 but should not happen on 27.0.2 anymore.

Can you still reproduce this with a fresh file? Any chance that the file that was affected has been written last time while still being on 27.0.0?

michelleDeko commented 1 year ago

@juliushaertl I think this error started to appear with 27.0.2 if I'm honest. The pubShare files didn't change since 18.8.2023.