phw198 / OutlookGoogleCalendarSync

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

Sync fails if filtering by category and item categories cannot be accessed #1624

Closed elfstrob closed 1 year ago

elfstrob commented 1 year ago

:memo: Use the below template to report your issue.
:bulb: Upgrade to the latest alpha release to check if the problem is already fixed.
:paperclip: To aid investigation, provide your OGcalsync.log file (see instructions).


OGCS Version: v2.9.6-alpha but started in 2.9.6.4 Installed or Portable: Installed

Problem Description

2023-03-30 15:55:13,009 DEBUG  1 OutlookGoogleCalendarSync.Telemetry [32] -  Retrieving URL: https://www.google-analytics.com/collect?v=1&t=event&tid=UA-19426033-4&aip=1&cid=cc606c800cd3040ff787bf621e1a6510&ec=ogcs&ea=sync&el=calendar
2023-03-30 15:55:13,019 DEBUG  1 OutlookGoogleCalendarSync.Console [230] -  Sync version: 2.9.6.0
2023-03-30 15:55:13,019 DEBUG  1 OutlookGoogleCalendarSync.Console [230] -  Profile: Default
2023-03-30 15:55:13,019 DEBUG  1 OutlookGoogleCalendarSync.Console [230] -  Sync started at 3/30/2023 3:55:13 PM
2023-03-30 15:55:13,025 DEBUG  1 OutlookGoogleCalendarSync.Console [230] -  Syncing from 2/28/2023 to 3/30/2024
2023-03-30 15:55:13,025 DEBUG  1 OutlookGoogleCalendarSync.Console [230] -  Outlook ↔ Google
2023-03-30 15:55:13,358 INFO  20 OutlookGoogleCalendarSync.Console [287] -  Finding Calendar Entries
2023-03-30 15:55:13,475 INFO  20 OutlookGoogleCalendarSync.Console [287] -  Scanning Outlook calendar...
2023-03-30 15:55:23,642 ERROR  20 OutlookGoogleCalendarSync.OGCSexception [28] -  System.Runtime.InteropServices.COMException: Sorry, something went wrong. You may want to try again.
2023-03-30 15:55:23,652 ERROR  20 OutlookGoogleCalendarSync.OGCSexception [21] -  Code: 0x94870057,-1803091881; Location: get_Categories() in <Unknown File>
2023-03-30 15:55:23,658 ERROR  20 OutlookGoogleCalendarSync.OGCSexception [65] -     at Microsoft.Office.Interop.Outlook._AppointmentItem.get_Categories()
   at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.FilterCalendarEntries(Calendar profile, Boolean filterBySettings, Boolean noDateFilter, String extraFilter, Boolean suppressAdvisories) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\OutlookOgcs\OutlookCalendar.cs:line 215
   at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.GetCalendarEntriesInRange(Calendar profile, Boolean suppressAdvisories) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\OutlookOgcs\OutlookCalendar.cs:line 123
   at OutlookGoogleCalendarSync.Sync.Engine.Calendar.synchronize() in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Sync\Calendar.cs:line 301
   at OutlookGoogleCalendarSync.Sync.Engine.Calendar.<>c__DisplayClass11_1.<StartSync>b__0(Object o, DoWorkEventArgs args) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Sync\Calendar.cs:line 129
2023-03-30 15:55:23,660 ERROR  20 OutlookGoogleCalendarSync.Console [283] -  Sorry, something went wrong. You may want to try again.
2023-03-30 15:55:23,899 DEBUG  1 System.Windows.Forms.OgcsMessageBox [72] -  Sync Failed: The synchronisation failed - check the Sync tab for further details.
Do you want to try again?
2023-03-30 15:55:23,958 INFO  1 OutlookGoogleCalendarSync.Forms.Main [910] -  Application window restored.
2023-03-30 15:59:16,231 DEBUG  1 System.Windows.Forms.OgcsMessageBox [87] -  Response: No

Steps to Reproduce the Issue
Happens on Start Sync

Any other information
Started occurring after I upgraded to v2.9.6.4 to resolve that issue. It stopped original issue #1593, but now won't sync. Reverted back to 2.9.6-alpha to see if that fixed it. OGcalsync.log

phw198 commented 1 year ago

I don't think this is actually related to v2.9.6.4, but that you have an item in Outlook which is erroring when attempting to access the category information. Were you previously excluding DSU category items, or is this a recently changed settings?

:package: Anyay, hotfix v2.9.6.7.zip (see instructions for applying) should now report which is the problematic item - once you know what it is, we can then decide the best course of action...

Note, this hotfix is based on v2.9.6.0.

elfstrob commented 1 year ago

It is syncing now. It gave me the message:

Failed to filter item by category: 3/27/2023 9:00 AM "Monday OOO " Sorry, something went wrong. You may want to try again.

I will just delete this item.

I have been excluding the DSU category for a while - these are items I do not want cluttering up my Google calendar.

phw198 commented 1 year ago

Do you know how that out of office item was created? Odd that it didn't seem to hold a category field...

elfstrob commented 1 year ago

It was created by somebody from Ukraine. Maybe they did it on their phone?