We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

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

[bug] no background sync of google calendar

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) 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?

[bug] no background sync of google calendar

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.... 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?

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

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. Now background sync works. Probably interval should be increased to bigger value to conserve power. I believe 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.

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

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. 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 believe 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.

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

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.