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

Google calendar synchronization [released]

asked 2014-02-03 21:33:10 +0200

Martijn gravatar image

updated 2014-02-06 08:27:12 +0200

I encounter a problem synchronizing Google calendar. It looks similar to some other questions on the forum like: This one. But it's not a duplicate, because deals with incomplete synchronization.

I had some synchronization errors which resulted in my calendar got cleared on my Jolla. After this I forced a sync by disabling and then enabling the synchronization option in the account settings. But this did not synchronize the existing appointments. Only when I create a new appointment it is synchronized.

When I create a new appointment (in Google) it is synchronized to my Jolla. When I update an appointment (in Google) it is not synchronized. Existing appointments are not synchronized again. I guess Jolla does not look at the last modified timestamp of an appointment but only to the creation timestamp.

I tried to delete my account and recreate it to force a full synchronization, but that had no effect.

  • Is there a way to force a full synchronization, so regardless if there was a previous synchronization?
  • Do I have to delete some configuration file for this?
  • How does Jolla keep track of already synchronized appointments?

PS: I can't wait for full CalDav support. PPS: Added the tag "Bug"

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by Martijn
close date 2014-03-19 12:02:56.359793

Comments

In which update was this fixed? I'm still facing this on 1.0.7.16.

AnaT ( 2014-07-13 21:21:30 +0200 )edit

Please, please, be explicit. Sailfish calendar? Google calendar on Android on Salifish device? Google calendar on Android device? Google calendar via Web interface? Synchronizing what to what? Same for contacts. Don't let the readers guess what you are talking about. Thanks.

wim de vries ( 2014-09-19 14:02:40 +0200 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2014-02-04 07:47:25 +0200

chris.adams gravatar image

Currently, the sync adapter does a full synchronisation every time, if it has network connectivity. There are some bugs in the current adapter (specifically, related to the handling of the end-time of an event), but we don't do any delta / updated-min requests. If you are seeing different behaviour, most likely it is because the sync adapter is still busy (finalising data from a previous sync run), and so no further sync operation is occurring. Alternatively, you might be hitting Google API limits, but I consider that highly unlikely.

To answer your questions in order: 1) save the account again. For Google calendars, that will cause a full purge + resync of events. 2) no. You can trigger it with dbus if you're so inclined: dbus-send --session --type=method_call --print-reply --dest=com.meego.msyncd /synchronizer com.meego.msyncd.startSync string:'google.Calendars' 3) via mkcal database. Every event has a unique identifier, both server-side and locally.

Don't worry, data synchronisation is an area we're actively working on, as we know that it currently leaves a lot to be desired. And yes, full CalDAV support is one of the things which is in the pipeline.

edit flag offensive delete publish link more

Comments

1

I tried both 1 and 2, but unfortunately no success yet. I see that all appointments created before 1 February are missing. If I create a new appointment in Google calendar (even if it's in the past) it's synced ok.

  • Where is the local calendar database file stored and can I delete that, so it will be recreated instead of purged. Maybe the purging is not functioning correct.
  • Are there some log files I can inspect to help pin point the cause?
Martijn ( 2014-02-04 20:47:38 +0200 )edit
1

Very strange.

The mkcal db is at /home/nemo/.local/share/system/privileged/Calendar/mkcal/db Logging for synchronization is mostly suppressed by default; to get logging you can do (as normal nemo user): systemctl --user stop msyncd.service; SOCIALD_LOGGING_LEVEL=3 devel-su -p msyncd and then trigger the calendar sync via dbus. The logging for the calendar sync adapter isn't too verbose, currently, so I don't know how useful it will be. In any event, we're currently working on various improvements to Google calendar synchronization, so hopefully this problem will be addressed as part of that effort.

chris.adams ( 2014-02-05 02:58:37 +0200 )edit

It turns out that the sqlite storage backend for mkcal doesn't delete events from the database when they are deleted (as it keeps them so that it can return them when the client requests events that have been deleted since some timestamp). Previously, we were using the google event id as the event id, and this may have caused issues with resyncing previously synced events (as deletion of the old one followed by creation of the new one, may have failed due to id clash). This will be fixed asap! Thanks for your report!

chris.adams ( 2014-02-06 07:40:50 +0200 )edit

I saved my google account again; but somehow it cleared all my contacts :-)

Deleted the google account, added it again. It worked, but deleted the call log..

arnbak ( 2014-02-08 16:35:10 +0200 )edit

I don't use Google to sync my contacts, but I did delete my contacts database at some point in time (/home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite). But my communication history is still present. The database with this information is /nemo/.local/share/commhistory. I looks it just uses the phone number to link the communications events to the contacts database. Maybe the formatting of phonenumbers changed when you recreated the contact database.

Martijn ( 2014-02-08 18:09:40 +0200 )edit
2

answered 2014-02-05 22:17:23 +0200

Martijn gravatar image

updated 2014-02-05 22:23:23 +0200

OK I got my calendar working again. What I did was:

  • Removed my Google account
  • Deleted /home/nemo/.local/share/system/privileged/Calendar/mkcal/db and /home/nemo/.local/share/system/privileged/Calendar/mkcal/db.changed
  • Opened the Calendar app, so the db file was recreated.
  • Added my Google account

All I'm missing now are the birthdays, so I have a short follow-up question: - What are the sources for the birthdays (Facebook, people)? How can I re-read those into my calendar?

I see that the db is sqlLite3 so this weekend when I have time I will investigate the calendar databases (I saved the before and after situation so I can compare) to see if I can find some kind of clue what migth have gone wrong.

Thanks for the help:-)

edit flag offensive delete publish link more

Comments

Quick inspection of the database shows that the Birthday calendar does not exist anymore on recreation of the database. How and when is this calendar created?

Martijn ( 2014-02-05 23:22:36 +0200 )edit

It's created by contactsd's Birthday plugin (see https://github.com/nemomobile/contactsd) -- it listens to contact changed signals from the QContactManager, looks for birthday details, and creates birthday entries appropriately.

Currently, the birthday data will only come from manually-entered birthdays or from Facebook, I believe. To get that to resync, you can disable your facebook account, save, wait 10 minutes, then re-enable your facebook account and re-save. That should cause the contact data to be resynced (but also everything else like images etc from Facebook, so this can be a data-expensive operation...)

chris.adams ( 2014-02-06 07:36:41 +0200 )edit

Closed, but still relevant. I am new to sailfish and just got my Jolla phone here in Australia (from India). Have played for a bit I did a full reset to clear up all the mistakes I had made and the result was that the calendar sync issue occured. I was showing my main Gmail cal but not others and shared. Followed this procedure and now all good. Thankyou.

bugpuddler ( 2014-10-17 06:46:57 +0200 )edit

Yet another comment on this closed issue. I'm also new to Sailfish and have found that calendar sync (with Google-calendar) is not a stable function. Followed the above decribed procedure and almost all events in Google-calendar was synced to my Jolla. Those missing I had to edit in Google-calendar (from my PC of course) and then they got syncronized to my Jolla calendar. But! As faar as I can see two-way sync does not work. If I create an event in my Jolla it is not synced 'upwards' to Google-calendar.

hansabe ( 2014-12-02 22:00:40 +0200 )edit

I had the issue since yesterday that events created on the phone got not synced to Google and events created on the web got not synced to the phone. Other phones (Windows Phone 8.1) worked so it was not a general issue on Google sync process. I searched for a solution and found this procedure. It worked and now the events are synced properly.

th80 ( 2015-02-25 10:47:48 +0200 )edit

Question tools

Follow
5 followers

Stats

Asked: 2014-02-03 21:33:10 +0200

Seen: 3,116 times

Last updated: Feb 06 '14