phw198 / OutlookGoogleCalendarSync

Sync your Outlook and Google calendars
https://www.outlookgooglecalendarsync.com/
Mozilla Public License 2.0
1.82k stars 217 forks source link

Duplicate items in gmail calendar for every sync. #1989

Open KeithNaramore opened 2 weeks ago

KeithNaramore commented 2 weeks ago

Checklist:-

  • [x] Upgrade to the latest release (alpha if available) latest release
  • [x] Reproduce the issue
  • [x] Complete the information below
  • [x] Provide your OGcalsync.log file (see how-to)

OGCS Version: v1.11.0.0 Edition: Installed Sync Direction: O->G

Bug Description
Every time a sync occurs, duplicate schedules are created in gmail for all items that sync.

Steps to Reproduce the Issue

  1. Perform a sync and wath the duplicate schedules appear in gmail calendar.
  2. I also happens on the scheduled sync time of every 2 hours.

Any other information
Any additional information that may help troubleshoot the issue.
:paperclip: Attach your OGcalsync.log file. OGcalsync_2024-10-06.log OGcalsync_2024-10-02.log OGcalsync_2024-10-03.log OGcalsync_2024-10-04.log OGcalsync_2024-10-05.log

wlau-wlau commented 2 weeks ago

Same here... just started to happen in recent days. Please post any suggestion on how to bulk delete on Google Calendar. Mine is drowning in duplicates.

I have been looking at the logs, I think the issue might be that when it queries Google, the log says 0 entry found, so it ended up creating those entries again. The interesting part is the duplicates are non-reoccurring events. My reoccurring events do not get duplicated.

phw198 commented 2 weeks ago

@KeithNaramore Looks like you have filtered out all the Google events with colours:

2024-10-02 16:54:01,667 INFO  1  OutlookGoogleCalendarSync.SettingsStore.Calendar [291] -    Colour Filter: Exclude
2024-10-02 16:54:01,667 INFO  1  OutlookGoogleCalendarSync.SettingsStore.Calendar [293] -    Colours: <Default calendar colour>,Banana,Basil,Blueberry,Flamingo,Grape,Graphite,Lavendar,Peacock,Sage,Tangerine,Tomato

I suspect they all need unchecking.

However, for the G->O sync there is a warning about this and it seems to be missing for O->G.

:package: I'd therefore be appreciative if you could apply hotfix v2.11.0.9.zip to confirm this is your issue before changing your configuration (see instructions for applying).       CRCs: Zip = EBCAF1E7 Exe = 1C69C524

Here's what you should see:- Untitled

Once you corrected the exclusion criteria, the duplicates should be automatically deleted. Let me know how it goes!

@wlau-wlau I suspect you have the same issue, as you suspected from looking at your logs.

KeithNaramore commented 1 week ago

I gave this a try but it didn't fix it. I verified the update. [image: image.png]

On Sat, Oct 12, 2024 at 8:03 AM Paul Woolcock @.***> wrote:

@KeithNaramore https://github.com/KeithNaramore Looks like you have filtered out all the Google events with colours:

2024-10-02 16:54:01,667 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [291] - Colour Filter: Exclude 2024-10-02 16:54:01,667 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [293] - Colours: ,Banana,Basil,Blueberry,Flamingo,Grape,Graphite,Lavendar,Peacock,Sage,Tangerine,Tomato

I suspect they all need unchecking.

However, for the G->O sync there is a warning about this and it seems to be missing for O->G.

📦 I'd therefore be appreciative if you could apply hotfix v2.11.0.9.zip https://github.com/user-attachments/files/17350109/v2.11.0.9.zip to confirm this is your issue before changing your configuration (see instructions for applying https://github.com/phw198/OutlookGoogleCalendarSync/wiki/Reporting-Problems#applying-a-hotfix ). CRCs https://github.com/phw198/OutlookGoogleCalendarSync/wiki/Known-Issues#cyclic-redundancy-checks---aka-crcs: Zip = EBCAF1E7 Exe = 1C69C524

Here's what you should see:- Untitled.png (view on web) https://github.com/user-attachments/assets/05d61f7f-a587-4bc2-bdb8-5a1c14a00207

Once you corrected the exclusion criteria, the duplicates should be automatically deleted. Let me know how it goes!

@wlau-wlau https://github.com/wlau-wlau I suspect you have the same issue, as you suspected from looking at your logs.

— Reply to this email directly, view it on GitHub https://github.com/phw198/OutlookGoogleCalendarSync/issues/1989#issuecomment-2408557667, or unsubscribe https://github.com/notifications/unsubscribe-auth/BL44W5SOF4ZURVL3E2WMGMDZ3EM2XAVCNFSM6AAAAABPQL5PBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGU2TONRWG4 . You are receiving this because you were mentioned.Message ID: @.***>

-- Keith

wlau-wlau commented 1 week ago

Same... It doesn't seem to resolve the issue. I have now disabled auto-sync because it created a ton of duplicates. For me, it's always the non-reoccurring singular event. My re-occurring ones do not get duplicated. I have also verified I don't have any exclusion or inclusion flags - so it's just very plain sync everything type of setting.

I think this might be related to some recent Google-side changes. I had 2-way sync running for a while with no issue until last week.

I would love to have an advance but menu-buried feature for us to bulk delete all the Google Calendar entries. Manual delete all of the duplicates are just too much work. Since Outlook contain the accurate calendar, it's easier just to bulk delete everything on Google and retrigger the sync to push from Outlook again.

cudeca22 commented 1 week ago

I am having a similar problem. I have Windows 11, Outlook/Office 2019, OGCS version 2.11.0.0 I use OCGS to sync from Outlook on my PC to Google (one way only), and ultimately to my iPhone. I have had no problems for many many months, then suddenly a few weeks ago, I started getting multiple entries of the same calendar items in Google. I have not changed any settings. I am not very tech-savvy and have started to loose the tread of this string of messages. So if you need me to provide any information, please be very clear as to how I get it. Here are my settings: OCGS-1 OCGS-2 OCGS-3 OCGS-4 Thanks.

wlau-wlau commented 1 week ago

I went back and looked at my history and I am certain this is a recent issue.

1) about 2.5 weeks ago, i started to get duplicates - but only 1 set of duplicate. Months prior to this - no issues. I also didn't make any changes to my settings. 2) about 10 days ago, I started to get multiple sets of duplicates, such that nearly every sync attempt (manual or auto) causes a new set of events to be created. Prior to me stopping auto-sync, I was drowning in over a dozen+ duplicates of the same event. 3) My sync related settings are nearly identical to cudeca22's.

In looking at the logs, the only thing I can extract is that at the start of sync, OGCS queries Google on calendar inventory, and 0 was returned when in fact there were many events already on Google (from previous OGCS sync). I don't know if there is a server-side error, or if the API changed and OGCS is not parsing the returned result correctly. OGCS then creates a set of events as if there is nothing on the server. Then it does some type of match/reclaim process - of which I am not clear on the logic or exact steps. When these steps somehow fails, the duplicates are then left in Google calendar. If these match/reclaim is able to work its magic, then the extra set gets deleted. It doesn't always fail and if it did, I have probably have multiple dozens of duplicates, 1 from every sync, but that's not the case yet. I have many duplicates but not quite at 1:1 to sync attempts.

When I look at meta data of my calendar events, OGCS would have deleted the 2nd set of events that it created in those correctly handled match/reclaim steps.

I have a habit of opening Google Calendar and update the "Location" to a correct address/building that Google Map can accept. Duplicates created by OGCS does not have that meta data. Therefore, I can basically tell which is the duplicate and which is original, because the original would have the image of the location, i.e., building photo from Google Map.

Unless OGCS can clean up those duplicates in subsequent updates, we really need a bulk delete function to wipe the entire calendar and start fresh if such issue comes up in the future.

cudeca22 commented 1 week ago

Since my previous message, I reduced the Date Range, which just reduced the total number of items that are being duplicated multiple times. Then, with the schedule still set to zero, I un-checked "Push Outlook changes immediately", which stopped any more duplicates in Google, but also stopped any new items being copied to Google. Then, with "Push..." still un-checked, I set the schedule to 15 minutes. When the time came, I got multiple duplicates in Google again. In desperation, I un-checked "Start on login...", but as expected, no improvement. If I can't resolve this soon, I will have to discontinue using OGCS.

wlau-wlau commented 1 week ago

If I can't resolve this soon, I will have to discontinue using OGCS.

I just started a business trip, so no longer near my computer with OGCS installed. Perhaps you can do some more logging with the build-in debug tools, so one of the code contributors can look at the issue. The folks here are quite good with fixing issues. I think this might be a Google deployment, in waves, of some changes to the API and it's only impacting certain people right now. You and I are in the same boat with the exact same symptoms and the timing of this issue is very similar.

phw198 commented 1 week ago

@cudeca22 You have opted to sync no Google colours.

  1. Settings > Google > Sync Configuration
  2. Filter colours - set it to "Exclude"
  3. Right click the box on the right and select "Refresh Colours"
  4. Right click the list once populated and select "Select None"
  5. Save
  6. Sync
phw198 commented 1 week ago

@KeithNaramore :paperclips: Unfortunately GitHub doesn't support submitting files and screenshots to the ticket when replying by email - please log in to GitHub to upload files. Please also provide your log file so I can continue to investigate.

@wlau-wlau It's not possible to provide effective support without the OGcalsync.log file. Are you able to provide it - there are other options available than public upload to this issue...

For the record, I never said that the hotfix resolved the issue. The hotfix should display the warning message that your configuration isn't correct and needs changing...

cudeca22 commented 1 week ago

I went into my primary Google calendar (from my desktop PC), and followed these instructions.

To clear all events from your primary calendar:

  1. On your computer, open Google Calendar.
  2. On the bottom left, hover over the primary calendar.
  3. Click Options. Settings and sharing.
  4. Under “Settings for my calendars,” click Remove calendar.
  5. Under “Remove calendar,” click Delete.

Note: If you do this with a non-primary calendar, it deletes the calendar and its contents, but if you do this with the primary calendar, it just deletes all the contents.

cudeca22 commented 1 week ago

Having cleared my Google calendar, I changed the setting in OGCS to "sync no Google colours" as suggested by Paul. I then performed a sync for 1 day previous to 14 days following. Only one of each item was copied to my Google calendar (that is, no duplicates). I then performed a second sync and had no duplicates. I then added an item to my Outlook calendar and then performed a third sync. The new item was copied to my Google calendar, and there were no duplicates. I have now changed the date range to "1 day previous to 31 days following", and the schedule to every 24 hours; and I have checked "Push Outlook changes immediately". I will wait to see what happens, and will let you know.

wlau-wlau commented 1 week ago

I went into my primary Google calendar (from my desktop PC), and followed these instructions.

To clear all events from your primary calendar:

  1. On your computer, open Google Calendar.
  2. On the bottom left, hover over the primary calendar.
  3. Click Options. Settings and sharing.
  4. Under “Settings for my calendars,” click Remove calendar.
  5. Under “Remove calendar,” click Delete.

Note: If you do this with a non-primary calendar, it deletes the calendar and its contents, but if you do this with the primary calendar, it just deletes all the contents.

The issue with this approach is that it will send cancellation notices to attendees/participants of that calendar event. If those people are on Google Calendar, it will automatically remove those events from their calendars. If you subsequently resync from Outlook again, it will not re-create those invites to those participants.

If you manually delete an event from your Google Calendar, you can opt out cancelling the events and not send notice. I think its important for OGCS to have a mass delete method that uses sync-related delete without cancelling the event. Given this tool is for syncing and sync-related issues are not completely avoidable, such feature is important to have for cleaning up.

phw198 commented 1 week ago

I never said to delete an entire calendar or even any individual items - this post is entirely unnecessary.

If my instructions were followed before manual deletion, OGCS would have automatically deleted just the duplicates for you.

you can opt out cancelling the events and not send notice

Except Google will still email attendees regardless. Hence why OGCS "cloaks" the email address.

wlau-wlau commented 6 days ago

I never said to delete an entire calendar or even any individual items - this post is entirely unnecessary.

If my instructions were followed before manual deletion, OGCS would have automatically deleted just the duplicates for you.

you can opt out cancelling the events and not send notice

Except Google will still email attendees regardless. Hence why OGCS "cloaks" the email address.

As one developer to another, I am a bit concerned about this. I've combed through all the posts and articles and found nothing specifically indicate how I can get OGCS to remove the duplicates once created. I attempted to accept the deletion prompt in some reclaim-related prompts, but it DIDN'T delete the duplicates from Google Calendar, and DELETED events from Outlook (my original events). Thank goodness I had a backup of my Outlook Calendars. After hours of attempts, the best approach I found was to delete all the events from Google Calendar and do just one sync from Outlook, then terminate any other sync attempts. This obviously is not a long term fix, but at least I won't be swimming in dozens of the duplicates... Imagine I have about 30-40 non-re-occurring events in my calendar of the set date range.. then that 30-40 became 400-500 events on Google Calendar - that's how many duplicates gotten created. If you educated us on how to get OGCS to delete these duplicates, then it sounds like I missed it, but please help post link to articles on how to clean up the duplicates.

I've been using this for a while and it was fine until 2-3 weeks ago. The fact multiple people are having the same issue seem to suggest some selective rollout of something new from Google that's causing issues.

KeithNaramore commented 5 days ago

Paul,

These steps fixed my duplicate issue. Thank you!!!! After performing these steps, I test synced and added schedules, and re-synced again. It's working perfectly now with no duplicates.

On Sat, Oct 19, 2024 at 7:17 AM Paul Woolcock @.***> wrote:

@cudeca22 https://github.com/cudeca22 You have opted to sync no Google colours.

  1. Settings > Google > Sync Configuration
  2. Filter colours - set it to "Exclude"
  3. Right click the box on the right and select "Refresh Colours"
  4. Right click the list once populated and select "Select None"
  5. Save
  6. Sync

— Reply to this email directly, view it on GitHub https://github.com/phw198/OutlookGoogleCalendarSync/issues/1989#issuecomment-2423803144, or unsubscribe https://github.com/notifications/unsubscribe-auth/BL44W5QYRILXSXKQCP44F3LZ4JEULAVCNFSM6AAAAABPQL5PBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTHAYDGMJUGQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Keith

phw198 commented 5 days ago

@wlau-wlau It depends on your configuration of OGCS as to how that needs fixing. Once fixed, the duplicates will automatically be removed. For the OP it was down to the Outlook date-time format, for cudeca and keith due to filtering out the Google entries by accident.

If your single-instance duplicates that are being created are all within Google and the intended sync window you have configured, without any evidence to the contrary (in the form of a log file1), the only explanation I can offer is that you have also accidently filtered them out of Google too. As a fellow developer, I am sure you can understand the need to work with hard data to properly troubleshoot.

1At the very least the section at the start of the sync that logs the Profile configuration would help.

phw198 commented 5 days ago

@KeithNaramore Great! Thanks for the update, but a quick favour - could you confirm you got a warning message similar to below before you resolved the problem? Untitled

KeithNaramore commented 5 days ago

I never saw the warning msg.

-K


From: Paul Woolcock @.> Sent: Monday, October 21, 2024 4:15:46 PM To: phw198/OutlookGoogleCalendarSync @.> Cc: KeithNaramore @.>; Mention @.> Subject: Re: [phw198/OutlookGoogleCalendarSync] Duplicate items in gmail calendar for every sync. (Issue #1989)

@KeithNaramorehttps://github.com/KeithNaramore Great! Thanks for the update, but a quick favour - could you confirm you got a warning message similar to below before you resolved the problem? Untitled.png (view on web)https://github.com/user-attachments/assets/05d61f7f-a587-4bc2-bdb8-5a1c14a00207

— Reply to this email directly, view it on GitHubhttps://github.com/phw198/OutlookGoogleCalendarSync/issues/1989#issuecomment-2427733185, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BL44W5XAS4UWE25YVSCLRITZ4VVIFAVCNFSM6AAAAABPQL5PBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRXG4ZTGMJYGU. You are receiving this because you were mentioned.Message ID: @.***>