maps icon indicating copy to clipboard operation
maps copied to clipboard

Background Job crashes with: ValueError: exif_read_data()

Open beckenc opened this issue 3 years ago • 5 comments

ValueError: exif_read_data(): Argument #1 ($file) cannot be empty

1.     /var/www/beckenbauer.info/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php - line 380:    exif_read_data()
2.     /var/www/beckenbauer.info/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php - line 264:    OCA\Maps\ServicePhotofilesService->getExif()
3.     /var/www/beckenbauer.info/htdocs/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php - line 56:    OCA\Maps\Service\PhotofilesService->addPhotoNow()
4.     /var/www/beckenbauer.info/htdocs/nextcloud/lib/public/BackgroundJob/Job.php - line 79:    OCA\Maps\BackgroundJob\AddPhotoJob->run()
5.     /var/www/beckenbauer.info/htdocs/nextcloud/lib/public/BackgroundJob/QueuedJob.php - line 47:    OCP\BackgroundJob\Job->execute()
6.     /var/www/beckenbauer.info/htdocs/nextcloud/cron.php - line 128:    OCP\BackgroundJob\QueuedJob->execute()

beckenc avatar Jan 13 '22 07:01 beckenc

Hi @beckenc

I created a pull request: https://github.com/nextcloud/maps/pull/586 witch contains a complete refactor of using exif functions to read data from image files. This pull request might resolve your issues. Do you have a chance to make a test, if it solves this issue? Thank you.

kovge avatar Feb 03 '22 20:02 kovge

Do you have a chance to make a test, if it solves this issue? Thank you.

Hi @kovge ,

I've used your fork of maps for the tests and I got tons of Class "OCA\Maps\Helper\ExifDataException" not found warnings.

I am really not an php expert... So what is the trick to make this class available?

Thanks.

beckenc avatar Feb 11 '22 06:02 beckenc

Do you have a chance to make a test, if it solves this issue? Thank you.

Hi @kovge ,

I've used your fork of maps for the tests and I got tons of Class "OCA\Maps\Helper\ExifDataException" not found warnings.

I am really not an php expert... So what is the trick to make this class available?

Thanks.

Hi @beckenc,

You neeed to run the composer update command from command line. In the folder or maps app app/maps folder inside your nextcloud installation. You can download composer or install via package manager. Please refer to https://getcomposer.org/ for installation or usage.

Actually if you not familiar with composer or php than someone else could try it from this project. There are some php developr contributors here. I think they do not really have mutch time, as the pull request just hanging since months. If you want, you can upload here an image, witch can not be processed with the current version of this app (only of it is not privacy sensitive, so no persons or personal data present) and someone from the core team could care about it.

I really appritiate your feedback and happy to hear that you tried it out, even if you are not really in the php scriptin. If you do not succeed wit composer, you can still reinstall the apps original version. Or if you want i can upload a "composed" ready to deploy zip. Btw the review would be the task for core team, they are the only authorized persons to review and accept a pull request. I giess they are too few and has too less time. Would be useful if they allows some others to review and approve merge requests.

kovge avatar Feb 11 '22 19:02 kovge

Hi @kovge,

commposer update doesn't solve the problem. Still have Class "OCA\Maps\Helper\ExifDataException" not found warings. There is only a ExifGeoException.php in lib/Helper.

beckenc avatar Feb 13 '22 15:02 beckenc

ExifDataException

Hi @beckenc,

Thank you for your reply. Sorry, i had a typo in the file name (ExifDataException's file should be named ExifDataException.php), i do not really know how could it pass the unit tests. It should work now.

kovge avatar Feb 14 '22 18:02 kovge

@beckenc is this issue solved in v0.2.0?

tacruc avatar Aug 15 '22 10:08 tacruc

@tacruc Seems to work. No exceptions in the backround job anymore. Will keep an eye on it for the next days.

beckenc avatar Aug 19 '22 07:08 beckenc