Fatal webdav error - decryptionFailedException when syncing files

Hi folks,
unfortunately I can’t sync my files to server. I have some strange error in log, saying that the encryption messed up somehow. I activated the encryption only for external storage.

Fatal webdav Exception: {“Message”:“Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.”,“Exception”:“OC\Encryption\Exceptions\DecryptionFailedException”,“Code”:0,“Trace”:"#0 /var/www/nextcloud/lib/private/Files/Stream/Encryption.php(460): OCA\Encryption\Crypto\Encryption->decrypt(‘Je l\xC3\xA4nger ich …’, ‘0end’)\n#1 /var/www/nextcloud/lib/private/Files/Stream/Encryption.php(291): OC\Files\Stream\Encryption->readCache()\n#2 [internal function]: OC\Files\Stream\Encryption->stream_read(228)\n#3 /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php(83): fread(Resource id #169, 8192)\n#4 /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(91): Icewind\Streams\Wrapper->stream_read(8192)\n#5 [internal function]: Icewind\Streams\CallbackWrapper->stream_read(8192)\n#6 /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php(78): stream_copy_to_stream(Resource id #172, Resource id #174, ‘228’)\n#7 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(470): Sabre\HTTP\Sapi::sendResponse(Object(Sabre\HTTP\Response))\n#8 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#9 /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php(60): Sabre\DAV\Server->exec()\n#10 /var/www/nextcloud/remote.php(165): require_once(’/var/www/nextcl…’)\n#11 {main}",“File”:"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php",“Line”:361,“User”:“myUser”} 2016-10-19T12:53:46+02:00 myUser

Error no app in context Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you. 2016-10-19T12:53:46+02:00 myUser

Error PHP fread(): Length parameter must be greater than 0 at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#83 2016-10-19T12:53:46+02:00 myUser

Error no app in context Exception: {“Exception”:“OC\Encryption\Exceptions\DecryptionFailedException”,“Message”:“Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.”,“Code”:0,“Trace”:"#0 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php(574): OCA\Encryption\Crypto\Encryption->decrypt(*** sensitive parameters replaced ***)\n#1 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php(493): OC\Files\Storage\Wrapper\Encryption->fixUnencryptedSize(‘files/Dokumente…’, 228, 228)\n#2 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php(162): OC\Files\Storage\Wrapper\Encryption->verifyUnencryptedSize(‘files/Dokumente…’, 228)\n#3 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php(401): OC\Files\Storage\Wrapper\Encryption->filesize(‘files/Dokumente…’)\n#4 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(294): OC\Files\Storage\Wrapper\Encryption->fopen(‘files/Dokumente…’, ‘rb’)\n#5 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(294): OC\Files\Storage\Wrapper\Wrapper->fopen(‘files/Dokumente…’, ‘rb’)\n#6 /var/www/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php(292): OC\Files\Storage\Wrapper\Wrapper->fopen(‘files/Dokumente…’, ‘rb’)\n#7 /var/www/nextcloud/lib/private/Files/View.php(1118): OCA\FilesAccessControl\StorageWrapper->fopen(‘files/Dokumente…’, ‘rb’)\n#8 /var/www/nextcloud/lib/private/Files/View.php(963): OC\Files\View->basicOperation(‘fopen’, ‘/Dokumente/Note…’, Array, ‘rb’)\n#9 /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php(305): OC\Files\View->fopen(‘Dokumente/Notes…’, ‘rb’)\n#10 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(83): OCA\DAV\Connector\Sabre\File->get()\n#11 [internal function]: Sabre\DAV\CorePlugin->httpGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#12 /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#13 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit(‘method:GET’, Array)\n#14 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#15 /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php(60): Sabre\DAV\Server->exec()\n#16 /var/www/nextcloud/remote.php(165): require_once(’/var/www/nextcl…’)\n#17 {main}",“File”:"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php",“Line”:361} 2016-10-19T12:53:46+02:00 myUser

Error no app in context Couldn’t re-calculate unencrypted size for files/somePath/myFile.txt

OS

  • Version: Ubuntu 16.04

Apache

  • Version: 2.4

NC server

  • Version: 10.0

Android

  • Version: 6.0.1

PHP

  • Version: 7.0.8
  • Memory Limit: 512.0 MB
  • Max Execution Time: 3600
  • Upload max size: 513.0 MB

mysql

  • Version: 5.7.13
  • Size: 160.6 MB

Did you try to reshare the content if it is shared content?

I removed sharing and shared the content again. But same problem. The one that I shared with has the same errors.

@bjoern can you help here?

Maybe also interesting…completeley new files do work without issues.

More and more files have this issue. Any updates on that?

Open an issue on github.com/nextcloud/server/issues

Okay. But before I go ahead, do you think this issue might be solved by following any of:




I did not really understand the cause for this issue and how I can fix it.

Hi,

I’m currently using NC 10.0.02, and having the same error.
Any solution?

System info:

Debian 8
Nginx 1.6.2
PHP 5.6.27
MySQL: 5.5

If resharing doesn’t work, please open an issue on github. The above linked topics give you an idea what you can do to debug but if there were fixes in the code they should already be in your version.

Hey @tx7, could you place your experiences on this ticket https://github.com/nextcloud/server/issues/2020?

Till now there is no response from the dev team or community.