nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
569 stars 173 forks source link

Continous error in cronjob: 'Error: Undefined array key "PHOTO"' #2438

Closed adi-dev closed 2 years ago

adi-dev commented 3 years ago

I see in my logs, every cronjob:

Error: Undefined array key "PHOTO" at /var/www/nextcloud/apps/contacts/lib/Service/SocialApiService.php#232
    /var/www/nextcloud/apps/contacts/lib/Service/SocialApiService.php - line 232:
    OC\Log\ErrorHandler::onError()
    /var/www/nextcloud/apps/contacts/lib/Service/SocialApiService.php - line 409:
    OCA\Contacts\Service\SocialApiService->updateContact("*** sensiti ... *")
    /var/www/nextcloud/apps/contacts/lib/Cron/SocialUpdate.php - line 49:
    OCA\Contacts\Service\SocialApiService->updateAddressbooks("*** sensiti ... *")
    /var/www/nextcloud/lib/private/BackgroundJob/Job.php - line 51:
    OCA\Contacts\Cron\SocialUpdate->run()
    /var/www/nextcloud/lib/private/BackgroundJob/QueuedJob.php - line 45:
    OC\BackgroundJob\Job->execute()
    /var/www/nextcloud/cron.php - line 127:
    OC\BackgroundJob\QueuedJob->execute()

Not sure, what and why this is happening.

NC 22.1.1 Linux Ubuntu PHP 8.0.10, Memory Limit 4GB, Max Execution Time 3600, Upload max size 100MB PostgreSQL 12.8 Contacts app: 4.0.3

call-me-matt commented 3 years ago

Hi. I wrote these lines. It's the background job that searches for contact pictures on social networks. But I do not see this error in my logs. And I do not know why it's happening for you.

adi-dev commented 3 years ago

@call-me-matt, is there any way to help, debug?

call-me-matt commented 3 years ago

Currently I do not have an idea, maybe someone more experienced in VCARD can take a look? @adi-dev can you check if it is only happening for vcards in version 3.x ? I could imagine this is causing issues here. Just strange it is not happening for me.

miaulalala commented 3 years ago

An isset check on $changes in https://github.com/nextcloud/contacts/blob/27354f1922c8df20f007501d3ca8bf7145813809/lib/Service/SocialApiService.php#L232

might help.

call-me-matt commented 2 years ago

same as https://github.com/nextcloud/contacts/issues/2532 and fixed by https://github.com/nextcloud/contacts/pull/2533 ?