Skip to content

[Bug]: Error 500 when adding .webp files with Webdav #3451

@spyjo

Description

@spyjo

⚠️ This issue respects the following points: ⚠️

Bug description

When adding a .webp file through Webdav, the server throws a 500 error.

The main error found in logs is "Class "WoltLab\WebpExif\ChunkType" not found"

Steps to reproduce

  1. Connect to Webdav
  2. Try to add a .webp file

Expected behavior

The file should be added without error.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MariaDB

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

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

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": [
            "cloud.mydomain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.0.16",
        "overwrite.cli.url": "https:\/\/cloud.mydomain.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "defaultapp": "files",
        "default_phone_region": "FR",
        "trashbin_retention_obligation": "auto, 5",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "maintenance_window_start": 1,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 6.0.0-dev.0
  - app_api: 33.0.0
  - bruteforcesettings: 6.0.0-dev.0
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contactsinteraction: 1.14.1
  - dashboard: 7.13.0
  - dav: 1.36.0
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0-dev.0
  - files_pdfviewer: 6.0.0-dev.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0-dev.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud_announcements: 5.0.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0-dev.0
  - photos: 6.0.0-dev.0
  - privacy: 5.0.0-dev.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0-dev.0
  - related_resources: 4.0.0-dev.0
  - serverinfo: 5.0.0-dev.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - support: 5.0.0
  - systemtags: 1.23.0
  - text: 7.0.0-dev.3
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0-dev.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0-dev.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - workflowengine: 2.15.0
Disabled:
  - admin_audit: 1.23.0
  - encryption: 2.21.0
  - files_external: 1.25.1
  - survey_client: 5.0.0-dev.0 (installed 1.13.0)
  - suspicious_login: 11.0.0-dev.0
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
    "reqId": "81BdyTYB10aI649sbQnL",
    "level": 3,
    "time": "2026-03-21T09:20:06+00:00",
    "remoteAddr": "my.ip.address",
    "user": "admin",
    "app": "no app in context",
    "method": "PUT",
    "url": "/remote.php/dav/files/admin/myfile.webp",
    "scriptName": "/remote.php",
    "message": "Uncaught exception",
    "userAgent": "--",
    "version": "33.0.0.16",
    "exception":
    {
        "Exception": "Error",
        "Message": "Class \"WoltLab\\WebpExif\\ChunkType\" not found",
        "Code": 0,
        "Trace":
        [
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/photos/lib/Listener/ExifMetadataProvider.php",
                "line": 180,
                "function": "decodeChunk",
                "class": "WoltLab\\WebpExif\\Decoder",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "Nelexa\\Buffer\\ResourceBuffer@anonymous\u0000/var/www/cloud.mydomain.com/web/apps/photos/lib/Listener/ExifMetadataProvider.php:140$4f"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/photos/lib/Listener/ExifMetadataProvider.php",
                "line": 82,
                "function": "getExifFromWebP",
                "class": "OCA\\Photos\\Listener\\ExifMetadataProvider",
                "type": "->",
                "args":
                [
                    null
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/ServiceEventListener.php",
                "line": 57,
                "function": "handle",
                "class": "OCA\\Photos\\Listener\\ExifMetadataProvider",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                "line": 220,
                "function": "__invoke",
                "class": "OC\\EventDispatcher\\ServiceEventListener",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    },
                    "OCP\\FilesMetadata\\Event\\MetadataLiveEvent",
                    {
                        "__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                "line": 56,
                "function": "callListeners",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    [
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        }
                    ],
                    "OCP\\FilesMetadata\\Event\\MetadataLiveEvent",
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php",
                "line": 67,
                "function": "dispatch",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    },
                    "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php",
                "line": 79,
                "function": "dispatch",
                "class": "OC\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    "OCP\\FilesMetadata\\Event\\MetadataLiveEvent",
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/FilesMetadata/FilesMetadataManager.php",
                "line": 100,
                "function": "dispatchTyped",
                "class": "OC\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\FilesMetadata\\Event\\MetadataLiveEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/FilesMetadata/Listener/MetadataUpdate.php",
                "line": 42,
                "function": "refreshMetadata",
                "class": "OC\\FilesMetadata\\FilesMetadataManager",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OC\\Files\\Node\\File"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/ServiceEventListener.php",
                "line": 57,
                "function": "handle",
                "class": "OC\\FilesMetadata\\Listener\\MetadataUpdate",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                "line": 220,
                "function": "__invoke",
                "class": "OC\\EventDispatcher\\ServiceEventListener",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    },
                    "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
                    {
                        "__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                "line": 56,
                "function": "callListeners",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    [
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        },
                        {
                            "__class__": "Closure"
                        }
                    ],
                    "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php",
                "line": 67,
                "function": "dispatch",
                "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    },
                    "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php",
                "line": 79,
                "function": "dispatch",
                "class": "OC\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/Files/Node/HookConnector.php",
                "line": 83,
                "function": "dispatchTyped",
                "class": "OC\\EventDispatcher\\EventDispatcher",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/lib/private/legacy/OC_Hook.php",
                "line": 85,
                "function": "postWrite",
                "class": "OC\\Files\\Node\\HookConnector",
                "type": "->",
                "args":
                [
                    {
                        "path": "/myfile.webp"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/File.php",
                "line": 443,
                "function": "emit",
                "class": "OC_Hook",
                "type": "::",
                "args":
                [
                    "OC_Filesystem",
                    "post_write",
                    {
                        "path": "/myfile.webp"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/File.php",
                "line": 363,
                "function": "emitPostHooks",
                "class": "OCA\\DAV\\Connector\\Sabre\\File",
                "type": "->",
                "args":
                [
                    true
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/Server.php",
                "line": 1137,
                "function": "put",
                "class": "OCA\\DAV\\Connector\\Sabre\\File",
                "type": "->",
                "args":
                [
                    "*** sensitive parameters replaced ***"
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
                "line": 492,
                "function": "updateFile",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args":
                [
                    "*** sensitive parameters replaced ***"
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
                "line": 89,
                "function": "httpPut",
                "class": "Sabre\\DAV\\CorePlugin",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "Sabre\\HTTP\\Request"
                    },
                    {
                        "__class__": "Sabre\\HTTP\\Response"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/Server.php",
                "line": 472,
                "function": "emit",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args":
                [
                    "method:PUT",
                    [
                        {
                            "__class__": "Sabre\\HTTP\\Request"
                        },
                        {
                            "__class__": "Sabre\\HTTP\\Response"
                        }
                    ]
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/Server.php",
                "line": 212,
                "function": "invokeMethod",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args":
                [
                    {
                        "__class__": "Sabre\\HTTP\\Request"
                    },
                    {
                        "__class__": "Sabre\\HTTP\\Response"
                    }
                ]
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/dav/lib/Server.php",
                "line": 427,
                "function": "start",
                "class": "OCA\\DAV\\Connector\\Sabre\\Server",
                "type": "->",
                "args":
                []
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/apps/dav/appinfo/v2/remote.php",
                "line": 25,
                "function": "exec",
                "class": "OCA\\DAV\\Server",
                "type": "->",
                "args":
                []
            },
            {
                "file": "/var/www/cloud.mydomain.com/web/remote.php",
                "line": 151,
                "args":
                [
                    "/var/www/cloud.mydomain.com/web/apps/dav/appinfo/v2/remote.php"
                ],
                "function": "require_once"
            }
        ],
        "File": "/var/www/cloud.mydomain.com/web/apps/photos/vendor/woltlab/webp-exif/src/Decoder.php",
        "Line": 96,
        "message": "Uncaught exception",
        "exception": "{\"class\":\"Error\",\"message\":\"Class \\\"WoltLab\\WebpExif\\ChunkType\\\" not found\",\"code\":0,\"file\":\"/var/www/cloud.mydomain.com/web/apps/photos/vendor/woltlab/webp-exif/src/Decoder.php:96\",\"trace\":\"#0 /var/www/cloud.mydomain.com/web/apps/photos/lib/Listener/ExifMetadataProvider.php(180): WoltLab\\WebpExif\\Decoder->decodeChunk(Object(Nelexa\\Buffer\\ResourceBuffer@anonymous))\\n#1 /var/www/cloud.mydomain.com/web/apps/photos/lib/Listener/ExifMetadataProvider.php(82): OCA\\Photos\\Listener\\ExifMetadataProvider->getExifFromWebP(Resource id nextcloud/server#70)\\n#2 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/ServiceEventListener.php(57): OCA\\Photos\\Listener\\ExifMetadataProvider->handle(Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent))\\n#3 /var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php(220): OC\\EventDispatcher\\ServiceEventListener->__invoke(Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent), 'OCP\\\\FilesMetada...', Object(Symfony\\Component\\EventDispatcher\\EventDispatcher))\\n#4 /var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\\Component\\EventDispatcher\\EventDispatcher->callListeners(Array, 'OCP\\\\FilesMetada...', Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent))\\n#5 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php(67): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch(Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent), 'OCP\\\\FilesMetada...')\\n#6 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php(79): OC\\EventDispatcher\\EventDispatcher->dispatch('OCP\\\\FilesMetada...', Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent))\\n#7 /var/www/cloud.mydomain.com/web/lib/private/FilesMetadata/FilesMetadataManager.php(100): OC\\EventDispatcher\\EventDispatcher->dispatchTyped(Object(OCP\\FilesMetadata\\Event\\MetadataLiveEvent))\\n#8 /var/www/cloud.mydomain.com/web/lib/private/FilesMetadata/Listener/MetadataUpdate.php(42): OC\\FilesMetadata\\FilesMetadataManager->refreshMetadata(Object(OC\\Files\\Node\\File))\\n#9 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/ServiceEventListener.php(57): OC\\FilesMetadata\\Listener\\MetadataUpdate->handle(Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent))\\n#10 /var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php(220): OC\\EventDispatcher\\ServiceEventListener->__invoke(Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent), 'OCP\\\\Files\\\\Event...', Object(Symfony\\Component\\EventDispatcher\\EventDispatcher))\\n#11 /var/www/cloud.mydomain.com/web/3rdparty/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\\Component\\EventDispatcher\\EventDispatcher->callListeners(Array, 'OCP\\\\Files\\\\Event...', Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent))\\n#12 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php(67): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch(Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent), 'OCP\\\\Files\\\\Event...')\\n#13 /var/www/cloud.mydomain.com/web/lib/private/EventDispatcher/EventDispatcher.php(79): OC\\EventDispatcher\\EventDispatcher->dispatch('OCP\\\\Files\\\\Event...', Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent))\\n#14 /var/www/cloud.mydomain.com/web/lib/private/Files/Node/HookConnector.php(83): OC\\EventDispatcher\\EventDispatcher->dispatchTyped(Object(OCP\\Files\\Events\\Node\\NodeWrittenEvent))\\n#15 /var/www/cloud.mydomain.com/web/lib/private/legacy/OC_Hook.php(85): OC\\Files\\Node\\HookConnector->postWrite(Array)\\n#16 /var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/File.php(443): OC_Hook::emit('OC_Filesystem', 'post_write', Array)\\n#17 /var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/File.php(363): OCA\\DAV\\Connector\\Sabre\\File->emitPostHooks(true)\\n#18 /var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/Server.php(1137): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id nextcloud/server#53)\\n#19 /var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(492): Sabre\\DAV\\Server->updateFile('files/admin/myfile...', Resource id nextcloud/server#53, NULL)\\n#20 /var/www/cloud.mydomain.com/web/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\\n#21 /var/www/cloud.mydomain.com/web/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\\DAV\\Server->emit('method:PUT', Array)\\n#22 /var/www/cloud.mydomain.com/web/apps/dav/lib/Connector/Sabre/Server.php(212): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\\n#23 /var/www/cloud.mydomain.com/web/apps/dav/lib/Server.php(427): OCA\\DAV\\Connector\\Sabre\\Server->start()\\n#24 /var/www/cloud.mydomain.com/web/apps/dav/appinfo/v2/remote.php(25): OCA\\DAV\\Server->exec()\\n#25 /var/www/cloud.mydomain.com/web/remote.php(151): require_once('/var/www/cloud....')\\n#26 {main}\"}",
        "CustomMessage": "Uncaught exception"
    }
}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't working

    Type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions