maps icon indicating copy to clipboard operation
maps copied to clipboard

TypeError: Unsupported operand types: int * string

Open benjaminsabatini opened this issue 3 years ago โ€ข 22 comments

Hello!

I'm getting an unsupported operand error every time cron is run in the background. The result is that nextcloud reports that cron has not been run in x days if I leave the maps app enabled.

Steps to reproduce

  1. Schedule cron.php to run every 5 minutes or start manually.
  2. Error ensues

Expected behaviour

It should run cron.php until the next cron cycle.

Actual behaviour

It seems to just fail. I'm trying to populate photo locations on the map.

Server configuration

Operating system: openSUSE Tumbleweed Web server: Server version: Apache/2.4.48 (Linux/SUSE) Server built: 2021-06-02 07:37:52.000000000 +0000 Database: mysql PHP version: PHP 8.0.8 (cli) (built: Jul 1 2021 00:00:00) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.8, Copyright (c) Zend Technologies with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies Nextcloud version: (see Nextcloud admin page) 20.0.0.11 Group folders version:

Updated from an older Nextcloud/ownCloud or fresh install: Attempted, but failed, so copied over folder to new directory. Where did you install Nextcloud from: tarball and then upgraded to 20.0.0.11 Are you using external storage, if yes which one: local/s3/smb/sftp/... local Are you using encryption: yes/no No Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...

Client configuration

Browser: Chrome 91 Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here
`[proxy_fcgi:error] [pid 1832:tid 140484534068800] [client 59.190.3.189:54540] AH01071: Got error 'PHP message: PHP Deprecated:  Required parameter $begin follows optional parameter $categoryList in /srv/www/htdocs/nextcloud/apps/maps/lib/Controller/FavoritesController.php on line 216PHP message: PHP Deprecated:  Required parameter $end follows optional parameter $categoryList in /srv/www/htdocs/nextcloud/apps/maps/lib/Controller/FavoritesController.php on line 216'`

#### Nextcloud log (data/nextcloud.log)
`{"reqId":"vKEU99KvurUoOcS3uGEd","level":3,"time":"2021-07-21T07:30:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/srv/www/htdocs/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"}}`
<summary>Nextcloud log</summary>

Insert your Nextcloud log here {"reqId":"e8ipz8kuNkafAZPh1XB9","level":3,"time":"2021-07-21T07:15:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/srv/www/htdocs/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"},"id":"60f7c97635d9d"}

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

benjaminsabatini avatar Jul 21 '21 07:07 benjaminsabatini

same issue here, working on nextcloud 22.1.0, Linux 5.13.9-arch1-1 x86_64; php 8.0.9; mariadb 10.6.4; nginx 1.20.1-1; no external storage being used

TypeError: Unsupported operand types: int * string

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php - line 368:

lsolesen\pel\PelIfd->loadSingleValue()

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php - line 350:

lsolesen\pel\PelIfd->load()

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php - line 159:

lsolesen\pel\PelIfd->load()

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php - line 108:

lsolesen\pel\PelTiff->load()

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 216:

lsolesen\pel\PelExif->load()

/var/lib/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 126:

lsolesen\pel\PelJpeg->load()

/var/lib/nextcloud/apps/maps/lib/Service/PhotofilesService.php - line 442:

lsolesen\pel\PelJpeg->__construct()

/var/lib/nextcloud/apps/maps/lib/Service/PhotofilesService.php - line 384:

OCA\Maps\Service\PhotofilesService->getExifPelBackup()

/var/lib/nextcloud/apps/maps/lib/Service/PhotofilesService.php - line 264:

OCA\Maps\Service\PhotofilesService->getExif()

/var/lib/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php - line 56:

OCA\Maps\Service\PhotofilesService->addPhotoNow()

/usr/share/webapps/nextcloud/lib/public/BackgroundJob/Job.php - line 79:

OCA\Maps\BackgroundJob\AddPhotoJob->run()

/usr/share/webapps/nextcloud/lib/public/BackgroundJob/QueuedJob.php - line 47:

OCP\BackgroundJob\Job->execute()

/usr/share/webapps/nextcloud/cron.php - line 127:

OCP\BackgroundJob\QueuedJob->execute()

spicemint avatar Aug 21 '21 07:08 spicemint

Same Issue. Furthermore, the cron jobs will eventually always fail and only start working again if Maps is deactivated.

Server configuration

Operating system: Ubuntu 20.04 Server Web server: Server version: Apache/2.4 Database: mysql PHP version: PHP 8.0 Nextcloud version: (see Nextcloud admin page) 22.2.0 Group folders version:

Updated from an older Nextcloud/ownCloud or fresh install: fresh Where did you install Nextcloud from: snap Are you using external storage, if yes which one: local/s3/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/... no

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php - line 215:

    lsolesen\pel\PelIfd->loadSingleValue()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelIfd.php - line 406:

    lsolesen\pel\PelCanonMakerNotes->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelTiff.php - line 159:

    lsolesen\pel\PelIfd->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelExif.php - line 108:

    lsolesen\pel\PelTiff->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 216:

    lsolesen\pel\PelExif->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 126:

    lsolesen\pel\PelJpeg->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 442:

    lsolesen\pel\PelJpeg->__construct()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 384:

    OCA\Maps\Service\PhotofilesService->getExifPelBackup()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 137:

    OCA\Maps\Service\PhotofilesService->getExif()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php - line 56:

    OCA\Maps\Service\PhotofilesService->updateByFileNow("*** sensiti ... *")

    /snap/nextcloud/28586/htdocs/lib/public/BackgroundJob/Job.php - line 79:

    OCA\Maps\BackgroundJob\UpdatePhotoByFileJob->run()

    /snap/nextcloud/28586/htdocs/lib/public/BackgroundJob/QueuedJob.php - line 47:

    OCP\BackgroundJob\Job->execute()

    /snap/nextcloud/28586/htdocs/cron.php - line 127:

    OCP\BackgroundJob\QueuedJob->execute()

savowe avatar Oct 26 '21 16:10 savowe

Same here. After disable Maps Cron works again. {"reqId":"MY61inN3omSxLlirj55V","level":3,"time":"2021-11-22T07:47:38+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: string / int","userAgent":"--","version":"22.2.0.2","exception":{"Exception":"TypeError","Message":"Unsupported operand types: string / int","Code":0,"Trace":[{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":459,"function":"newEntryFromData","class":"lsolesen\\pel\\PelIfd","type":"->","args":[40960,7,4,{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":368,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"},112,4,40960]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":350,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"},112]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"},10]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/html/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/html/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},"lars"]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->","args":[{"photoId":18144,"userId":"lars"}]},{"file":"/var/www/html/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":611,"CustomMessage":"--"},"id":"619b4d28e027b"}

maybe related to this:

{"reqId":"oseTHXUq7RPAf6RBfj9G","level":3,"time":"2021-11-22T07:45:47+00:00","remoteAddr":"80.143.xx.xxx","user":"lars","app":"PHP","method":"GET","url":"/index.php/apps/maps/favorites","message":"Required parameter $end follows optional parameter $categoryList at /var/www/html/apps/maps/lib/Controller/FavoritesController.php#216","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"22.2.0.2","id":"619b4d28e04c4"}

Happyfeet01 avatar Nov 22 '21 07:11 Happyfeet01

same here with NC23

{"reqId":"N1D33yOBBjJKdeVEB5fG","level":3,"time":"2021-12-16T21:25:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"23.0.0.10","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->"},{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->"},{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->"},{"file":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":128,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/var/www/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"},"id":"61bbaf1f91157"}

manuelkamp avatar Dec 16 '21 21:12 manuelkamp

Hi @Happyfeet01 and @umgfoin

i have made a pull request regarding exif data issues: https://github.com/nextcloud/maps/pull/586 There is a refactor with robost error handling and type casting, to prevent such problems like in this issue. Do you have a chance to test if this pull request resolves your problem?

Thank you

kovge avatar Feb 03 '22 20:02 kovge

Hi @kovge , main cause for the above issues is missing PHP8 support in maps. As a PHP version manifest is missing in app-metadata, it installs on PHP8-platforms although it shouldn't(, yet). IMHO, compatibility issues exist basically with an outdated pel-dependency. This could be resolved by pulling in latested releases of pel, where PHP8.0 is supported for some time and 8.1 in pel master as of today. I'll test your refactorings against our (private 8.0 ready maps build) as soon as I have time to. ++umgfoin.

umgfoin avatar Feb 04 '22 10:02 umgfoin

Same issue here with Nextcloud 23.

Thank you for reporting this. Recently, I was setting background jobs and saw how cron job got stuck or returned that error.

I checked that was from Maps application and I searched this issue.

EchedelleLR avatar Feb 05 '22 14:02 EchedelleLR

After I uploaded some pictures I'm encountering the same error with NV 23.0.1 and Map 0.1.10. Here is the full log output:

{"reqId":"2wRUyZ2tE9ixuaiDRtlX","level":3,"time":"2022-02-08T14:00:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"23.0.1.2","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"},4982,0,256]},{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->","args":[]},{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"},10]},{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->","args":[{"__class__":"lsolesen\\pel\\PelDataWindow"}]},{"file":"/var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/html/custom_apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},"Arne"]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->","args":[{"photoId":1747792,"userId":"Arne"}]},{"file":"/var/www/html/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/cron.php","line":128,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/custom_apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"},"id":"62027914c99c7"}****

The uploaded files contain some pictures taken from a Canon camera, e.g.

IMG_2176.JPG: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=12, manufacturer=Canon, model=Canon EOS 1300D, orientation=upper-left, xresolution=196, yresolution=204, resolutionunit=2, datetime=2018:12:05 20:39:09], baseline, precision 8, 3456x2304, components 3

nRaecheR avatar Feb 08 '22 14:02 nRaecheR

Hi @kovge , main cause for the above issues is missing PHP8 support in maps. As a PHP version manifest is missing in app-metadata, it installs on PHP8-platforms although it shouldn't(, yet). IMHO, compatibility issues exist basically with an outdated pel-dependency. This could be resolved by pulling in latested releases of pel, where PHP8.0 is supported for some time and 8.1 in pel master as of today. I'll test your refactorings against our (private 8.0 ready maps build) as soon as I have time to. ++umgfoin.

Hi @umgfoin You are right in one hand, but as i guess nextcloud and inclusively the maps applicรญtion want to support php8.0, the main issue is not the php version, but the poorely validated and casted data.

The solution in https://github.com/nextcloud/maps/pull/586 is that we do there more data validation and typecasts to have an accurate variable type and preventing anomalies, regarding the different quality and definitions of image metadata. The metadata unfortunately has regarding the photo machine / phone or photo software light different formats and quality.

So in one hand we can say, that the problem is that we need to support a php version, witch does not let us to write so mutch "typeunsave" codes, for some operation. But my opinion is, that the problem is itself the typeunsafe code. I find more crazy, that the previous php versions just thrown warnings if we wanted to do some arithmetic operations on strings, or wanted to divide a number with 0. I am completely understand, that the PHP core team decided to force us (developers) to debug such operations.

And in second hand, i am completely aware, that we must update the "pel" composer package as well, cause it is crazy old as well, but it still just reads metadata, and do not do any validation.

kovge avatar Feb 08 '22 20:02 kovge

See some recent comments in #652, (recently closed).

quentinus95 avatar Apr 08 '22 13:04 quentinus95

Duplicate of #652

umgfoin avatar May 16 '22 10:05 umgfoin

How can this be a duplicate of https://github.com/nextcloud/maps/issues/652? Because https://github.com/nextcloud/maps/issues/652 is already marked as duplicate of https://github.com/nextcloud/maps/issues/640... Looks like an infinite loop

GHJester avatar May 16 '22 12:05 GHJester

I am also having this issue with Ubuntu 22.04, PHP 8.1, NC 24

derekakelly avatar Jun 02 '22 04:06 derekakelly

Did anybody test with v0.2.5 nightly builds?

tacruc avatar Mar 03 '23 15:03 tacruc

Why should it work with the nightly build? This issue is still open and there is no commit...

With 0.2.4 I still can only see less than 10% of my photos on the map

melle2 avatar Mar 04 '23 13:03 melle2

Well I merged many commits I to the nightly and fixed some problems I stumbled across without searching for corresponding issues on GitHub.

tacruc avatar Mar 04 '23 20:03 tacruc

With 0.2.4 I still can only see less than 10% of my photos on the map

Can you provide images which are supposed to be on the map but are not. Then we can include them into the test.

tacruc avatar Mar 04 '23 20:03 tacruc

With 0.2.4 I still can only see less than 10% of my photos on the map

Can you provide images which are supposed to be on the map but are not. Then we can include them into the test.

I'd like to. At some point of time it has been displayed, but after I've uploaded a bunch of quiet old photos it stopped working. I assume that scanning of photos breaks if it comes to one if those (at least I have seen some exceptions in the past, see also #652). And the thing is I cannot say which photo(s) is or are causing this issue.

melle2 avatar Mar 05 '23 09:03 melle2

I assume that scanning of photos breaks if it comes to one if those

This assumption is not entirely correct. Each extraction is scheduled in it's own job. Therefore one failing should only stop that one extraction job. Even if the php process fails, 5 min later cron should start a new process continuing with the next background job. Therefore each failing extraction should delay the process by at most 5 minutes. If you have e.g. 10000 photos for which the extraction is failing the jobs would require 34 days to be finished, (assuming cron is executed every 5 minutes) This is practically quite close to stopped working. Which makes your assumption partially correct.

But without further Information e.g. sample photos (Any photo you expect on the map, but is not there). It is hard to further investigate this Issue.

Can you check that the cron.php is executed regularly?

tacruc avatar Mar 09 '23 07:03 tacruc

Sorry for the late resonse, was quite busy. Yes, cron is running every 5 minutes. Even more, from time to time (usually after a new version of maps) I execute docker exec -u www-data -it nextcloud /var/www/html/occ maps:scan-photos and docker exec -u www-data nextcloud php cron.php afterwards. Without success. Attached 3 photos which I expect to be displayed and before occurrence of this issue, they were.

IMG_20150516_140745 IMG_20150516_172317 PANO_20150517_133514

melle2 avatar Mar 23 '23 22:03 melle2

@melle2 I tried multiple programs, (Dophin Gwenview digikam and the Metadata app) non could find geo information in the provided files. Either github removes them, or they don't have geo information.

tacruc avatar Mar 23 '23 23:03 tacruc

Same Issue. Furthermore, the cron jobs will eventually always fail and only start working again if Maps is deactivated.

Server configuration

Operating system: Ubuntu 20.04 Server Web server: Server version: Apache/2.4 Database: mysql PHP version: PHP 8.0 Nextcloud version: (see Nextcloud admin page) 22.2.0 Group folders version:

Updated from an older Nextcloud/ownCloud or fresh install: fresh Where did you install Nextcloud from: snap Are you using external storage, if yes which one: local/s3/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/... no

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php - line 215:

    lsolesen\pel\PelIfd->loadSingleValue()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelIfd.php - line 406:

    lsolesen\pel\PelCanonMakerNotes->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelTiff.php - line 159:

    lsolesen\pel\PelIfd->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelExif.php - line 108:

    lsolesen\pel\PelTiff->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 216:

    lsolesen\pel\PelExif->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/vendor/lsolesen/pel/src/PelJpeg.php - line 126:

    lsolesen\pel\PelJpeg->load()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 442:

    lsolesen\pel\PelJpeg->__construct()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 384:

    OCA\Maps\Service\PhotofilesService->getExifPelBackup()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/Service/PhotofilesService.php - line 137:

    OCA\Maps\Service\PhotofilesService->getExif()

    /var/snap/nextcloud/28586/nextcloud/extra-apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php - line 56:

    OCA\Maps\Service\PhotofilesService->updateByFileNow("*** sensiti ... *")

    /snap/nextcloud/28586/htdocs/lib/public/BackgroundJob/Job.php - line 79:

    OCA\Maps\BackgroundJob\UpdatePhotoByFileJob->run()

    /snap/nextcloud/28586/htdocs/lib/public/BackgroundJob/QueuedJob.php - line 47:

    OCP\BackgroundJob\Job->execute()

    /snap/nextcloud/28586/htdocs/cron.php - line 127:

    OCP\BackgroundJob\QueuedJob->execute()

Just wanted to share that there hasn't been a issue for quite some time for me. No failing cronjobs for me due to Maps. currently on Maps 1.02 Nextcloud 26.0.1 PHP 8.1.19

savowe avatar May 27 '23 11:05 savowe