Bug 328422

Summary: Syncing google contacts shows "Google-Kontakte (xxx@googlemail.com): Requested resource does not exist. Google replied 'Photo not found'
Product: [Frameworks and Libraries] libkgapi Reporter: Marcus <wellendorf>
Component: contactsAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0.1   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.3
Sentry Crash Report:

Description Marcus 2013-12-04 13:29:41 UTC
Most often syncing my googlecontacts it doesn't work but shows an error message:
Google-Kontakte (xxx@googlemail.com): Requested resource does not exist. Google replied 'Photo not found'


Reproducible: Sometimes

Steps to Reproduce:
1. Open Kaddressbook
2. Enter new contact
3. sync the google akonadi ressource per rightclick >  Adressbuch aktualisieren (should be actualise addressbook in English
Actual Results:  
Shows an error message

Expected Results:  
sync contacts

This problem I have a while, at least with kdepim version 4.11.2. Now I use 4.11.3
I am using Kubuntu 13.10 with KDE Saucy Backports
Comment 1 Marcus 2013-12-06 02:26:27 UTC
Yesterday I was changing a lot of contacts. And there was no problem syncing. Maybe it's not akonadi related but an connection problem? I am not shure here.
Comment 2 Daniel Vrátil 2013-12-06 09:59:14 UTC
We don't know whether contact has or does not have a photo (we always get a valid photo URL), so we have to try to download the photo from the URL, and we either get the picture, or we get HTTP 404.

There's however a bug in handling of the 404 error, that causes it to propagate all the way up to resource, which then terminates the job.
Comment 3 Daniel Vrátil 2013-12-06 09:59:52 UTC
Git commit c8c1a5b0410cae422a539333b8d37a1279a40817 by Dan Vrátil.
Committed on 06/12/2013 at 09:58.
Pushed by dvratil into branch 'LibKGAPI/2.0'.

When fetching last contact photo fails, don't fail the entire job

Job::replyReceived() sets error to NotFound if it receives 404. In case
of ContactPhotosFetchJob that's not a fatal error though, but a notification
that the contact does not have a photo. Subsequent success will reset the
error, but in case the very last contact does not have a photo, the error
would remain set to NotFound, which would then fail the entire task in Google
resource.
FIXED-IN: 2.0.3

M  +4    -0    libkgapi2/contacts/contactfetchphotojob.cpp

http://commits.kde.org/akonadi-google/c8c1a5b0410cae422a539333b8d37a1279a40817