PDF.js v1.1.469 (build: f06aa6a) Message: Unexpected server response (500) while retrieving PDF

HI Team,
I am getting below error when some of my users are trying to access PDF file

Unexpected server response.

PDF.js v1.1.469 (build: f06aa6a)
Message: Unexpected server response (500) while retrieving PDF

Please note that : Encryption is enabled

What is strange is that my profile (admin) do not have this issue (I am able to open any file)
and when I added admin rights to users having this issue, it remain the same.
To be complete, users can open files they dropped on the Owncloud portal, but cannot open file dropped by other users.
It is an infrastructure I just recovered and in the future I want to disable encryption (to complicated to manage as to many users from various area)

here is the libk to access logs and screenshots :

Thx for your help !


**ownCloud version: 9.1.6


If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

**Are you using external storage, if yes which one: SMB/CIFS

Are you using encryption: yes

**Are you using an external user-backend, if yes which one: Yes LDAP.

LDAP configuration :

CN=zzLDAPS,OU=Service Accoumt,OU=domain, DC=ch

This is very old. There might be many issues that have since been fixed. Likewise to the disabling encryption I would recommend upgrading your ownCloud similarly high on your todo list. Question is disable encryption before or after the upgrade? I would guess disabling it first can save you a lot of headaches, but I have no real world experience. Perhaps @cdamken or @pako81 have some input here? Also on how exactly to disable it? :wink:

When you say encryption is enabled I would usually ask which one? Master- or user-key? But I’m not even sure if you had these options back in ownCloud version 9. You being able to access all files, makes me believe masterkey encryption is in use.

I’ve had a look in the logs and it seems like these are the relevent error lines:

{"reqId":"3sdWRDIa71kXmGwhB+gC","remoteAddr":"","app":"encryption","message":"no public key found for user "07BA68AE-7C04-4125-9C9C-BBD95FBD12BD", user will not be able to read the file","level":2,"time":"2020-04-17T13:23:05+00:00","method":"POST","url":"/index.php/apps/files/ajax/upload.php","user":"MICA-Mandataire"}
{"reqId":"xAD3zUrKlZQ2J8l6XcCL","remoteAddr":"","app":"webdav","message":"Exception: {"Message":"Missing Signature","Exception":"OCHintException","Code":0,"Trace":"
#0 /var/www/owncloud/apps/encryption/lib/Crypto/Crypt.php(527): OCAEncryptionCryptoCrypt->hasSignature('vm32ab46PkwCCsG...', 'AES-256-CTR')
#1 /var/www/owncloud/apps/encryption/lib/Crypto/Crypt.php(460): OCAEncryptionCryptoCrypt->splitMetaData('vm32ab46PkwCCsG...', 'AES-256-CTR')
#2 /var/www/owncloud/apps/encryption/lib/Crypto/Encryption.php(363): OCAEncryptionCryptoCrypt->symmetricDecryptFileContent('vm32ab46PkwCCsG...', 'x8DExB6xFCIxE5xB2xA4xC5xBFx16x07xBB8x8E...', 'AES-256-CTR', 1, 227)
#3 /var/www/owncloud/lib/private/Files/Stream/Encryption.php(459): OCAEncryptionCryptoEncryption->decrypt('vm32ab46PkwCCsG...', 227)
#4 /var/www/owncloud/lib/private/Files/Stream/Encryption.php(290): OCFilesStreamEncryption->readCache()
#5 [internal function]: OCFilesStreamEncryption->stream_read(6104)
#6 /var/www/owncloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php(83): fread(Resource id #140, 8192)
#7 /var/www/owncloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(91): IcewindStreamsWrapper->stream_read(8192)
#8 [internal function]: IcewindStreamsCallbackWrapper->stream_read(8192)
#9 /var/www/owncloud/3rdparty/sabre/http/lib/Sapi.php(78): stream_copy_to_stream(Resource id #144, Resource id #146, '2197153')
#10 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(470): SabreHTTPSapi::sendResponse(Object(SabreHTTPResponse))
#11 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): SabreDAVServer->invokeMethod(Object(SabreHTTPRequest), Object(SabreHTTPResponse))
#12 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(61): SabreDAVServer->exec()
#13 /var/www/owncloud/remote.php(164): require_once('/var/www/ownclo...')
#14 {main}","File":"/var/www/owncloud/apps/encryption/lib/Crypto/Crypt.php","Line":562,"User":"MICA-Mandataire"}","level":4,"time":"2020-04-30T06:57:59+00:00","method":"GET","url":"/remote.php/webdav/GROUPEMENT/5-AO/Lustrerie-%C3%A9lectricit%C3%A9/5-Rapport%20d'adjudication/Annexe%20E2%20-%20Questions-r%C3%A9ponses%20GE.pdf","user":"MICA-Mandataire"}
{"reqId":"xAD3zUrKlZQ2J8l6XcCL","remoteAddr":"","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at /var/www/owncloud/3rdparty/sabre/http/lib/Sapi.php:78) at /var/www/owncloud/3rdparty/sabre/http/lib/Sapi.php#58","level":3,"time":"2020-04-30T06:57:59+00:00","method":"GET","url":"/remote.php/webdav/GROUPEMENT/5-AO/Lustrerie-%C3%A9lectricit%C3%A9/5-Rapport%20d'adjudication/Annexe%20E2%20-%20Questions-r%C3%A9ponses%20GE.pdf","user":"MICA-Mandataire"}
1 Like

Sorry for the delay… and Thx very much for your feedback.

this allowed me to beter understand how data encryption was managed. Only administrator was able to access files.
So the only way to recover data was to open file with the admin account.
Once done we removed the encryption.

1 Like