nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.9k stars 4.01k forks source link

[Bug]: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 #34958

Closed AndyXheli closed 1 year ago

AndyXheli commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Upgraded from NC 24.0.7 to NC 25.0.1

Steps to reproduce

N/A

Expected behavior

N/A

Installation method

Community Manual installation with Archive

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

N/A

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"5pmQTuYNkJWS2c7Wq3i7","level":3,"time":"2022-11-03T12:02:55-05:00","remoteAddr":"X.X.X.X","user":"admin","app":"PHP","method":"PUT","url":"/remote.php/dav/files/ixheli/Photos/2022/11/22-11-03%2010-10-00%201115.png","message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/4.5.3","version":"25.0.1.1","exception":{"Exception":"Error","Message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":471,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":398,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"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":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"636408dd7808c"}

Additional info

No response

TByte007 commented 1 year ago

I get similar errors and after that the client locks showing the blue circle and I dont think it syncs the files after that. As far as I can say it happens when I move images from directory to directory. I got this error just before that. Error no app in context Computed md5 hash is incorrect. I have to restart the client to get it working again.

ariesbi commented 1 year ago

I have same error: Computed md5 hash is incorrect. exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 and the sync schedule is -xxxxxx files! same to restart the client to get it working again.

L4UR3NS commented 1 year ago

Same here...

jcastro commented 1 year ago

Same here

jcastro commented 1 year ago

I installed production docker image, version 25 is very buggy

PVince81 commented 1 year ago

strange, because these errors should be only logged but should not disrupt the file access

@artonge can you have a look ?

artonge commented 1 year ago

As @PVince81 said, this is probably unrelated to the desktop client issue. Could one of you send us the desktop client logs ?

TByte007 commented 1 year ago

As @PVince81 said, this is probably unrelated to the desktop client issue. Could one of you send us the desktop client logs ?

The "locking on blue circle" started happening after the server upgrade. So I dont think it's the client and i dont see anything interesting in the client log. Just the normal updated/created/deleted. But the client locks multiple times a day and the only way to fix it is a client restart. But this error is pretty much always there as far as I can see: "Error no app in context Computed md5 hash is incorrect." and it think the same thing causes : "exif_read_data(): File not supported" I'm just speculating here but It's like something is trying to processes a file which is not still fully received on the server.

artonge commented 1 year ago

Can you share the full error of "Error no app in context Computed md5 hash is incorrect." ?

TByte007 commented 1 year ago

Can you share the full error of "Error no app in context Computed md5 hash is incorrect." ?

This is the last one I found.

{"reqId":"BMfEXWtWITuRYn95PCux","level":3,"time":"2022-11-17T18:21:02+00:00","remoteAddr":"10.0.0.2","user":"tbyte","app":"no app in context","method":"POST","url":"/nex
tcloud/remote.php/dav/bulk","message":"Computed md5 hash is incorrect.","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-
10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.0.18","data":[]}
chrissi55 commented 1 year ago

Same here since Upgrade from NC 24.0.7 to 25.0.1

My action before was to rename an image file *.png in a folder in an external fileshare. I think renaming a file in the same space or moving it from one to another does not make any difference to trigger this issue.

my whole log says:

[PHP] Fehler: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data()
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute()
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata()
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle()
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite()
11. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 471
    OC_Hook::emit()
12. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks()
13. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 151
    OCA\DAV\Connector\Sabre\File->put()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
    OCA\DAV\Connector\Sabre\Directory->createFile()
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
    Sabre\DAV\Server->createFile()
16. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 85
    Sabre\DAV\Server->exec()
21. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

The action itself (renaming, moving file) is not interrupted by the error.

artonge commented 1 year ago

Computed md5 hash is incorrect comes from the bulk upload plugin, so it is probably not related.

chrissi55 commented 1 year ago

Append info

I can reproduce the "ExifProvider.php line 59 - Errors" by uploading any kind of images ico; png; *jpg ... Other filetypes are (for the moment) not part of the nextcloud error log, as far as i can see.

k-ham commented 1 year ago

For new users of 25.0.1 to me it appeared as NETWORK ERRROR 99 in the Desktop client while snycing. A downgrade to 24.0.7 solved the problem

ZoltanAB commented 1 year ago

What's the best way to downgrade to 24.0.7?

FlimFlam commented 1 year ago

Same here since Upgrade from NC 24.0.7 to 25.0.1

AndyXheli commented 1 year ago

@artonge do you have any recommendations on what needs to be changed i can test and create a pull request of you show me the light ;)

ghost commented 1 year ago

Same error with a new instal on ubuntu. Nextcloud 25.0.1 PHP 8.1 Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59

chrissi55 commented 1 year ago

Hope this error is one of those that made the Upgrade to 25.0.2 posponed to the 08.12.2022 and is (maybe) fixed in upcomming 25.0.2 :-)

TByte007 commented 1 year ago

I've noticed that if I re-save one file (Python script in the last case) too quick (I had to make small changes) and the client locks at the blue circle quite often.

artonge commented 1 year ago

@artonge do you have any recommendations on what needs to be changed i can test and create a pull request of you show me the light ;)

Honestly no idea yet, it would need more debugging to understand what's going on. A few question that could help me:

  1. Are both errors occurring during the same requests (same request ID) ?
  2. Is it happening only with desktop sync, or also when uploading through the web UI ?
  3. Is it happening for every image upload, or only with small files ?
solracsf commented 1 year ago

@artonge on my side i can answer:

  1. Web UI too (i don't even have Desktop Client)
  2. It seems it produces on small images (here attached the one producing the stack below, on PHP 8.1)

Please note that $fileDescriptor is null here.

{
  "reqId": "p0QNrDNUjdTqmP3XOhi4",
  "level": 3,
  "time": "2022-12-05T15:29:04+01:00",
  "app": "PHP",
  "method": "PUT",
  "url": "/remote.php/webdav/azdzd/social-orange.png",
  "message": "exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
  "version": "25.0.1.1",
  "exception": {
    "Exception": "Error",
    "Message": "exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59",
    "Code": 0,
    "Trace": [
      {
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          2,
          "exif_read_data(): File not supported",
          "/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php",
          59
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php",
        "line": 59,
        "function": "exif_read_data",
        "args": [
          null,
          "ANY_TAG",
          true
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Metadata/MetadataManager.php",
        "line": 68,
        "function": "execute",
        "class": "OC\\Metadata\\Provider\\ExifProvider",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Node\\File"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Metadata/FileEventListener.php",
        "line": 101,
        "function": "generateMetadata",
        "class": "OC\\Metadata\\MetadataManager",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Node\\File"
          },
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 87,
        "function": "handle",
        "class": "OC\\Metadata\\FileEventListener",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 251,
        "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/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 73,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            {
              "__class__": "Closure"
            }
          ],
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
          {
            "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 88,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          },
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 100,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
          {
            "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
        "line": 118,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
        "line": 106,
        "function": "postWrite",
        "class": "OC\\Files\\Node\\HookConnector",
        "type": "->",
        "args": [
          [
            "/azdzd/social-orange.png"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 481,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::",
        "args": [
          "OC_Filesystem",
          "post_write",
          [
            "/azdzd/social-orange.png"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 398,
        "function": "emitPostHooks",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->",
        "args": [
          false
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 151,
        "function": "put",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1098,
        "function": "createFile",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": [
          "social-orange.png",
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 504,
        "function": "createFile",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "azdzd/social-orange.png",
          null,
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/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/nextcloud/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/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php",
        "line": 85,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/remote.php",
        "line": 171,
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 92,
    "CustomMessage": "--"
  },
  "id": "638e00397b873"
}

social-orange

AndyXheli commented 1 year ago

Some more logs little different then the once i original post

{"reqId":"87ZzyeCopPAMAR8U3bs1","level":3,"time":"2022-12-07T15:12:38+00:00","remoteAddr":"10.0.10.157","user":"axheli","app":"PHP","method":"PUT","url":"/remote.php/webdav/Documents/20221130_111814.jpg","message":"exif_read_data(): Invalid JPEG file at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","version":"25.0.2.2","exception":{"Exception":"Error","Message":"exif_read_data(): Invalid JPEG file at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":471,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":398,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php","line":85,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"6390aeda42ad8"}

{"reqId":"87ZzyeCopPAMAR8U3bs1","level":3,"time":"2022-12-07T15:12:38+00:00","remoteAddr":"10.0.10.157","user":"axheli","app":"PHP","method":"PUT","url":"/remote.php/webdav/Documents/20221130_111814.jpg","message":"exif_read_data(): Error reading from file: got=x3FFA(=16378) != itemlen-2=xAF90(=44944) at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","version":"25.0.2.2","exception":{"Exception":"Error","Message":"exif_read_data(): Error reading from file: got=x3FFA(=16378) != itemlen-2=xAF90(=44944) at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":471,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":398,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php","line":85,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"6390aeda42c1c"}
Digit-al commented 1 year ago

I am having the same error. I have my root storage that is an external storage (SMB) and I think it might be the reason. Everytime I upload an image I get:

"app":"PHP","method":"PUT","url":"/remote.php/dav/files/xxx/Photos/DCIM/Camera/IMG_20221209_144628.jpg","message":"e xif_read_data(): Error reading from file: got=x3FFA(=16378) != itemlen-2=x4974(=18804) at /var/www/html/lib/private/Metadata/Provider/ExifProvider.php#59"

Thus the new images don't appear in Maps. However a maps:rescan-photos works so the job created per image is able to access the file while the upload hook is not.

Can't you just schedule a job for the new files so it gets scanned at the next cron execution ?

gmeks commented 1 year ago

I have the same issue, docker image and "normal" storage. I do notice that this comes from pictures in my case from a iphone

free-ghz commented 1 year ago

Me too, fresh 25.0.2.3 install from today, using the docker image, with mariadb. Fed it 50 gigs of data and walked away, came back to only 20 gigs uploaded and a lot of this in the error logs. The client had stopped syncing, but restarting it shook it loose.

thomaskb commented 1 year ago

@artonge do you have any recommendations on what needs to be changed i can test and create a pull request of you show me the light ;)

I was running into an issue with a new nextcloud instance (server release version 25.0.1). In my past nextcloud instance I didn't face that issue. I suspect that somewhere in lib/private/Metadata component something is going wrong. Lot's of changes in there compared to release 24.0.7 and error logs refer to that component. Files are not changed between releases 25.0.1 and 25.0.2; thus expected that other users still report issues in current 25.0.2 version.

One hint if one wants to reproduce the issue: Do bulk upload with tons of new files (they may be small, to me the issue was on various file types) and keep an eye on the memory consumption of the client (mine is on Windows, consumed all mem that it got).

Btw: In the meanwhile I temporarily bypassed the issue by disabling bulk upload in the server config file ('bulkupload.enabled' => false) with drawbacks of not bulk-uploading any more.

simonspa commented 1 year ago

So there are two things mixed here apparently:

For the latter: is there a reason not to use Imagick for this job? It seems to be much better in extracting this kind of information and also supports more MIME types - I for example get this error on every WebP file I have:

[PHP] Error: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError(2, "exif_read_data(): File not supported", "/var/www/nextcl ... p", 59)
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data(null, "ANY_TAG", true)
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute(OC\Files\Node\File {})
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata(OC\Files\Node\File {}, false)
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle(OCP\Files\Events\Node\NodeWrittenEvent {})
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(OCP\Files\Events\Node\NodeWrittenEvent {}, "OCP\\Files\\Eve ... t", Symfony\Componen ... {})
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {},Closure {}], "OCP\\Files\\Eve ... t", OCP\Files\Events\Node\NodeWrittenEvent {})
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCP\Files\Events\Node\NodeWrittenEvent {}, "OCP\\Files\\Eve ... t")
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch("OCP\\Files\\Eve ... t", OCP\Files\Events\Node\NodeWrittenEvent {})
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped(OCP\Files\Events\Node\NodeWrittenEvent {})
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite([true,"/test.webp"])
11. /var/www/nextcloud/lib/private/Files/View.php line 1294
    OC_Hook::emit("OC_Filesystem", "post_write", [true,"/test.webp"])
12. /var/www/nextcloud/lib/private/Files/View.php line 1222
    OC\Files\View->runHooks(["create","write"], "/test.webp", true)
13. /var/www/nextcloud/lib/private/Files/View.php line 705
    OC\Files\View->basicOperation("file_put_contents", "/smn/files/test.webp", ["create","write"], null)
14. /var/www/nextcloud/lib/private/Files/Node/Folder.php line 192
    OC\Files\View->file_put_contents("/smn/files/test.webp", null)
15. /var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php line 92
    OC\Files\Node\Folder->newFile("/test.webp", null)
16. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    OCA\DAV\BulkUpload\BulkUploadPlugin->httpPost(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:POST", [Sabre\HTTP\Requ ... }])
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /var/www/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
21. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
22. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

POST /remote.php/dav/bulk

See https://stackoverflow.com/a/50890651 for an example and implementation with Imagick.

AndyXheli commented 1 year ago

Still an issue NC 25.0.2

{"reqId":"JVcU5WsfBsfPEwglAWj0","level":3,"time":"2023-01-03T08:37:05-06:00","remoteAddr":"20.8.0.4","user":"admin","app":"PHP","method":"PUT","url":"/remote.php/dav/files/axheli/Talk/4dc530d9-2d3e-4dd6-9565-eb0304512fb8.gif","message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v15.1.0 RC2","version":"25.0.2.3","exception":{"Exception":"Error","Message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":471,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":398,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"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":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"63b4635f91c89"}
WeskerC commented 1 year ago

I resolve this issue by re-pull and re-deploy the container image. This error occurred after I updated the ubuntu system and rebooted the system.

msrumon commented 1 year ago

I'm having the exact same issue while deploying it on Fly using official Docker image and BackBlaze B2 storage. Let's see if I can get some help on Reddit.

squid-f commented 1 year ago

Hi. Same issue after updating to NC 25.0.2, php 8.0, Mageia Linux, Plasma, Nextcloud-client 3.6.4

[PHP] Erreur: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data()
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute()
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata()
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle()
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite()
11. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 471
    OC_Hook::emit()
12. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks()
13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    OCA\DAV\Connector\Sabre\File->put()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
15. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
19. /var/www/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
20. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
21. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/files/user/Documents/camera.png
from my_ip by user at 2023-01-16T13:49:12+01:00
1Dimension1 commented 1 year ago

Same issues here on 25.0.2 apache docker with smb external

[PHP] Fout: Error: exif_read_data(): Error reading from file: got=x3B00(=15104) != itemlen-2=x83CB(=33739) at /var/www/html/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError(2, "exif_read_data( ... )", "/var/www/html/l ... p", 59)
 1. /var/www/html/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data(null, "ANY_TAG", true)
 2. /var/www/html/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute(OC\Files\Node\File {})
 3. /var/www/html/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata(OC\Files\Node\File {}, false)
 4. /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle(OCP\Files\Events\Node\NodeWrittenEvent {})
 5. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(OCP\Files\Events\Node\NodeWrittenEvent {}, "OCP\\Files\\Eve ... t", Symfony\Componen ... {})
 6. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {},Closure {}], "OCP\\Files\\Eve ... t", OCP\Files\Events\Node\NodeWrittenEvent {})
 7. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCP\Files\Events\Node\NodeWrittenEvent {}, "OCP\\Files\\Eve ... t")
 8. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch("OCP\\Files\\Eve ... t", OCP\Files\Events\Node\NodeWrittenEvent {})
 9. /var/www/html/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped(OCP\Files\Events\Node\NodeWrittenEvent {})
10. /var/www/html/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite(["/xxx/Afbeel ... "])
11. /var/www/html/apps/dav/lib/Connector/Sabre/File.php line 471
    OC_Hook::emit("OC_Filesystem", "post_write", ["/xxx/Afbeel ... "])
12. /var/www/html/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks(false)
13. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 151
    OCA\DAV\Connector\Sabre\File->put(null)
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
    OCA\DAV\Connector\Sabre\Directory->createFile("PXL_20230116_230240264.jpg", null)
15. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
    Sabre\DAV\Server->createFile("files/xxx/Mi ... g", null, null)
16. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:PUT", [Sabre\HTTP\Requ ... }])
18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
19. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /var/www/html/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
21. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
22. /var/www/html/remote.php line 171
    require_once("/var/www/html/a ... p")

PUT /remote.php/dav/files/afdsgdfgd.jpg
chrissi55 commented 1 year ago

Still having this error after Update 25.0.2 -> 25.0.3

[PHP] Fehler: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data()
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute()
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata()
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle()
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite()
11. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 471
    OC_Hook::emit()
12. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks()
13. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 151
    OCA\DAV\Connector\Sabre\File->put()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
    OCA\DAV\Connector\Sabre\Directory->createFile()
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
    Sabre\DAV\Server->createFile()
16. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 85
    Sabre\DAV\Server->exec()
21. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

PUT /remote.php/webdav/Pictures/clipart-clouds-cloud-computing-3.png
from CLIENT-IP by username at 2023-01-18T07:15:54+01:00
reichbc commented 1 year ago

Tossing a bump in. Fresh server install, Ubuntu Server 22.04 LTS, Apache, MariaDB, APCu, Redis, all using the recommended configurations.

[PHP] Error: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data()
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute()
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata()
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle()
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite()
11. /var/www/nextcloud/lib/private/Files/View.php line 1294
    OC_Hook::emit()
12. /var/www/nextcloud/lib/private/Files/View.php line 1222
    OC\Files\View->runHooks()
13. /var/www/nextcloud/lib/private/Files/View.php line 705
    OC\Files\View->basicOperation()
14. /var/www/nextcloud/lib/private/Files/Node/Folder.php line 192
    OC\Files\View->file_put_contents()
15. /var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php line 92
    OC\Files\Node\Folder->newFile()
16. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    OCA\DAV\BulkUpload\BulkUploadPlugin->httpPost()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /var/www/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
21. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
22. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

POST /remote.php/dav/bulk
from 10.210.11.49 by brandon at 2023-01-21T20:16:19+00:00
k0stya63 commented 1 year ago

It's not the bad news that I'm not the only one. Same problem ubuntu 22.04

reichbc commented 1 year ago

'bulkupload.enabled' => false

I also tried this option but the desktop client is still bulk uploading.

Davimalu commented 1 year ago

I have the exact same problem. For some reason, downgrading my Desktop Client to version 3.3.6 solved it for me. Files sync again and no errors occur.

ondrejlohnisky commented 1 year ago
[PHP] Error: Error: exif_read_data(): Potentially invalid endianess, trying again with different endianness before imminent failure. at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59
    exif_read_data()
 2. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68
    OC\Metadata\Provider\ExifProvider->execute()
 3. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101
    OC\Metadata\MetadataManager->generateMetadata()
 4. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OC\Metadata\FileEventListener->handle()
 5. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 7. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
10. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postWrite()
11. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 471
    OC_Hook::emit()
12. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks()
13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    OCA\DAV\Connector\Sabre\File->put()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
15. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
19. /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 85
    Sabre\DAV\Server->exec()
20. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

PUT /remote.php/webdav/Multimedia/Photos/Ondra-PC/DVD/Babicka/Fotky/2008-11-18_16.18.17.JPG
from 10.100.10.1 by ondra153 at 2023-01-26T03:43:18+00:00
mrAceT commented 1 year ago

I have installed en brand new version for testing with Nextcloud 25.0.3 and PHP8.1

I've installed all the required modules and 'settings/admin/overview' tells me all is fine. But I can't upload anything! When I configure Apache to use PHP 7.4.33 everything works fine!

lukasszz commented 1 year ago

The same problem. It looks it could happen here: commit

I can trace the problem on the production server, but need a little help to dive in faster into sources. PM

"reqId": "Y9IckaVkS3iaFx2INfIYaQAAAAQ",
  "level": 3,
  "time": "2023-01-26T06:25:00+00:00",
  "app": "PHP",
  "method": "POST",
  "url": "/remote.php/dav/bulk",
  "message": "exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59",
  "userAgent": "Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
  "version": "25.0.3.2",
  "exception": {
    "Exception": "Error",
    "Message": "exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59",
    "Code": 0,
    "Trace": [
      {
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php",
        "line": 59,
        "function": "exif_read_data"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Metadata/MetadataManager.php",
        "line": 68,
        "function": "execute",
        "class": "OC\\Metadata\\Provider\\ExifProvider",
        "type": "->"
      },
szaimen commented 1 year ago

Hi, can you please apply this patch and check if that resolves the issue for you? https://patch-diff.githubusercontent.com/raw/nextcloud/server/pull/36420.patch Thanks a lot!

szaimen commented 1 year ago

Tested myself. Doesnt seem to work yet...

szaimen commented 1 year ago

Okay, suppressing the php error with @ was indeed the only way I could suppress the log. Strange.

P90Ez commented 1 year ago

Same error here after a complete fresh install. (25.0.3.2) Nextcloud in docker (Ubuntu 22.04 LTS) with postgresql and redis. Created an admin account in the browser an clicked install. image image

{"reqId":"xxxxxxxxxx","level":3,"time":"2023-02-21T18:28:13+00:00","remoteAddr":"x.x.x.x","user":"admin","app":"PHP","method":"POST","url":"/index.php","message":"exif_read_data(): File not supported at /var/www/html/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0","version":"25.0.3.2","exception":{"Exception":"Error","Message":"exif_read_data(): File not supported at /var/www/html/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"exif_read_data(): File not supported","/var/www/html/lib/private/Metadata/Provider/ExifProvider.php",59]},{"file":"/var/www/html/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data","args":[null,"ANY_TAG",true]},{"file":"/var/www/html/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/html/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->","args":[{"__class__":"OCP\\Files\\Events\\Node\\NodeWrittenEvent"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"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/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"OCP\\Files\\Events\\Node\\NodeWrittenEvent",{"__class__":"OCP\\Files\\Events\\Node\\NodeWrittenEvent"}]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Files\\Events\\Node\\NodeWrittenEvent"},"OCP\\Files\\Events\\Node\\NodeWrittenEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Files\\Events\\Node\\NodeWrittenEvent",{"__class__":"OCP\\Files\\Events\\Node\\NodeWrittenEvent"}]},{"file":"/var/www/html/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Files\\Events\\Node\\NodeWrittenEvent"}]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->","args":[["/Nextcloud.png"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":641,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_write",["/Nextcloud.png"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":692,"function":"emit_file_hooks_post","class":"OC\\Files\\View","type":"->","args":[true,"/admin/files/Nextcloud.png"]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/admin/files/Nextcloud.png",null]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":257,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":[null]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":216,"function":"copyr","class":"OC_Util","type":"::","args":["/var/www/html/core/skeleton",{"__class__":"OC\\Files\\Node\\Folder"}]},{"file":"/var/www/html/lib/private/User/Session.php","line":553,"function":"copySkeleton","class":"OC_Util","type":"::","args":["*** sensitive parameters replaced ***",{"__class__":"OC\\Files\\Node\\Folder"}]},{"file":"/var/www/html/lib/private/User/Session.php","line":403,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->","args":[true,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":616,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":355,"function":"loginWithPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Setup.php","line":433,"function":"login","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/core/Controller/SetupController.php","line":69,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/base.php","line":980,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

szaimen commented 1 year ago

This will be fixed in 25.0.4