Can't sync google to google. Error is "Referenced group does not belong to the same user."

31 views
Skip to first unread message

mrmatt...@gmail.com

unread,
Aug 3, 2015, 4:21:27 AM8/3/15
to ASynK Users
Hi,
I'm trying to sync one google account to another. As a start I'm just trying one folder. Things didn't work, so I actually just removed all the contacts in the second account, made a new folder and tried again. But no accounts get synced across. To be honest I'm not exactly clear on what the store id should be, or exactly what I should put in my ~/.netrc, so maybe I've mucked something up there.

stoker:.asynk> cat ~/.netrc
machine gc1_mrmattwilkins2daibutsu
login mrmattw...@gmail.com
password ~/.asynk/mrmattwilkins_credentials.json

machine gc2_mrmattwilkins2daibutsu
login daib...@gmail.com
password ~/.asynk/daibutsu_credentials.json

stoker:.asynk> /tmp/src/ASynK/asynk.py --op=show-profile --name mrmattwilkins2daibutsu
Applying base config from file /tmp/src/ASynK/config/config_v7.json...
Applying base config from file /tmp/src/ASynK/config/config_v7.json...done
Applying user customizations from file /home/m/mwilkins/.asynk/config.py...
Applying user customizations from file /home/m/mwilkins/.asynk/config.py...done
[20:14:16.225 INFO] Debug logging to file: /home/m/mwilkins/.asynk/logs/asynk_logs.2015-08-03.20-14-16.224939
[20:14:16.227 INFO] Deleting log files older than 7 days, if any...
[20:14:16.283 INFO] Deleting log files older than 7 days, if any...done
[20:14:16.283 INFO] *** Profile : mrmattwilkins2daibutsu ***
[20:14:16.283 INFO] Collection 1:
[20:14:16.283 INFO] DB ID : gc
[20:14:16.284 INFO] Store ID : None
[20:14:16.284 INFO] Folder ID : http://www.google.com/m8/feeds/groups/mrmattwilkinss%40gmail.com/base/67fc09418d0fa5b4
[20:14:16.284 INFO] Collection 2:
[20:14:16.284 INFO] DB ID : gc
[20:14:16.285 INFO] Store ID : None
[20:14:16.285 INFO] Folder ID : http://www.google.com/m8/feeds/groups/daibutsus%40gmail.com/base/4170501a0fbf3c1b
[20:14:16.285 INFO] sync_start : 1980-01-01T00:00:00.00+00:00
[20:14:16.285 INFO] sync_stop : 1980-01-01T00:00:00.00+00:00
[20:14:16.286 INFO] sync_dir : SYNC2WAY
[20:14:16.286 INFO] confl_res : 1
[20:14:16.286 INFO] olgid : 0x0
stoker:.asynk> /tmp/src/ASynK/asynk.py --op=sync --name mrmattwilkins2daibutsu
Applying base config from file /tmp/src/ASynK/config/config_v7.json...
Applying base config from file /tmp/src/ASynK/config/config_v7.json...done
Applying user customizations from file /home/m/mwilkins/.asynk/config.py...
Applying user customizations from file /home/m/mwilkins/.asynk/config.py...done
[20:14:23.579 INFO] Debug logging to file: /home/m/mwilkins/.asynk/logs/asynk_logs.2015-08-03.20-14-23.579313
[20:14:23.581 INFO] Deleting log files older than 7 days, if any...
[20:14:23.640 INFO] Deleting log files older than 7 days, if any...done
[20:14:23.641 INFO] Attempting to log into Google...
[20:14:23.647 INFO] Using pre-fetched access_token...
[20:14:25.129 INFO] Attempting to log into Google...
[20:14:25.132 INFO] Using pre-fetched access_token...
[20:14:26.621 INFO] Last synk for profile mrmattwilkins2daibutsu was at: 1980-01-01T00:00:00.00+00:00
[20:14:28.515 INFO] Querying Google for status of Contact Entries...
[20:14:30.386 INFO] Response recieved from Google. Processing...
[20:14:31.912 INFO] Querying Google for status of Contact Entries...
[20:14:33.432 INFO] Response recieved from Google. Processing...
[20:14:33.432 INFO] No entries in feed.
[20:14:33.432 INFO] ==== gc =====
[20:14:33.433 INFO] New : 7
[20:14:33.433 INFO] Modified : 0
[20:14:33.433 INFO] Unchanged : 0
[20:14:33.433 INFO] =====
[20:14:33.434 INFO] Total Entries : 7
[20:14:33.434 INFO] Deleted : 0
[20:14:33.434 INFO] ==== gc =====
[20:14:33.434 INFO] New : 0
[20:14:33.434 INFO] Modified : 0
[20:14:33.435 INFO] Unchanged : 0
[20:14:33.435 INFO] =====
[20:14:33.435 INFO] Total Entries : 0
[20:14:33.435 INFO] Deleted : 0
[20:14:33.436 INFO] Number of entries modified both places (conflicts): 0
[20:14:33.436 INFO] conflict resolve direction : 1. db1id: gc, db2id: gc
[20:14:33.436 INFO] After conflict resolution, size of gc mod : 0
[20:14:33.436 INFO] After conflict resolution, size of gc mod : 0
[20:14:33.437 INFO] After conflict resolution, size of gc del : 0
[20:14:33.437 INFO] After conflict resolution, size of gc del : 0
[20:14:33.438 INFO] =====================================================
[20:14:33.438 INFO] Sending New gc entries to gc
[20:14:33.438 INFO] =====================================================
[20:14:33.438 INFO] 7 new entries to be synched.
[20:14:37.343 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.344 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.344 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.344 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.345 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.345 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.345 ERROR] Upload to Google failed for: None: Reason: Referenced group does not belong to the same user. Should be: daib...@gmail.com, but is: mrmattw...@gmail.com. Code: SYNC_BAD_REQUEST
[20:14:37.346 INFO] =====================================================
[20:14:37.346 INFO] Sending Modified gc entries to gc
[20:14:37.346 INFO] =====================================================
[20:14:37.346 INFO] No modified entries that need to be synched
[20:14:37.346 INFO] =====================================================
[20:14:37.347 INFO] Synching Deleted gc entries to gc
[20:14:37.347 INFO] =====================================================
[20:14:37.347 INFO] No deleted entries that need to be synched.
[20:14:37.347 INFO] =====================================================
[20:14:37.347 INFO] Sending New gc entries to gc
[20:14:37.347 INFO] =====================================================
[20:14:37.347 INFO] No new entries that need to be synched
[20:14:37.348 INFO] =====================================================
[20:14:37.348 INFO] Sending Modified gc entries to gc
[20:14:37.348 INFO] =====================================================
[20:14:37.348 INFO] No modified entries that need to be synched
[20:14:37.348 INFO] =====================================================
[20:14:37.348 INFO] Synching Deleted gc entries to gc
[20:14:37.348 INFO] =====================================================
[20:14:37.348 INFO] No deleted entries that need to be synched.
[20:14:37.349 INFO] timestamps not reset for profile mrmattwilkins2daibutsu due to errors (previously identified).
stoker:.asynk>


Any clues would be gratefully received!

Matt

Sriram Karra

unread,
Aug 12, 2015, 6:11:50 AM8/12/15
to as...@googlegroups.com
Matt,

There is nothing wrong with the way you have set up ASynK. For all the hoops one has to jump through (some created by Google and some by ASynK), I am very happy that you got this far.

I can confirm that you have hit a bug in ASynK, and I will be looking into it soon.

-Sriram


Matt

--
You received this message because you are subscribed to the Google Groups "ASynK Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asynk+un...@googlegroups.com.
To post to this group, send an email to as...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/asynk/0da4cf3e-1b2e-44c3-baec-4da0be350576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Wilkins

unread,
Aug 12, 2015, 2:15:15 PM8/12/15
to as...@googlegroups.com
Hi,
Thank you so much for looking at this! As far as I can see there
isn't any tool out there nearly as capable as Asynk, so I am really
relying on it!
Matt
> You received this message because you are subscribed to a topic in the
> Google Groups "ASynK Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/asynk/AS-DhUTqFUY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> asynk+un...@googlegroups.com.
> To post to this group, send email to as...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/asynk/CAFkt3UOANouN5EVH80B6yXYpV_2CCwsMqHsR1wQ-TGwJ%3DMcVDw%40mail.gmail.com.

Matt Wilkins

unread,
Aug 13, 2015, 4:18:30 PM8/13/15
to as...@googlegroups.com
Hi,
Is there anyway I can help you?
Matt

Sriram Karra

unread,
Aug 13, 2015, 4:33:35 PM8/13/15
to as...@googlegroups.com
Thanks for the offer, Matt. You can certainly look at the code and put up a fix. I'd be delighted if you can do that.

If that's not possible, there's not much else. Because it is a bug, and I know exactly where the problem lies, and the fix isn't a totally trivial one (I would have pushed out a fix if that were the case). So the other alternative is to be patient :)

Matt Wilkins

unread,
Aug 13, 2015, 6:20:52 PM8/13/15
to as...@googlegroups.com
Hi Sriram,
So is the bug just with syncing google to google, or google to anything?
Thanks
Matt
> https://groups.google.com/d/msgid/asynk/CAFkt3UMuHrgopRn_6KsYzv165Fpa6LzGRHnydzbJnWKNOUjbsQ%40mail.gmail.com.

Sriram Karra

unread,
Aug 14, 2015, 12:56:35 AM8/14/15
to as...@googlegroups.com
Only google to google

Matt Wilkins

unread,
Aug 14, 2015, 2:39:19 AM8/14/15
to as...@googlegroups.com
Hi,

Alas it also affects bbdb to google :-(

Since you can't sync google to google, I thought I would sync google
to bbdb, then bbdb up to google. However the people in my google
address book who are in user defined groups cannot get pushed up. The
sync from google to bbdb is fine, I end up with a text file with all
my people in there, and as indicated some of them have gid urls
containing mrmattw...@gmail.com. Then I sync from that bbdb file
to the new google account and I get these error messages:
[18:24:43.544 ERROR] Upload to Google failed for: Foo Bar: Reason:
Referenced group does not belong to the same user. Should be:
daib...@gmail.com, but is: mrmattw...@gmail.com. Code:
SYNC_BAD_REQUEST

So it looks like the same root cause.

Matt
> You received this message because you are subscribed to a topic in the
> Google Groups "ASynK Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/asynk/AS-DhUTqFUY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> asynk+un...@googlegroups.com.
> To post to this group, send email to as...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/asynk/CAFkt3UPn%3DRw2AsHzFcjMy89gt%2BuUZik4MHu50QJGXAdd4YEMGA%40mail.gmail.com.

Sriram Karra

unread,
Aug 14, 2015, 5:11:22 AM8/14/15
to as...@googlegroups.com
Ah, of course. I did not understand your question fully. I can see why using BBDB as an intermediary step will not cut it.

Sriram Karra

unread,
Aug 14, 2015, 2:35:27 PM8/14/15
to as...@googlegroups.com
I just pushed a fix to the branch called 'gcgc'. Can you test that?

Matt Wilkins

unread,
Aug 15, 2015, 4:45:23 AM8/15/15
to as...@googlegroups.com
Hi Sriram,
Awesome that works! I am syncing all google contacts from one to
another. Groups are not made on the destination, nor are people put
into local groups (even if I manually create the groups first).
However the people do get sync'ed across, and that is what I actually
care about.
So a big thank you to you!!
Matt
> https://groups.google.com/d/msgid/asynk/CAFkt3UOnBt6DVatfDB%2B_j7te9H7Ogpxj%3D3Dh6Foj0bpYV_vyVQ%40mail.gmail.com.

Sriram Karra

unread,
Aug 15, 2015, 6:43:23 AM8/15/15
to as...@googlegroups.com

Yea, that is solution to the problem I had. My use case is I have a master account (my oldest gmail account) and I sync from other accounts (like my current work account on Google apps) to a specific folder in my master gmail account.

What you suggest - basically mirroring from one account to another is not a use case that is currently supported.

mwilkins

unread,
Aug 17, 2015, 4:55:35 AM8/17/15
to as...@googlegroups.com

Hi,

Any chance you could apply this patch? It stops the printing of the
four lines of information, rather logging.info is used. So if you
don't want output you can set the log level and not pipe stdout to
/dev/null.

Thanks

--- state.py.orig 2015-08-17 20:51:21.076719747 +1200
+++ state.py 2015-08-17 20:51:24.684827243 +1200
@@ -70,9 +70,9 @@
self._migrate_config_if_reqd(self.confi_curr_ver)

try:
- print 'Applying base config from file %s...' % self.confn
+ logging.info('Applying base config from file %s...' % self.confn)
confi = open(self.confn, "r")
- print 'Applying base config from file %s...done' % self.confn
+ logging.info('Applying base config from file %s...done' % self.confn)
except IOError, e:
print 'Error! Could not Open file (%s): %s' % (self.confn, e)
raise
@@ -86,9 +86,9 @@
stc = demjson.decode(confi.read())
sts = demjson.decode(statei.read())

- print 'Applying user customizations from file %s...' % self.confpy
+ logging.info('Applying user customizations from file %s...' % self.confpy)
self._customize_config(self.confpy, stc)
- print 'Applying user customizations from file %s...done' % self.confpy
+ logging.info('Applying user customizations from file %s...done' % self.confpy)

# # A sample profile is given in the initial distribution, that should
# # not be written back to the file. Do the needful.

Matt

Sriram Karra

unread,
Aug 17, 2015, 5:40:26 AM8/17/15
to as...@googlegroups.com
Hm... Is it because you want a totally silent operation?

I have it this way because the logger is not set up before the config is being applied. So these will appear as config lines only to console and not to the log file itself which can be confusing.

--
You received this message because you are subscribed to the Google Groups "ASynK Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asynk+un...@googlegroups.com.
To post to this group, send an email to as...@googlegroups.com.

Matt Wilkins

unread,
Aug 17, 2015, 6:23:55 PM8/17/15
to as...@googlegroups.com
Hi,
Yes, I want the option of silent operation. I run the sync from cron,
I don't want output every 15minutes! But I do want output if there is
an error. I suppose I could just pipe stdout into /dev/null. Still
it would be nice if one could control what is output.
Matt
> You received this message because you are subscribed to a topic in the
> Google Groups "ASynK Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/asynk/AS-DhUTqFUY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> asynk+un...@googlegroups.com.
> To post to this group, send email to as...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/asynk/CAFkt3UP_C05rk4C26cej%2Bmc-%3Ds7f4sySGMrFF7SKp%2BosKgdA6Q%40mail.gmail.com.

Sriram Karra

unread,
Aug 18, 2015, 5:39:38 AM8/18/15
to as...@googlegroups.com
Matt, when I apply this patch I actually get the repeating log lines that Brady Trainor complained about on another thread!

Does your patch give you a clean log to console?

Reply all
Reply to author
Forward
0 new messages