Skip to content

[Bug]: files_versions is crashing NC32.0.13 with "Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization" #55531

@EasyNetDev

Description

@EasyNetDev

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrade the NextCloud to 32.0.13 I've started to see this error in the logs each time I wanted to modify an existing file in my NextCloud. To solve the problem I disabled files_versions app.

Steps to reproduce

  1. Upgrade to 32.0.13
  2. Try to modify an existing file, like a txt file
  3. Error occurs.

Expected behavior

To work as in previous version. As workaround I had to disable files_versions app in my Nextcloud.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.easynet.dev",
            "nc.easynet.dev"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "nextcloud.easynet.dev",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "logtimezone": "Europe\/Bucharest",
        "debug": false,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "maintenance": false,
        "theme": "",
        "version": "32.0.0.13",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Memcached",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "user": "nextcloud",
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0,
            "timeout": 1.5,
            "read_timeout": 1.5
        },
        "updater.release.channel": "stable",
        "overwrite.cli.url": "https:\/\/nextcloud.easynet.dev\/",
        "htaccess.RewriteBase": "\/",
        "default_phone_region": "RO",
        "app_install_overwrite": {
            "0": "deck",
            "1": "ojsxc",
            "3": "twofactor_admin"
        },
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "mail_smtpsecure": "ssl",
        "mail_smtpport": "465",
        "maintenance_window_start": 1,
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

List of activated Apps

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - announcementcenter: 7.2.1
  - app_api: 32.0.0
  - approval: 2.4.0
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.0.0
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.0.2
  - contactsinteraction: 1.13.1
  - cookbook: 0.11.4
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.0
  - encryption: 2.20.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_accesscontrol: 3.0.0
  - files_automatedtagging: 3.0.0
  - files_confidential: 3.3.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_retention: 3.0.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - fileslibreofficeedit: 2.0.1
  - firstrunwizard: 5.0.0-dev.0
  - forms: 5.2.1
  - groupfolders: 20.1.1
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - mail: 5.5.6
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.3
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - richdocuments: 9.0.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.0
  - survey_client: 4.0.0-dev.0
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - tables: 0.9.5
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_email: 2.8.2
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - user_ldap: 1.23.0
  - user_status: 1.12.0
  - user_usage_report: 3.0.0
  - viewer: 5.0.0-dev.0
  - webhook_listeners: 1.3.0
  - whiteboard: 1.2.1
  - workflow_kitinerary: 1.8.1
  - workflow_pdf_converter: 3.0.0
  - workflowengine: 2.14.0
Disabled:
  - afterlogic: 2.0.13 (installed 2.0.13)
  - drawio: 3.1.1 (installed 3.1.1)
  - files_antivirus: 6.0.5 (installed 6.0.5)
  - files_versions: 1.25.0 (installed 1.25.0)
  - fulltextsearch_elasticsearch: 31.0.0 (installed 31.0.0)
  - geoblocker: 0.5.18 (installed 0.5.18)
  - gpxpod: 7.0.4 (installed 7.0.4)
  - jitsi: 0.19.0 (installed 0.19.0)
  - maps: 1.6.0 (installed 1.6.0)
  - metadata: 0.22.0 (installed 0.22.0)
  - notify_push: 1.2.0 (installed 1.2.0)
  - ojsxc: 5.0.0 (installed 5.0.0)
  - passwords: 2025.10.20 (installed 2025.9.20)
  - support: 4.0.0-dev.0 (installed 1.5.0)
  - tasks: 0.16.1 (installed 0.16.1)
  - text: 6.0.0-dev.0 (installed 6.0.0-dev.0)
  - weather_status: 1.12.0 (installed 1.12.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"E8rKuzFVyNpvlYcaSnEW","level":3,"time":"2025-10-03T21:28:58+03:00","remoteAddr":"2001:171b:2267:5ac1:4620:2cec:827:9750","user":"XXXXXX XXX","app":"webdav","method":"PUT","url":"/remote.php/dav/files/XXXXXX%20XXX/Network%20-%20EasyNet/WIKI/ZigBee2MQTT/ZigBee2MQTT%20on%20RPi%201.txt","message":"Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization","userAgent":"Mozilla/5.0 (Linux) mirall/3.16.4-1 (Debian built) (Nextcloud, debian-6.12.48+deb13-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.0.13","clientReqId":"354f8199-9092-4133-a88b-463f4e8be87a","exception":{"Exception":"Error","Message":"Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization","Code":0,"Trace":[{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Cache.php","line":1185,"function":"shouldEncrypt","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":198,"function":"copyFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":225,"function":"{closure:OC\\Files\\Cache\\Updater::copyFromStorage():187}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":187,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/View.php","line":282,"function":"copyFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/View.php","line":975,"function":"copyUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":160,"function":"copy","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Versions/VersionManager.php","line":92,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Storage.php","line":216,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\VersionManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Listener/FileEventsListener.php","line":209,"function":"store","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Listener/FileEventsListener.php","line":82,"function":"write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Node/HookConnector.php","line":74,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/legacy/OC_Hook.php","line":85,"function":"write","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/File.php","line":417,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/File.php","line":145,"function":"emitPreHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/Server.php","line":211,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Server.php","line":424,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/remote.php","line":151,"args":["/var/www/nextcloud-current/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud-current/lib/private/Files/Cache/Cache.php","Line":659,"message":"Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization","exception":{},"CustomMessage":"Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization"}}
{"reqId":"E8rKuzFVyNpvlYcaSnEW","level":3,"time":"2025-10-03T21:28:58+03:00","remoteAddr":"2001:171b:2267:5ac1:4620:2cec:827:9750","user":"XXXXX XXX","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/XXXXXX%20XXX/Network%20-%20EasyNet/WIKI/ZigBee2MQTT/ZigBee2MQTT%20on%20RPi%201.txt","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Linux) mirall/3.16.4-1 (Debian built) (Nextcloud, debian-6.12.48+deb13-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.0.13","clientReqId":"354f8199-9092-4133-a88b-463f4e8be87a","exception":{"Exception":"Error","Message":"Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization","Code":0,"Trace":[{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Cache.php","line":1185,"function":"shouldEncrypt","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":198,"function":"copyFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":225,"function":"{closure:OC\\Files\\Cache\\Updater::copyFromStorage():187}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/lib/private/Files/Cache/Updater.php","line":187,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/View.php","line":282,"function":"copyFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/View.php","line":975,"function":"copyUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":160,"function":"copy","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Versions/VersionManager.php","line":92,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Storage.php","line":216,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\VersionManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Listener/FileEventsListener.php","line":209,"function":"store","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud-current/apps/files_versions/lib/Listener/FileEventsListener.php","line":82,"function":"write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/Files/Node/HookConnector.php","line":74,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud-current/lib/private/legacy/OC_Hook.php","line":85,"function":"write","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/File.php","line":417,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/File.php","line":145,"function":"emitPreHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud-current/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud-current/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Connector/Sabre/Server.php","line":211,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/lib/Server.php","line":424,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud-current/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud-current/remote.php","line":151,"args":["/var/www/nextcloud-current/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud-current/lib/private/Files/Cache/Cache.php","Line":659,"message":"Uncaught exception","exception":[],"CustomMessage":"Uncaught exception"},"id":"68e0187dcda5e"}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions