server
server copied to clipboard
[Bug]: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
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?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
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
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.
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.
Same here...
Same here
I installed production docker image, version 25 is very buggy
strange, because these errors should be only logged but should not disrupt the file access
@artonge can you have a look ?
As @PVince81 said, this is probably unrelated to the desktop client issue. Could one of you send us the desktop client logs ?
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.
Can you share the full error of "Error no app in context Computed md5 hash is incorrect." ?
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":[]}
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.
Computed md5 hash is incorrect
comes from the bulk upload plugin, so it is probably not related.
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.
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
What's the best way to downgrade to 24.0.7?
Same here since Upgrade from NC 24.0.7 to 25.0.1
@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 ;)
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
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 :-)
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 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:
- Are both errors occurring during the same requests (same request ID) ?
- Is it happening only with desktop sync, or also when uploading through the web UI ?
- Is it happening for every image upload, or only with small files ?
@artonge on my side i can answer:
- Web UI too (i don't even have Desktop Client)
- 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"
}
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"}
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 ?
I have the same issue, docker image and "normal" storage. I do notice that this comes from pictures in my case from a iphone
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.
@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.
So there are two things mixed here apparently:
- Sometimes the process does not seem to be able to access the file in question
- The
exif_read_data
seems to error out instead of throwing an exception. If an exception was thrown, we would only see a warning "Couldn't extract metadata for <...>" in the logs (see: https://github.com/nextcloud/server/blob/master/lib/private/Metadata/Provider/ExifProvider.php#L62)
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.
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"}
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.