# [bug] [has workaround] no background sync of google calendar

asked 2015-11-11 14:19:21 +0200

On my device only manual syncing of calendar with google works.

I tried to create test event and wait for 24 hours. During that period internet connection was missing no more than 3 hours. But still after a day test event were not synced, but it got immediately synced when I triggered manual sync.

I thought to myself: Ok, fine, I am a brave one. I can make duct tape solution: peek what process performs sync and schedule it execution several times a day with timedclient-qt5.

So I strace -e trace=file,process -ff -p \$(pidof jolla-settings) and toggled sync from accounts list to find what jolla-settings launches to perform sync... and it does not look like it calls external tool! jolla-settings just mangles sync DBs by itself.

It does not make sense to me. Is background sync implemented at all? If it is implemented than how often it should be triggered by OS? Is there a way to trigger it from script?

UPD: Guys, this is just insane. I have found solution. There is config file /etc/buteo/profiles/sync/google.Calendars.xml and in this file syncing is just disabled :-D I've changed two lines in this file

4c4
<     <key name="enabled" value="false" />
---
>     <key name="enabled" value="true" />
10c10
<     <schedule enabled="false" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="05:00:00" />
---
>     <schedule enabled="true" interval="10" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" />


And rebooted the phone (Update: most likely running systemctl --user restart msyncd.service should be enough). Now background sync works. Probably interval should be increased to bigger value to conserve power. I suppose interval is minutes. Anyone care to give a link to config file spec?

I can't believe I was suffering for almost a year without sync due to such simple misconfiguration.

UPD (2015-11-30): After a while of using this workaround I must say it does not solve all problems.

Most annoying to me is incompatibility of jolla calendar with google calendar in terms of cancelled events in series of recurrent events. If I delete one event in sequence (regardless of whether I delete in google or on jolla) after a couple of resyncs information about event cancellation becomes totally lost. Jolla / Google fails to push info about event cancellation to the other side and then fetches from other side state of recurrent event with no cancelled occurrences.

Also it seems that when I launch calendar app it initiates now resync with Google. What I see:

1. Calendar app launches and shows event marks on some dates in month view
2. After a second all marks from Google calendar disappears
3. After 3-4 seconds marks of events in Google calendar appears again

This is quite annoying as well. I want calendar to be ready for interaction immediately. Addition synchronization is not needed as calendar is kept synced anyway in background.

edit retag close delete

1

I have noticed it too, my Google calender only get synced when I manually open the Calendar app. Otherwise, no automatic at all. Very annoying.

( 2015-11-11 14:22:57 +0200 )edit

Actually, that's a good one. Because I thought sync to googlecalendar (and other calendars as well) is not working at all.I've set up a few calendars (back in the day when I thought things like that might get fixed fast). OK, so that means, syncing would work, it's just never triggerd. Interestingly for me it never did work. Starting the calendar app does not help either.

( 2015-11-17 22:04:36 +0200 )edit

@Self-Perfection very good finding indeed! Then it should be really easy to make a GUI to enable/disable syncing and setting periodicty just in the same manner as the email checking scheduling ... or even using the same settings (as it was on my Symbian Nokia N8).

( 2015-11-18 13:55:56 +0200 )edit

Tried this and it seems to work - but only in one direction - can you please confirm this: does this work two-directional?

( 2015-11-19 21:21:44 +0200 )edit
1

@stephan I've rechecked right now. I have added description to event in google calendar, got modified description on Jolla, added even more text to description in Jolla calendar app and this addition became visible in google calendar.

Thus it looks like it works bi-directional for me.

Note that I still use interval="10". I forgot to change it to bigger number.

( 2015-11-19 21:41:34 +0200 )edit