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

[bug,3.2.1] Google calendar items duplicated after upgrade (workaround explained)

Tracked by Jolla (In release)

asked 2019-12-13 01:15:33 +0200

rastakajakwanna gravatar image

updated 2020-05-29 10:55:18 +0200

Google calendar items have been duplicated after first sync after upgrade.

I've decided to create a short bug report after I experienced the same calendar items duplication bug as others who commented directly on release notes page.

Bug reproduction: - Have SFOS 3.2.0 - Sync calendar from Google account - upgrade SFOS to 3.2.1 - run calendar application (see top line glowing as it syncs) - see duplicates appearing bellow existing records

Update: EVERY SYNC ADDS ONE DUPLICATE!!! I have now 4 duplicates of every record!

Update2: deleting calendar app data (developer mode required) and re-syncing data solves the issue. See answer for details: https://together.jolla.com/question/219130/bug321-google-calendar-items-duplicated-after-upgrade/?answer=219135#post-id-219135 . However, this is a workaround which should not be required for public release.

Update3: missed alarms on notifications window has multiplied now. Calendar items are still single item so this appears to be a different bug or only partially related. The relation is that it happens only to Google calendar records, see this :)

Update4: The 'solution' is only temporary. The issue reapperead after a while. No changes to the account configuration have been made and duplicates are back.

Update5: The annouced fix, introduced by sfos 3.3.0.14, is not working on existing (broken) accounts. The duplicate reappeared (see previous update) and I kept it in order to see if the coming fix will fix it, but I've got a 4th duplicate after sfos version update. Besides that, if you remove Google account and add it back, you will get rid of the duplicates, no new duplicates are currently created, but you will not get rid of the multiplied alerts on the previous duplicates.

Update6: 3.3.0.16, I could not withstand the duplicates anymore, so I've deleted them one by one directly from calendar. These (previously) duplicated items are stable now and no new duplicates are appearing. Although the notification seems to be behaving correctly. Duplicates which I haven't deleted are still there, but they aren't multiplying anymore. I will give it some time, however it seems fixed for my device.

Update7: Duplicates are back! I've just restarted my phone after ~20 days to fix faster discharging for no obvious reason. During these days the calendar stopped syncing and after few more days email account alerted me about gmail sync issues. I've logged in again, no reboot at that time. Calendar has not been syncing until the reboot now when the duplicates reappeared :/

image description

Xperia XA2 Ultra

edit retag flag offensive close delete

Comments

1

Has been fixed :) huraaaaayyy.. :)

2019-12-16: 3.2.1.20 was released to Early Access subscribers. Signing in to Google accounts fixed.

tom.i ( 2019-12-16 16:45:08 +0200 )edit

thanks for reporting that @tom.i =)

cartron ( 2019-12-16 16:47:45 +0200 )edit

ANNNNND it works! :)

cartron ( 2019-12-16 16:56:54 +0200 )edit
1

well, at least i can again create my account - i still have the duplicates being created every time, but i'll look at that after

cartron ( 2019-12-16 16:57:48 +0200 )edit

7 Answers

Sort by » oldest newest most voted
7

answered 2019-12-13 02:29:29 +0200

TXA2 gravatar image

Same happened to me (XA2 - 3.2.1.19), solution was found here --> https://together.jolla.com/question/90275/bug-calendar-duplicates-on-every-sync/?answer=90412#post-id-90412

"" delete all files under /home/nemo/.local/share/system/privileged/Calendar/mkcal and /home/nemo/.local/share/system/privileged/Calendars/ ""

edit flag offensive delete publish link more

Comments

Wow, that's a really old one... I will give it a try and post updates.

Anyway, I will also keep this bug report open as it should be closed once the root cause is understood and it is fixed for public release.

rastakajakwanna ( 2019-12-13 02:38:00 +0200 )edit

Simply re-installing the app doesn't help to fix it (I've just wanted to try that option first, even though I've expected the result :)

rastakajakwanna ( 2019-12-13 02:42:30 +0200 )edit
1

I've renamed the Calendar folder (like it's removed) and synced the calendars again and I confirm the bug does not re-appear.

rastakajakwanna ( 2019-12-13 03:07:47 +0200 )edit
4

same issue here, and removing the "db" and "db.changed" files from /home/nemo/.local/share/system/privileged/Calendar/mkcal fixed the problem initially (I actually moved them to another folder, just in case)

but synchronising again makes duplicate entries being added every time

cartron ( 2019-12-13 12:30:20 +0200 )edit
1

@cartron I have renamed the whole folder in my test and the fix is permanent (no duplicates so far). I haven't recovered from backup created before upgrade, I've only installed the Calendar app again and enabled Google calendar again and tried to sync few times.

rastakajakwanna ( 2019-12-13 13:21:10 +0200 )edit
2

answered 2020-04-20 22:28:50 +0200

tom.i gravatar image

updated 2020-04-20 22:31:07 +0200

Strange, but I have still duplicities after syncing even I've deleted Google account and move that files to backup directory :-/

3.3.0.14 - Intel Aqua Fish -> Jolla C

edit flag offensive delete publish link more
2

answered 2020-05-01 19:52:09 +0200

tranten gravatar image

updated 2020-05-01 19:52:48 +0200

Still have the issue on xperia x after upgrade to 3.3.0. Deleted account, recreate, still issue; deleted calendar db from filesystem and recreated, still issue.

edit flag offensive delete publish link more
1

answered 2020-04-27 10:29:44 +0200

jovirkku gravatar image

This issue should be fixed in OS release 3.3.0.16.

edit flag offensive delete publish link more

Comments

1

@jovirkku - still same bug occurs after update :(

tom.i ( 2020-05-03 10:01:00 +0200 )edit

Under what conditions is it supposed to be solved : I have the 3.3.0.16 and it has dupplicated all my repeated events. I can delete my account as mentionned higher but I prefer to read what is the right path than trying in the dark. At least, I can say : "Doing nothing from a corrected without dupplicated events (because I had the bug in 3.2) doesn't solve it when upgrading to 3.3.0.16. Because rigth after the events are duplicated again. :-(

Thoric ( 2020-05-07 07:56:36 +0200 )edit
0

answered 2019-12-24 14:41:11 +0200

Thoric gravatar image

updated 2020-05-07 07:46:36 +0200

New part : 1) I have to mention that with 3.3.0.16 (Xperia X) presents the same annoying behavior. Same solution... 2) I have to mention that with 3.2.1.20, I also have this bad behavior (Xperia X).

Then just do this:

  1. Stop the google syncing
  2. Close the Calendar App
  3. With "devel-su" erase (moved) the mentionned files under /home/nemo/.local/share/system/privileged/Calendar/mkcal (aka db.*)
  4. Re-activate syncing with the google account
  5. Then it was solved for a long time or at least many syncs (manually started from Calendar App and from Goggle account in Settings

Big thanks to cartron

edit flag offensive delete publish link more

Comments

On XA2 and 3.2.1.20 this workaround does not help. While it gets rid of the duplicates initially, every sync will create a new copy of each calendar entry. I checked the contents of the database file (db) and it actually does have multiple entries for each calendar events. Here's an example:

$ sqlite3 db
sqlite> SELECT Summary, DateStart, DateEndDue, DateCreated,UID,URL FROM Componen
ts WHERE DateStart='1566367200';
MyEvent|1566367200|1566370800|1578074171|a2cce444-58f6-4bd4-9c42-9f4e105bcd8c|urn:x-ical:a2cce444-58f6-4bd4-9c42-9f4e105bcd8c
MyEvent|1566367200|1566370800|1578074187|12ffa64f-8039-40aa-ba33-2b50c12e89b5|urn:x-ical:12ffa64f-8039-40aa-ba33-2b50c12e89b5
MyEvent|1566367200|1566370800|1578075304|6de4c755-5212-4a3b-8066-2a1e912a05e1|urn:x-ical:6de4c755-5212-4a3b-8066-2a1e912a05e1

Afaics the only difference between these events are their UID and URL. The DateCreated does change, but it seems to be the time when the event was created in the Sailfish calendar.

mattock ( 2020-01-03 20:49:40 +0200 )edit

Hi @mattock are you able to do the following to get some information about how and why duplicates are occurring, as I am unable to reproduce on my device (Sony Xperia original, not XA2):

systemctl --user stop msyncd
killall msyncd
MSYNCD_LOGGING_LEVEL=8 devel-su -p msyncd

then trigger sync.

Collect the (verbose) logs, and redact any personal information (usernames, passwords, event information which is private such as names/addresses, etc) and email to chris dot adams at jolla dot com? That would be very helpful - thanks.

chris.adams ( 2020-01-10 06:33:12 +0200 )edit

@chris.adams I sent you the info you requested.

mattock ( 2020-01-13 09:32:04 +0200 )edit

Thanks very much. Prospective fix can be found at https://git.sailfishos.org/mer-core/buteo-sync-plugins-social/merge_requests/54 - can you either build that one yourself, or use the prebuilt package I sent you, to test? Would be greatly appreciated.

chris.adams ( 2020-01-14 05:32:12 +0200 )edit

Agh, testing showed that my fix introduced a different issue (which can result in a much worse problem: server-side duplication of events in some cases) so please don't attempt to test with that package until I have a chance to investigate and fix that issue.

chris.adams ( 2020-01-17 05:46:46 +0200 )edit
0

answered 2020-01-08 19:14:34 +0200

jsommer gravatar image

updated 2020-01-09 08:57:33 +0200

Only the following workaround seem to work for me:

  1. Remov the Google account
  2. Re-create the Google account whereby you uncheck calendar synchronization
  3. Create a CalDav account for Google calendar by using https://www.google.com for the server and /calendar/dav/<your-google-email-address>/events for the path.
edit flag offensive delete publish link more

Comments

Doesn't work on my Xperia X. Username and password suppossed to be the same as the Gmail one, aren't they? On Telegram you have events included in the path. Which is correct? But anyway both ways don't work for me.

Vieno ( 2020-01-08 23:41:16 +0200 )edit

Sorry, it was a format issue. "events" belongs to the path.

Yes, you have to use your Gmail username and password for the CalDAV account and replace the part pf the expression with brackets with your email. I unchecked CardDAV.

/calendar/dav/hello@gmail.com/events
jsommer ( 2020-01-09 09:01:32 +0200 )edit

thanks @jsommer, it seems to work! the only thing I had to do to make it work is create an "App password" on my GSuite account, since my company security does not allow to use my Google password for 3rd party apps.

Also, I see two times each appointment created before I added the CalDAV Google account - I think it's still somewhere in a database, since when i create a new appointment in my Google calendar, it only appears once on my Xperia.

cartron ( 2020-01-09 10:30:31 +0200 )edit

Did you remove the Google calendar account completely at first? Did you try the following?

devel-su -c rm -f /home/nemo/.local/share/system/privileged/Sync/gcal.ini
devel-su -c rm -f /home/nemo/.local/share/system/privileged/Sync/gcontacts.ini
jsommer ( 2020-01-09 10:52:33 +0200 )edit

@jsommer - yes, i removed the Google account completely, then removed the gcal.ini and gcontacts.ini files probably there's still something in the mkcal folder, i'll look at that later

cartron ( 2020-01-09 11:01:49 +0200 )edit
0

answered 2020-04-03 12:16:15 +0200

cartron gravatar image

Fixed in 3.3.0.14 - need to delete the Google account and recreate it - this fixed the problem for me - no longer duplicated events

edit flag offensive delete publish link more

Comments

I have two Google calendars. Both affected by the bug.

I've deleted one of them and added back as you suggest. I confirm that duplicates are gone but I am still alerted 3 times, therefore the bug is fixed only partially and fixing it still requires developer tools and messing in terminal.

That's why I cannot accept your answer.

rastakajakwanna ( 2020-04-03 19:08:13 +0200 )edit
1

I recreated the account twice, both times I could get duplicates on each manual sync from the calendar app.

Artur ( 2020-04-03 23:17:24 +0200 )edit
Login/Signup to Answer

Question tools

Follow
14 followers

Stats

Asked: 2019-12-13 01:15:33 +0200

Seen: 2,140 times

Last updated: May 29 '20