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

BUG: calendar entries synced from google account with multiple calendars don't have a calendar assigned in the mkal db and are not shown in the calendar app

asked 2014-04-12 10:08:01 +0300

harry gravatar image

updated 2014-09-03 13:02:47 +0300

I have a google account with multiple (4) calendars. After updating to 1.0.5.16 only a few events from a few events google calendar show up. It seems as if only events from one show up, but when you look closely you find events from more than one. I tried to delete the account and readd it but it does not help. I tried to enable and disable calendars but with no luck. You can check whether you are affected by this bug by executing the following command as root:

sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "SELECT * FROM Components WHERE Notebook = '';"

Update1: I queried the google.db with sqlite3 command line tool and there are events in 4 different calendars. So it seems that the events are synced to the device but are not displayed.

echo "SELECT localCalendarId FROM events GROUP BY localCalendarId;" | sqlite3 /home/nemo/.local/share/system/privileged/Calendars/google.db

Update2: I renamed the one calendar that was showing, that it is not the last one in the list, reset my calendar dbs, removed the google account and added it again. Thereafter still only events from one calendar show up, but it is a different one and not the last in the displayed list.

Update3: I querried the mkcal/db for events that are in google calendar but are not displayed in the jolla calendar app

sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "SELECT * FROM Components;" | grep uniqueString

and I found for each google calendar entries in the db. So something is special about my calendars? Could there be a special value in an entry that stops the app from reading? How can I debug? I did not find any error message in journal while opening the calendar app

journalctl --all --follow --no-pager

Update 4: I got it, why the events are not displayed in the calendar app. In the Components table from mkal/db the Notebook column is empty for many events. So they belong to no calendar and hence they are not displayed.

sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db "SELECT * FROM Components WHERE Notebook = '';"

There must be a bug in mkcal while creating/persisting the calendar entries. Maybe the NotebookUUIDs are freed before the calendar entries are persisted?

Update 5: The bug is still present on 1.0.8.19.

Edit: changed sqlite to sqlite3

The sync client is now OSS see https://github.com/nemomobile/buteo-sync-plugins-social

edit retag flag offensive close delete

Comments

1

Have the same problem after the update.

siggi_digital ( 2014-04-12 10:29:13 +0300 )edit
2

I have several external calendars synced with my google calendat, and they were never displayed. I was just waiting for an update to change that, and now you're saying you had those displayed already?!

Bimberle ( 2014-04-13 14:51:29 +0300 )edit

I have 4 own calendars. They show up in jolla. But calendars shared with me by others do not.

harry ( 2014-04-13 22:09:25 +0300 )edit
1

I have all google calendars displayed in the app. Maybe you can try link text ? that is supposed to group your google calendars

pat_o ( 2014-04-14 17:48:58 +0300 )edit

I know this site and all my own calendars (4) and some shared calendars from others are checked. My own calendars even appear in the jolla calendar app when I go to "Manage calendar", but only the events from one calendar show up. Do you see events from more then one of your google calendars in jolla?

harry ( 2014-04-14 18:08:54 +0300 )edit

3 Answers

Sort by » oldest newest most voted
21

answered 2014-09-04 09:27:04 +0300

stezz gravatar image

Thanks for the report and sorry that it took a bit long to notice. We are now tracking it internally.

edit flag offensive delete publish link more

Comments

I hope you are also looking at the possibly related issue where a calendar which is shared by an other person for me, is not visible on Jolla (It did work on N9, so I assume that the Google settings are OK)

epa ( 2014-09-04 09:40:23 +0300 )edit

thanks, is there already a report for that in TJC ?

stezz ( 2014-09-04 09:42:05 +0300 )edit

ok thanks added this link to the report

stezz ( 2014-09-04 10:42:42 +0300 )edit
1

These are two different bugs. The only relation is that they both deal with google calendar sync, but that's it. @stezz I would recommend you that you track them as two bugs internally. (I'd say "thank you", but I know how to use the voting mechanism ;) )

harry ( 2014-09-04 10:48:27 +0300 )edit
18

answered 2014-04-19 10:08:30 +0300

harry gravatar image

updated 2016-02-09 11:12:52 +0300

I found a workaround that corrects my mkcal calendar database. It is not a real bugfix since it does not cure the root cause. But for me it made all events appear in the clalendar app. Use it at your own risk!

First create query the google sync db which keeps the info about calendar and event UID, too and write the update commands to a file update-calendar.sql.

sqlite3 -separator $'\t' /home/nemo/.local/share/system/privileged/Calendars/google.db "SELECT localCalendarId, localEventId FROM events" | awk -v sq="'" 'BEGIN {print "BEGIN TRANSACTION;" } {print "UPDATE Components SET Notebook=" sq $1 sq " WHERE UID=" sq $2 sq ";" } END {print "COMMIT;" }' > /home/nemo/update-calendar.sql

Then execute the created sql commands on the mkcal db

sqlite3 /home/nemo/.local/share/system/privileged/Calendar/mkcal/db < /home/nemo/update-calendar.sql

Today I had a duplicate entry in the db. I corrected it but it seemed that the bug appears even on update syncs

Update 2016-02-09: The workaround does not work anymore with 2.0.1.7.

edit flag offensive delete publish link more

Comments

1

Thanks, worked for me!

gehowa ( 2014-04-19 22:34:51 +0300 )edit
1

Amazing work on the workaround. Thanks. I got all my events visible without issues.

Iipe ( 2014-05-12 12:00:42 +0300 )edit
1

Many thanks, it works fine!

Sven ( 2014-06-13 21:42:17 +0300 )edit
1

Works like a charm, Thank You!

WilbertS ( 2014-07-16 16:26:04 +0300 )edit
1

Any idea what this would look like for the CalDAV case? Seems the same problem there.

JayBeRayBearGun ( 2014-07-29 20:42:43 +0300 )edit
0

answered 2019-03-07 15:11:25 +0300

Smar gravatar image

Just for a bump, this still seems to be issue. Or at least I’m not getting a calendar added (ics resource) in calendar.google.com to get synced to Jolla’s calendar. Main Google’s calendar works without a problem.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
28 followers

Stats

Asked: 2014-04-12 10:08:01 +0300

Seen: 3,098 times

Last updated: Mar 07 '19