photos
photos copied to clipboard
[Bug]: Argument #1 ($rawData) must be of type string, array given
⚠️ 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 OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
I was uploading >5000 iOS images, when 3 of them gave 500 error. No way to log on the client, but in the server.
{"reqId":"7HolgdjX5OSRMNkO89xG","level":3,"time":"2024-07-10T07:18:36+00:00","remoteAddr":"192.168.1.1","user":"tassoman","app":"webdav","method":"PUT","url":"/remote.php/dav/files/tassoman/InstantUpload/2023/05/23-05-15%2011-40-15%20-05-.jpg","message":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.4.1","version":"29.0.3.4","exception":{"Exception":"TypeError","Message":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113","Code":0,"Trace":
Steps to reproduce
- open ios app
- upload iphone images
Expected behavior
I expected to upload images seamlessly
Installation method
Official All-in-One appliance
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
Other
Web server
Nginx
Database engine version
Other
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 28.0.1 to 28.0.2)
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
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:list system
{
"system": {
"one-click-instance": true,
"one-click-instance.user-limit": 100,
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"appsallowlist": false,
"check_data_directory_permissions": false,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"overwritehost": "example.com",
"overwriteprotocol": "https",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"example.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "29.0.3.4",
"overwrite.cli.url": "https:\/\/example.com\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"loglevel": 2,
"log_type": "file",
"logfile": "\/var\/www\/html\/data\/nextcloud.log",
"log_rotate_size": 10485760,
"log.condition": {
"apps": [
"admin_audit"
]
},
"preview_max_x": 1024,
"preview_max_y": 1024,
"jpeg_quality": 60,
"enabledPreviewProviders": [
"OC\\Preview\\Imaginary",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\Movie",
"OC\\Preview\\Krita",
"OC\\Preview\\HEIC"
],
"enable_previews": true,
"upgrade.disable-web": true,
"mail_smtpmode": "smtp",
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 30",
"activity_expire_days": 30,
"simpleSignUpLink.shown": false,
"share_folder": "\/Shared",
"one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
"upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
"updatedirectory": "\/nc-updater",
"maintenance_window_start": 100,
"allow_local_remote_servers": true,
"davstorage.request_timeout": 3600,
"htaccess.RewriteBase": "\/",
"dbpersistent": false,
"auth.bruteforce.protection.enabled": true,
"ratelimit.protection.enabled": true,
"files_external_allow_create_new_local": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
"preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"memories.db.triggers.fcu": true,
"memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-aarch64-musl",
"memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-aarch64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.gis_type": 2
}
}
List of activated Apps
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:list
Enabled:
- activity: 2.21.1
- admin_audit: 1.19.0
- bruteforcesettings: 2.9.0
- calendar: 4.7.10
- circles: 29.0.0-dev
- cloud_federation_api: 1.12.0
- comments: 1.19.0
- contacts: 6.0.0
- contactsinteraction: 1.10.0
- dashboard: 7.9.0
- dav: 1.30.1
- deck: 1.13.1
- external: 5.4.0
- federatedfilesharing: 1.19.0
- federation: 1.19.0
- files: 2.1.0
- files_downloadlimit: 2.0.0
- files_pdfviewer: 2.10.0
- files_reminders: 1.2.0
- files_sharing: 1.21.0
- files_trashbin: 1.19.0
- files_versions: 1.22.0
- firstrunwizard: 2.18.0
- groupfolders: 17.0.1
- logreader: 2.14.0
- lookup_server_connector: 1.17.0
- memories: 7.3.1
- nextcloud-aio: 0.6.0
- nextcloud_announcements: 1.18.0
- notes: 4.10.0
- notifications: 2.17.0
- notify_push: 0.6.12
- oauth2: 1.17.0
- password_policy: 1.19.0
- photos: 2.5.0
- previewgenerator: 5.5.0
- privacy: 1.13.0
- provisioning_api: 1.19.0
- quota_warning: 1.19.0
- recognize: 7.0.3
- recommendations: 2.1.0
- related_resources: 1.4.0
- richdocuments: 8.4.3
- serverinfo: 1.19.0
- settings: 1.12.0
- sharebymail: 1.19.0
- socialsharing_email: 3.1.0
- support: 1.12.0
- survey_client: 1.17.0
- systemtags: 1.19.0
- tasks: 0.16.0
- text: 3.10.1
- theming: 2.4.0
- twofactor_backupcodes: 1.18.0
- twofactor_totp: 11.0.0-dev
- user_status: 1.9.0
- viewer: 2.3.0
- weather_status: 1.9.0
- welcome: 1.1.0
- workflowengine: 2.11.0
Disabled:
- encryption: 2.17.0
- files_external: 1.21.0
- suspicious_login: 7.0.0
- user_ldap: 1.20.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"7HolgdjX5OSRMNkO89xG","level":3,"time":"2024-07-10T07:18:36+00:00","remoteAddr":"192.168.1.1","user":"tassoman","app":"webdav","method":"PUT","url":"/remote.php/dav/files/tassoman/InstantUpload/2023/05/23-05-15%2011-40-15%20-05-.jpg","message":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.4.1","version":"29.0.3.4","exception":{"Exception":"TypeError","Message":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113","Code":0,"Trace":[{"file":"/var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php","line":113,"function":"parseGPSData","class":"OCA\\Photos\\Listener\\ExifMetadataProvider","type":"->","args":[["0/1","0/1","0/1000"]]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Photos\\Listener\\ExifMetadataProvider","type":"->","args":[["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"],"OCP\\FilesMetadata\\Event\\MetadataLiveEvent",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"],["Closure"],["Closure"],["Closure"],["Closure"]],"OCP\\FilesMetadata\\Event\\MetadataLiveEvent",["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"],"OCP\\FilesMetadata\\Event\\MetadataLiveEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\FilesMetadata\\Event\\MetadataLiveEvent",["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"]]},{"file":"/var/www/html/lib/private/FilesMetadata/FilesMetadataManager.php","line":114,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\FilesMetadata\\Event\\MetadataLiveEvent"]]},{"file":"/var/www/html/lib/private/FilesMetadata/Listener/MetadataUpdate.php","line":59,"function":"refreshMetadata","class":"OC\\FilesMetadata\\FilesMetadataManager","type":"->","args":[["OC\\Files\\Node\\File"]]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OC\\FilesMetadata\\Listener\\MetadataUpdate","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"],"OCP\\Files\\Events\\Node\\NodeWrittenEvent",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"],["Closure"],["Closure"],["Closure"],["Closure"]],"OCP\\Files\\Events\\Node\\NodeWrittenEvent",["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"],"OCP\\Files\\Events\\Node\\NodeWrittenEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Files\\Events\\Node\\NodeWrittenEvent",["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/Files/Node/HookConnector.php","line":102,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":105,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->","args":[["/InstantUpload/2023/05/23-05-15 11-40-15 -05-.jpg"]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":479,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_write",["/InstantUpload/2023/05/23-05-15 11-40-15 -05-.jpg"]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":404,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[true]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":379,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php","Line":140,"message":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113","exception":[],"CustomMessage":"OCA\\Photos\\Listener\\ExifMetadataProvider::parseGPSData(): Argument nextcloud/server#1 ($rawData) must be of type string, array given, called in /var/www/html/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113"},"id":"668e39115ec75"}
Additional info
AIO 9.0.1 > NC 29.0.3
Nice Natto picture, I give you in Creative Commons SA-NC-BY
Spoiler alert, not iPhone image, but Android.
Others data, are AIO defaults, I don't know.
Fixed in #2636