Bug 1414971

Summary: evolution-data-server creates Google calendar sources twice
Product: [Fedora] Fedora Reporter: Marco Kundt <mrckndt>
Component: evolution-data-serverAssignee: Milan Crha <mcrha>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: mbarnes, mcrha
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-20 12:57:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
GNOME Calendar with calendars
none
vimdiff of 'Contacts' sources
none
vimdiff of 'Holidays' sources
none
vimdiff of main calendar sources
none
ics files inside ~/.cache/evolution/calendar none

Description Marco Kundt 2017-01-19 20:48:46 UTC
Description of problem:
When logging in to a Google account through Online Accounts in System Settings to sync my calendars and open these with GNOME Calendar e.g. i get every calendar twice. After i took a look inside the sources and .ics files in ~/.cache/evolution i found out that for every entry ("Holidays..", "Contacts" and personal calendar) there are two sources and two ics files, but in different folders. Deduplicating them by removing one of every calendar leads to a resync until two entries are present.

Version-Release number of selected component (if applicable):
gnome-online-accounts.x86_64  3.22.4-1.fc25
evolution-data-server.x86_64  3.22.4-1.fc25


Steps to Reproduce:
1. Create Google account
2. Select calendar to be synced
3. Open GNOME Calendar e.g. or look inside the calendar folder in ~/.cache/evolution
4. Every calendar is present twice

Comment 1 Marco Kundt 2017-01-19 20:52:25 UTC
Created attachment 1242579 [details]
GNOME Calendar with calendars

Comment 2 Marco Kundt 2017-01-19 20:53:14 UTC
Created attachment 1242580 [details]
vimdiff of 'Contacts' sources

Comment 3 Marco Kundt 2017-01-19 20:53:54 UTC
Created attachment 1242581 [details]
vimdiff of 'Holidays' sources

Comment 4 Marco Kundt 2017-01-19 20:56:07 UTC
Created attachment 1242584 [details]
vimdiff of main calendar sources

Comment 5 Marco Kundt 2017-01-19 20:57:02 UTC
Created attachment 1242586 [details]
ics files inside ~/.cache/evolution/calendar

Comment 6 Milan Crha 2017-01-20 11:22:53 UTC
Thanks for a bug report. I tried to reproduce it, but no luck. I also use the up-to-date Fedora 25. I even tried to copy one of the .source files from
   ~/.cache/evolution/sources/<google-account-uid>/
under a different name into the same folder, but that didn't cause any duplicate entries in the calendar list (I copied a Holiday calendar .source file provided by the Google server).

Could you try to run from a terminal these commands as a regular user, please?

   $ export WEBDAV_DEBUG=all
   $ ESR_DEBUG=1 /usr/libexec/evolution-source-registry

It'll show what the evolution-source-registry found and what the Google server returned, when it had been looking for available calendars. The output will be long and will contain quite much private information, thus it's not for a share in a public bug report.

I would try to disable the Calendar part in the system Settings->Online Accounts->Google Account, which should hide both copies of the doubled calendars. And then enable it, to see what it will do.

Comment 7 Marco Kundt 2017-01-20 11:51:59 UTC
Something interessing happened last night. Yesterday i tried multiple times to add the account without luck. Everytime i got these duplicates. After my laptop was powered on the whole night, the dupicates are now located in ~/.cache/evolution/calendar/trash; it works as expected now. Sadly i can't say what happened.

Comment 8 Milan Crha 2017-01-20 12:57:20 UTC
Ah, good. It could be some mismatch what the evolution-source-registry reported as available sources and those being really available. The log you sent me privately also shows that there are no duplicates:
> Bus name 'org.gnome.evolution.dataserver.Sources5' acquired.
> USERNAME: Pairing 1484911678.12229.0@thuban9 with resource
> events::https://apidata.googleusercontent.com/caldav/v2/TOKEN%40virtual/events/
> USERNAME: Pairing 1484911678.12229.1@thuban9 with resource
> events::https://apidata.googleusercontent.com/caldav/v2/USERNAME%40gmail.com/events/
> USERNAME: Pairing 1484911678.12229.2@thuban9 with resource Contacts
> USERNAME: Pairing 1484911678.12229.3@thuban9 with resource
> events::https://apidata.googleusercontent.com/caldav/v2/TOKEN%40virtual/events/
> USERNAME: Pairing 1484911678.12229.4@thuban9 with resource Tasks List

I'm closing this for now, in a hope that I won't hide any bigger issue. Thank you for you involvement.