Lately (I belive since update to nextcloud 13.0.2) I keep seeing lots of undefined index error messages in my logs such as:
"Undefined index: encrypted at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#171"
"Undefined index: storage at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#173"
"Undefined index: mimetype at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#175"
"Undefined index: permissions at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#180"
I was wondering if anyone here has similar issues. Also wanted to perhaps establish whether its only my instance related issue before I make a bug report on github.
Any ideas on what could be causing this error is greatly appreciated.
So indeed no storage, mimetype, permissions etc. Unless I’m looking at the wrong place in the database. I compared it with another instance and the table is identical but I dont get the error message.
This is actually not related to DB tables. The error message you receive mention a problem with the Nextcloud code in file /var/www/nextcloud/lib/private/Files/Cache/Cache.php
The error message refers to the following function:
Here it is tried to extract the value for the index ‘encrypted’ from the array ‘data’. And that index is undefined/ doesn’t exist - as the error message describes.
I don’t know the root cause though. Maybe you have an encryption app enabled or use encryption and there is something wrong. Is this a debug, info, warning or critical message?
I do have encryption on, but I was getting the message on pretty much all indexes (including storage, mimetype etc upon upload for example). About two hours ago I decided to switch off redis and seems like the message in logs is gone and my cpu load dropped significantly (more then half).
Update
Looks like I was too quick with my assumptions. The message is back
I can reproduce it on mobile (seems like its mostly associated with mobile user agents) by just browsing files, and opening documents. for each file i get missing index for: parent, size, mtime, storage_mtime, encrypted, mimetype, mimepart, permissions
Seems like the issue is triggered by end-to-end encryption app. The moment it is enabled I get the message in the log on all file operations, even if no encrypted folder present on user account.
I guess this is not expected behaviour or is it?
(both end-to-end encryption app and nextcloud are running latest stable version).
The original posting has been opened for Nextcloud 13, which is not supported anymore. It might be possible that this problem has already been fixed in a newer release. Are you still using NC 13 or are you using a different version and can still reproduce the problem?