Skip to content

[Bug]: Uploading large .dng RAW images succeeds, but gives error 500 via iOS client and server log indicates TypeError strlen(): Argument #1 ($string) must be of type string, false given Uncaught exception #62095

Description

@NCfeedback

⚠️ This issue respects the following points: ⚠️

Bug description

Full server below log after uploading 75mb .dng photos both manually and automatically with iOS client on iPad and iOS both on 26.5.2, NC Server 24.0.1, iOS client 33.1.09:

Steps to reproduce

  1. Upload image via iOS client manually or automatically, file completes and appears but does not show successful

Expected behavior

I was able to add this line:
if ($json === false) { $json = '{}'; }
Above line 167 in:
private/FilesMetadata/FilesMetadataManager.php
And achieve results, however not sure this is the correct answer for future releases

Nextcloud Server version

34

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 31 to 32)

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***",
        "serverid": "1",
        "trusted_domains": [
            "localhost",
            "192.*.*.*",
            "Mydomain1",
            "10.*.*.*",
            "Mydomain2",
            "Mydomain3",
        ],
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\MP4",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\HEIF",
            "OC\\Preview\\DNG",
            "OC\\Preview\\MOV",
            "OC\\Preview\\X-DCRaw",
            "OC\\Preview\\Imagick",
            "OC\\Preview\\x-adobe-dng",
            "OC\\Preview\\tiff"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "tempdirectory": "\/mnt\/f\/nextcloud\/TempDownloads",
        "dbtype": "mysql",
        "version": "34.0.1.2",
        "overwrite.cli.url": "https:\/\/Mydomain1",
        "overwriteprotocol": "https",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbdriveroptions": {
            "2": 2,
            "1002": "SET NAMES utf8mb4"
        },
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "backgroundjobs_mode": "cron",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "davstorage.request_timeout": 30,
        "session_relaxed_expiry": true,
        "session_keepalive": true,
        "installed": true,
        "check_data_directory_permissions": false,
        "filelocking.enabled": true,
        "maintenance": false,
        "bulkupload.enabled": false,
        "trashbin_retention_obligation": "auto, 10",
        "default_phone_region": "US",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "localstorage.umask": 2,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 30,
            "read_timeout": 30
        },
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": {
            "0": "vibeetoee",
            "1": "ransomware_protection",
            "2": "news",
            "3": "memories",
            "4": "end_to_end_encryption",
            "5": "maps",
            "6": "phonetrack",
            "8": "camerarawpreviews"
        },
        "theme": "",
        "loglevel": 1,
        "log_rotate_size": 10485760,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin",
            "Family",
            "Cars"
        ],
        "twofactor_enforced_excluded_groups": [],
        "memories.vod.path": "\/var\/www\/html\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.exiftool": "\/var\/www\/html\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.index.mode": "3",
        "memories.index.path": "\/Photos",
        "maintenance_window_start": 1,
        "data-fingerprint": "e79ee7eac4b332f0c6ac1b6314188c52",
        "memories.db.triggers.fcu": true,
        "mimetypealiases": {
            "image\/x-dcraw": "image"
        },
        "dbhost": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 7.0.0
  - admin_audit: 1.24.0
  - app_api: 34.0.0
  - appstore: 1.0.0
  - audioplayer: 3.9.0
  - bruteforcesettings: 7.0.0
  - calendar: 6.5.0
  - camerarawpreviews: 1.1.1
  - circles: 34.0.0
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.7.3
  - contactsinteraction: 1.15.0
  - dashboard: 7.14.0
  - dav: 1.39.0
  - end_to_end_encryption: 2.2.0
  - external: 9.0.1
  - federatedfilesharing: 1.24.0
  - files: 2.6.0
  - files_downloadlimit: 5.2.0-dev.0
  - files_external: 1.26.0
  - files_lock: 34.0.0
  - files_pdfviewer: 7.0.0-dev.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - firstrunwizard: 7.0.0-dev.0
  - groupfolders: 22.0.2
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - mail: 5.10.7
  - memories: 8.1.0
  - music: 3.1.0
  - nextcloud_announcements: 6.0.0
  - notifications: 7.0.0-dev.1
  - notify_push: 1.3.3
  - oauth2: 1.22.0
  - office: 1.0.0
  - phonetrack: 1.2.0
  - photos: 7.0.0
  - polls: 9.1.4
  - previewgenerator: 5.14.0
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - recognize: 12.0.0
  - registration: 3.0.0
  - related_resources: 5.0.0-dev.0
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - sharebymail: 1.24.0
  - spreed: 24.0.2
  - support: 6.0.0
  - systemtags: 1.24.0
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - twofactor_webauthn: 2.7.0
  - updatenotification: 1.24.0
  - user_status: 1.14.0
  - viewer: 7.0.0-dev.0
  - weather_status: 1.14.0
  - workflowengine: 2.16.0
Disabled:
  - assistant: 3.4.3 (installed 3.4.3)
  - bookmarks: 16.2.2 (installed 16.2.2)
  - drawio: 4.2.5 (installed 4.2.5)
  - encryption: 2.22.0
  - federation: 1.24.0 (installed 1.22.0)
  - files_accesscontrol: 5.0.0 (installed 5.0.0)
  - files_reminders: 1.7.0 (installed 1.4.0)
  - files_versions: 1.27.0 (installed 1.25.0)
  - htmlviewer: 34.0.0 (installed 34.0.0)
  - impersonate: 5.0.0 (installed 5.0.0)
  - integration_homeassistant: 0.0.8 (installed 0.0.7)
  - integration_openai: 4.5.1
  - metadata: 0.23.0 (installed 0.24.0)
  - news: 28.6.0 (installed 28.6.0)
  - password_policy: 6.0.0-dev.0 (installed 1.18.0)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - recommendations: 7.0.0 (installed 5.0.0-dev.0)
  - richdocuments: 11.0.0 (installed 11.0.0)
  - sendent: 4.3.1 (installed 4.3.1)
  - side_menu: 5.3.0 (installed 5.3.0)
  - survey_client: 6.0.0-dev.0 (installed 4.0.0-dev.0)
  - suspicious_login: 12.0.0-dev.0 (installed 5.0.0)
  - testing: 1.23.0
  - theming_customcss: 1.20.0 (installed 1.20.0)
  - twofactor_nextcloud_notification: 8.0.0
  - user_ldap: 1.25.0
  - user_usage_report: 5.0.0 (installed 5.0.0)
  - webhook_listeners: 1.6.0 (installed 1.1.0-dev)

Nextcloud Signing status

No errors have been found

Nextcloud Logs

{"reqId":"C4XJzVSQ8DKH9ZA2RXRz","level":3,"time":"2026-07-14T13:01:22+00:00","remoteAddr":"192.168.1.244","user":"user","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/user/Photos/2026/07/photo_name.dng","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/33.1.0","version":"34.0.1.2","exception":{"Exception":"TypeError","Message":"strlen(): Argument #1 ($string) must be of type string, false given","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php","line":167,"function":"strlen"},{"file":"/var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php","line":102,"function":"saveMetadata","class":"OC\\FilesMetadata\\FilesMetadataManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/FilesMetadata/Listener/MetadataUpdate.php","line":43,"function":"refreshMetadata","class":"OC\\FilesMetadata\\FilesMetadataManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OC\\FilesMetadata\\Listener\\MetadataUpdate","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":73,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/HookConnector.php","line":83,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Hook.php","line":87,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":459,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":394,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":338,"function":"finalizeUpload","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":215,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Server.php","line":430,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/remote.php","line":152,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php","Line":167,"message":"Uncaught exception","exception":"{\"class\":\"TypeError\",\"message\":\"strlen(): Argument #1 ($string) must be of type string, false given\",\"code\":0,\"file\":\"/var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php:167\",\"trace\":\"#0 /var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php(167): strlen()\\n#1 /var/www/html/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php(102): OC\\FilesMetadata\\FilesMetadataManager->saveMetadata()\\n#2 /var/www/html/nextcloud/lib/private/FilesMetadata/Listener/MetadataUpdate.php(43): OC\\FilesMetadata\\FilesMetadataManager->refreshMetadata()\\n#3 /var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(57): OC\\FilesMetadata\\Listener\\MetadataUpdate->handle()\\n#4 /var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(220): OC\\EventDispatcher\\ServiceEventListener->__invoke()\\n#5 /var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\\Component\\EventDispatcher\\EventDispatcher->callListeners()\\n#6 /var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(73): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch()\\n#7 /var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(86): OC\\EventDispatcher\\EventDispatcher->dispatch()\\n#8 /var/www/html/nextcloud/lib/private/Files/Node/HookConnector.php(83): OC\\EventDispatcher\\EventDispatcher->dispatchTyped()\\n#9 /var/www/html/nextcloud/lib/private/legacy/OC_Hook.php(87): OC\\Files\\Node\\HookConnector->postWrite()\\n#10 /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php(459): OC_Hook::emit()\\n#11 /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php(394): OCA\\DAV\\Connector\\Sabre\\File->emitPostHooks()\\n#12 /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php(338): OCA\\DAV\\Connector\\Sabre\\File->finalizeUpload()\\n#13 /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(1137): OCA\\DAV\\Connector\\Sabre\\File->put()\\n#14 /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(492): Sabre\\DAV\\Server->updateFile()\\n#15 /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\\DAV\\CorePlugin->httpPut()\\n#16 /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\\DAV\\Server->emit()\\n#17 /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Server.php(215): Sabre\\DAV\\Server->invokeMethod()\\n#18 /var/www/html/nextcloud/apps/dav/lib/Server.php(430): OCA\\DAV\\Connector\\Sabre\\Server->start()\\n#19 /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php(25): OCA\\DAV\\Server->exec()\\n#20 /var/www/html/nextcloud/remote.php(152): require_once('...')\\n#21 {main}\"}","CustomMessage":"Uncaught exception"},"id":"6a563715c6e09"}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions