Hi Daniel, It is not possible to update the contact and the photo at the same time, because updating a contact's photo causes a contact timestamp change. In the other hand, there is a replication process behind the scenes, this causes a delay after the update and because of this you may need to wait a bit longer to be able to perform the second update.
Regards, Julian On Oct 9, 5:34 pm, dflorey <[email protected]> wrote: > It seems like timing issues. I get back the updated entry, BUT it is > still not updated when uploading a photo and vice versa. > I guess Google is distributing the changes to several servers or is > somehow returning the new entry before it is assured that when > retrieving thecontactby api to really get the latest data. > And what is even more strange: Sometimes I managed to somehow get > thecontactinfo from 3 updates ago...this is really unpredictable. > I can of course provide some code samples but it is not much different > from the docs from the examples. > Just try to update acontactand a photo directly after each other and > you'll see. > I'm running my code on App Engine, but it is in the same thread so > this should no be an issue. > > On 9 Okt., 14:18, "Julian (Google)" <[email protected]> wrote: > > > Hi Daniel, > > > You can only update thecontactand its photo separately, what you > > describe certainly looks like a bug, we will try to reproduce it in > > our end. If possible, please also share a sample of your code. > > > Cheers, > > Julian > > > On Oct 8, 9:54 am, dflorey <[email protected]> wrote: > > > > Some more info: > > > My next try was this: > > > - retrieving thecontact > > > - updating the photo > > > - reloading thecontactUNTIL it gets a new eTag assigned (can take up > > > to 20 reloads, so my guess that asynchronous photo update causes this > > > seems to be right) > > > - updating thecontact > > > > Unfortunately, even after retrieving a newcontactwith updated eTag I > > > still get: > > > Failed to updatecontact'XXX XXXXX' with url=http://www.google.com/m8/ > > > feeds/contacts/daniel.floreysoft%40googlemail.com/full/ > > > 114f9fc98f4acbb6' > > > com.google.gdata.util.PreconditionFailedException: OK > > > Mismatch: etags = ["R3c7fjVSLyt7ImA9WxNXGUQLRA0."], version > > > = [1254991136967000] > > > > I am using the fresh entry with the new etag to do the update so this > > > looks like a bug to me. > > > > On 8 Okt., 10:25, dflorey <[email protected]> wrote: > > > > > Some more info from my side: > > > > When > > > > - retrieving acontact > > > > - updating thecontact > > > > - reloading thecontact(to get the new eTag) > > > > - updating the photo > > > > the newcontactinfo is lost. The new photo is attached, but the > > > > changes on thecontactitself are gone > > > > > When > > > > - retrieving thecontact > > > > - updating the photo > > > > - reloading thecontact > > > > - updating thecontact > > > > the photo is gone. > > > > > So my guess is that is takes some time on the server side to update > > > > the info and that depending on race conditions it sometimes works, > > > > sometimes not. > > > > Is there a reliable way to update both photo andcontactinfo at the > > > > same time? > > > > > On 8 Okt., 09:56, dflorey <[email protected]> wrote: > > > > > > Hi, > > > > > I need some info about what really happens behind the scenes when > > > > > uploading a new photo to acontact. > > > > > When uploading a photo, it seems that the update timestamp gets > > > > > updated. > > > > > > I want to update acontactand the photo at the same time. So what > > > > > steps do I have to take? > > > > > From time to time I get mismatching eTag errors when simply updating > > > > > thecontactand the photo without reloading thecontactinbetween. > > > > > > Can someone provide some more infos? > > > > > Thanks a lot in advance, > > > > > Daniel > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Contacts API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-contacts-api?hl=en -~----------~----~----~----~------~----~------~--~---
