I can't delete files after the upgrade (Trying to access array offset on value of type bool at )

Hi

I upgraded to 20.0.10 from 20.0.7 the other day. I thought everything was working well until today, when I tried to delete a file on my Android. It told me “Malfunction server configuration” Then I tried to delete a file in the web UI, I got “Error deleting file xxxx.xxx” It still deletes the file but with an ugly message like that.

I made sure that the data folder has www-data permissions for the files and the folders. I really do not think that it is a permission issue.

I disabled file locking, it did nt help. I flushed the Redis cache, that did not help either. I am now feeling like this is a bug of some sort.

I am on Debian Testing, Php 7.4.15, Apache 2.4.14, Mariadb 15.1

Here is the portion of the log that shows what happens when I try to delete a file. Is anyone able to speculate on the issue based on this?

       
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
  "version": "20.0.10.1"
}
{
  "reqId": "FQPermXwbzjSLxgxcUzV",
  "level": 4,
  "time": "2021-06-17T04:28:51+00:00",
  "remoteAddr": "192.168.2.100",
  "user": "USER",
  "app": "webdav",
  "method": "DELETE",
  "url": "/nc/remote.php/dav/files/USER/temp/testfile.jpg",
  "message": {
    "Exception": "Error",
    "Message": "Call to a member function getId() on array",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
        "line": 160,
        "function": "remove",
        "class": "OC\\Files\\Cache\\Cache",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 329,
        "function": "remove",
        "class": "OC\\Files\\Cache\\Updater",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1179,
        "function": "removeUpdate",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 724,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 466,
        "function": "unlink",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 183,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 295,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->"
      },
      {
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "call_user_func_array"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 474,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 251,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 319,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Server.php",
        "line": 332,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/remote.php",
        "line": 167,
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
    "Line": 528,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
  "version": "20.0.10.1"
}
{
  "reqId": "OVuyG19GbhKSVrdTeEZe",
  "level": 0,
  "time": "2021-06-17T04:28:51+00:00",
  "remoteAddr": "192.168.2.100",
  "user": "USER",
  "app": "apporder",
  "method": "GET",
  "url": "/nc/index.php/apps/files/ajax/getstoragestats.php",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
  "version": "20.0.10.1"
}
{
  "reqId": "OVuyG19GbhKSVrdTeEZe",
  "level": 0,
  "time": "2021-06-17T04:28:51+00:00",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         769380,38     99%

config.php

<?php
$CONFIG = array (
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxx',
  'datadirectory' => '/media/nextcloud/data',
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud',
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxx',
  'dbhost' => 'localhost:3306',
  'dbtableprefix' => 'oc_',
  'version' => '20.0.10.1',
  'installed' => true,
  'maxZipInputSize' => 0,
  'allowZipDownload' => true,
  'theme' => '',
  'maintenance' => false,
  'forcessl' => true,
  'filelocking.enabled' => 'true',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'tempdirectory' => '/media/temp',
  'trusted_domains' => 
  array (
    
  ),
  'loglevel' => 0,
  'mail_smtpmode' => 'smtp',
  'secret' => 'xxxx',
  'trashbin_retention_obligation' => 'auto',
  'overwrite.cli.url' => 'xxxx',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.release.channel' => 'stable',
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'enable_previews' => true,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_from_address' => 'contact',
  'mail_domain' => 'xxx',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxx',
'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxx',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'xxxx',
  'mail_smtppassword' => 'xxx',
  'mail_smtpsecure' => 'tls',
  'app_install_overwrite' => 
  array (
    0 => 'files_downloadactivity',
    1 => 'bookmarks_fulltextsearch',
    2 => 'joplin',
    3 => 'sharerenamer',
    4 => 'files_3d',
    5 => 'files_trackdownloads',
  ),
  'has_rebuilt_cache' => true,
  'encryption.legacy_format_support' => true,
  'encryption.key_storage_migrated' => false,
  'mysql.utf8mb4' => true,
);


Another log line that is peculiar too, maybe related


Error: Trying to access array offset on value of type bool at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#439
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 439:

OC\Log\ErrorHandler::onError()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 300:

OC\Files\Storage\Wrapper\Encryption->fopen()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 751:

OC\Files\Storage\Wrapper\Wrapper->fopen()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 621:

OC\Files\Storage\Wrapper\Encryption->copyBetweenStorage()

/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 240:

OC\Files\Storage\Wrapper\Encryption->moveFromStorage()

/var/www/nextcloud/apps/files_trashbin/lib/Trashbin.php - line 322:

OCA\Files_Trashbin\Storage->moveFromStorage()

/var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php - line 108:

OCA\Files_Trashbin\Trashbin::move2trash()

/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php - line 103:

OCA\Files_Trashbin\Trash\LegacyTrashBackend->moveToTrash()

/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 203:

OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()

/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 103:

OCA\Files_Trashbin\Storage->doDelete()

/var/www/nextcloud/lib/private/Files/View.php - line 1167:

OCA\Files_Trashbin\Storage->unlink()

/var/www/nextcloud/lib/private/Files/View.php - line 724:

OC\Files\View->basicOperation()

/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 466:

OC\Files\View->unlink()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 183:

OCA\DAV\Connector\Sabre\File->delete()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 295:

Sabre\DAV\Tree->delete()

<<closure>>

Sabre\DAV\CorePlugin->httpDelete()

/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

call_user_func_array()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:

Sabre\DAV\Server->emit()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:

Sabre\DAV\Server->invokeMethod()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:

Sabre\DAV\Server->start()

/var/www/nextcloud/apps/dav/lib/Server.php - line 332:

Sabre\DAV\Server->exec()

/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/nextcloud/remote.php - line 167:


After randomly and frantically clicking on buttons and random tutorials, I totally had a lightning struck moment. Disable the frigging Default encryption module if you want to avoid this error that messes with your inner animal instincts. I just wasted two hours on this nonsense :frowning:

I did not have encryption enabled, so i do not know why this app was doing some backdoor diplomacy and messing with my files.

I am scared to hell to enable the encryption given I could not even get the updated encryption passwords registered properly in the past. I saw horror stories of people loosing their files and access after enabling the encryption, which I even had myself. Some of my users were able to login, and some were not. I had to resort to backups to revert back to previous state.