[Galaxy S II Q&A, Help & Troubleshooting] gaboonal:
Hi,

I have a problem when syncing my contacts with Google: it always complains that there was an error during the sync operation. The contacts seem to sync okay from Google to Android, but in the other direction they always seem to fail.

I have been using Cyanogenmod for a few months now: first the nightlies, then 9.0 RC1, RC2 and finally 9.0 stable. Although, I wasn't using the official ROM for long before installing Cyanogenmod, so I can't be too sure that this problem is caused by the ROM.

Upon installing Cyanogenmod, I noticed that my contacts synced perfectly the first time. But each subsequent time they failed to sync with Google. I ignored this for some time, and after upgrading to different nightlies of Cyanogenmod 9 without wiping /data, I assumed it was related to not having a clean install or a bug in the nightlies. However, even when 9.0 stable came out the problem persisted.

Two days ago, in an effort to fix this without re-installing, I assumed that my contacts on Google had become corrupted over time so I deleted everything using my laptop and manually added my contacts again using the Google Contacts web interface. I then deleted all of my contacts on my phone from all sources, and then started a sync with Google again. It pulled down all of the new contacts from Google, but failed to upload new contacts created on my phone on the next sync.

Next I installed Cyanogenmod 9 stable again, this time following the installation guide on their website, resulting in a complete wipe of /data. Just as before, the first sync was successful and this time I was able to add a contact on the phone and sync it back to Google, although this took a few tries. However, a day later and I'm back in the same situation where it always reports an error.

The log file is included below. Sorry about pasting the log directly in here, but my company blocks sites like paste bin so I have no choice.

So I'm on a fresh install of CM9 stable and I completely erased and manually re-entered my contacts two days ago into Google. Any ideas?

Thanks

D/SyncManager( 2011): setSyncAutomatically: , provider com.android.contacts -> false

D/SyncManager( 2011): setSyncAutomatically: , provider com.android.contacts -> true

D/dalvikvm( 2203): GC_EXPLICIT freed 832K, 57% free 3584K/8323K, paused 1ms+3ms

D/ContactsSyncAdapter( 2203): error with entity Entity: _id=84 starred=0 name_verified=0 dirty=1 deleted=1 version=3 account_type=com.google account_name=MY_USERNAME@gmail.com

D/ContactsSyncAdapter( 2203): content://com.android.contacts/data

D/ContactsSyncAdapter( 2203): -> data_version=0 is_super_primary=0 mimetype=vnd.android.cursor.item/group_membership is_primary=0 _id=625 data1=1 group_sourceid=6

D/ContactsSyncAdapter( 2203): content://com.android.contacts/data

D/ContactsSyncAdapter( 2203): -> data_version=0 is_super_primary=0 data2=2 mimetype=vnd.android.cursor.item/phone_v2 is_primary=0 _id=626 data1=7714 247525

D/ContactsSyncAdapter( 2203): content://com.android.contacts/data

D/ContactsSyncAdapter( 2203): -> data_version=0 is_super_primary=0 mimetype=vnd.android.cursor.item/group_membership is_primary=0 _id=627 data1=6

D/ContactsSyncAdapter( 2203): content://com.android.contacts/data

D/ContactsSyncAdapter( 2203): -> data_version=0 is_super_primary=0 mimetype=vnd.android.cursor.item/photo is_primary=0 _id=628

D/ContactsSyncAdapter( 2203): content://com.android.contacts/data

D/ContactsSyncAdapter( 2203): -> data_version=0 data11=0 data10=1 mimetype=vnd.android.cursor.item/name _id=629 data1=Emma Wade is_super_primary=0 data2=Emma data3=Wade is_primary=0

D/ContactsSyncAdapter( 2203): com.google.wireless.gdata2.parser.ParseException: the group doesn't yet have a source id

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactHandler.convertEntityToEntry(ContactHandler.java:1016)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.sendEntityToServer(ContactsSyncAdapter.java:793)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.processLocalChanges(ContactsSyncAdapter.java:761)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.innerPerformSync(ContactsSyncAdapter.java:321)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.onPerformLoggedSync(ContactsSyncAdapter.java:180)

D/ContactsSyncAdapter( 2203): at com.google.android.common.LoggingThreadedSyncAdapter.onPerformSync(LoggingThreadedSyncAdapter.java:33)

D/ContactsSyncAdapter( 2203): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:247)

D/dalvikvm( 2011): GC_CONCURRENT freed 3129K, 48% free 10968K/20871K, paused 5ms+12ms

D/dalvikvm( 2011): GC_EXPLICIT freed 153K, 49% free 10815K/20871K, paused 3ms+8ms

D/ContactsSyncAdapter( 2203): error with entity Entity: auto_add=1 title=My Contacts _id=6 dirty=1 system_id=Contacts group_visible=1 should_sync=1 favorites=0 deleted=0 version=8 account_type=com.google account_name=MY_USERNAME@gmail.com

D/ContactsSyncAdapter( 2203): com.google.wireless.gdata2.parser.ParseException: never update system groups

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.GroupHandler.convertEntityToEntry(GroupHandler.java:429)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.sendEntityToServer(ContactsSyncAdapter.java:793)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.processLocalChanges(ContactsSyncAdapter.java:761)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.innerPerformSync(ContactsSyncAdapter.java:324)

D/ContactsSyncAdapter( 2203): at com.google.android.syncadapters.contacts.ContactsSyncAdapter.onPerformLoggedSync(ContactsSyncAdapter.java:180)

D/ContactsSyncAdapter( 2203): at com.google.android.common.LoggingThreadedSyncAdapter.onPerformSync(LoggingThreadedSyncAdapter.java:33)

D/ContactsSyncAdapter( 2203): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:247)

D/SyncManager( 2011): failed sync operation MY_USERNAME@gmail.com (com.google), com.android.contacts, SERVER, earliestRunTime 42589616, SyncResult: stats [ numParseExceptions: 2]