phw198 / OutlookGoogleCalendarSync

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

Several recurring events fail to sync - error message "Updated event failed to save. Forbidden [403=Forbidden]" #1838

Open orphanpiglet opened 5 months ago

orphanpiglet commented 5 months 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: v2.10.4.0
Edition: Installed Sync Direction: O<->G

Bug Description
Several recurring events fail to sync, producing the error message "Updated event failed to save. Forbidden [403=Forbidden]". A pop-up appears asking "Updated Google event failed to save. Continue with synchronisation?" and I have to click "yes" to each failed event each time I sync in order for the sync to continue.

Steps to Reproduce the Issue
Unknown - this happens every time I sync

Any other information
Any additional information that may help troubleshoot the issue.
:paperclip: Attach your OGcalsync.log file.

Log file: OGcalsync.log

HenrikJanPersson commented 4 months ago

I have a slightly similar problem (same version of OGCS), that could possibly be related. In short, it appears to be a recurrent event that does not sync, but my temporary work-around is to uncheck the "Description" field in the "What. Attributes to include".

Logfile ``` 2024-04-17` 13:20:12,442 INFO 1 OutlookGoogleCalendarSync.Sync.Engine+Job+Queue [60] - Scheduled sync started (AutoSyncTimer) for profile: myProfileName 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [268] - CALENDAR SYNC SETTINGS 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [269] - Profile: myProfileName 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [271] - Last Synced: 4/17/2024 12:20:12 PM 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [272] - OUTLOOK SETTINGS:- 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [272] - Service: AlternativeMailbox 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [278] - Mailbox/FolderStore Name: myMail@servername.ending 2024-04-17 13:20:12,446 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [279] - Calendar: Default Calendar (ID: 000000005C40EF374BC5B040863BCDAAD89B65DB0100C5F5B2EC92B1964FB933A3010573E62A00000000010D0000) 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [280] - Category Filter: Exclude 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [281] - Delete When Excluded: True 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [282] - Categories: 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [283] - Only Responded Invites: False 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [284] - Filter String: g 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [286] - GAL Blocked: False 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [287] - GOOGLE SETTINGS:- 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [288] - Calendar: SLU (ID: t1***********************c@group.calendar.google.com) 2024-04-17 13:20:12,447 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [289] - Colour Filter: Exclude 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [290] - Delete When Excluded: True 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [291] - Colours: 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [292] - Exclude Declined Invites: True 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [293] - Exclude Goals: True 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [294] - Include Google Meet: False 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [296] - Cloak Email: True 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [296] - SYNC OPTIONS:- 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [299] - How 2024-04-17 13:20:12,448 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [300] - SyncDirection: Outlook ← Google 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [301] - MergeItems: True 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [302] - DisableDelete: False 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [303] - ConfirmOnDelete: False 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [304] - SetEntriesPrivate: True; olPrivate 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [305] - SetEntriesAvailable: False 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [305] - SetEntriesColour: True; olCategoryColorNone; "None" 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [319] - SingleCategoryOnly: False 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [319] - Obfuscate Words: False 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [329] - When 2024-04-17 13:20:12,449 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [330] - DaysInThePast: 1 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [331] - DaysInTheFuture:90 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [332] - SyncInterval: 1 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [333] - SyncIntervalUnit: Hours 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [334] - Push Changes: False 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [335] - What 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [336] - AddLocation: True 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [337] - AddDescription: True; OnlyToGoogle: True 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [338] - AddAttendees: False <200 2024-04-17 13:20:12,450 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [339] - AddColours: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [340] - AddReminders: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [341] - UseGoogleDefaultReminder: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [342] - UseOutlookDefaultReminder: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [343] - ReminderDND: False (22:00-06:00) 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [344] - ExcludeFree: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [345] - ExcludeTentative: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [346] - ExcludePrivate: True 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [347] - ExcludeAllDay: False; that are marked Free: False 2024-04-17 13:20:12,451 INFO 1 OutlookGoogleCalendarSync.SettingsStore.Calendar [348] - ExcludeSubject: False 2024-04-17 13:20:14,688 INFO 18 OutlookGoogleCalendarSync.Console [350] - Finding Calendar Entries 2024-04-17 13:20:14,804 INFO 18 OutlookGoogleCalendarSync.Console [350] - Scanning Outlook calendar... 2024-04-17 13:20:16,576 INFO 18 OutlookGoogleCalendarSync.Console [350] - 67 Outlook calendar entries found. 2024-04-17 13:20:16,817 INFO 18 OutlookGoogleCalendarSync.Console [350] - Scanning Google calendar... 2024-04-17 13:20:17,640 INFO 18 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [1791] - Google account timezone: Europe/Zurich 2024-04-17 13:20:18,133 INFO 18 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [1846] - Google calendar timezone: Europe/Zurich 2024-04-17 13:20:18,863 INFO 18 OutlookGoogleCalendarSync.Console [350] - 34 Google calendar entries found. 2024-04-17 13:20:18,912 INFO 18 OutlookGoogleCalendarSync.Console [350] - 2 are exceptions to recurring events. 2024-04-17 13:20:19,171 INFO 18 OutlookGoogleCalendarSync.Console [350] - Total inc. recurring items spanning sync date range... 2024-04-17 13:20:20,760 WARN 18 OutlookGoogleCalendarSync.Recurrence [562] - Failed to find master Google event for: 1/30/2024 11:00 AM (R) => "Monthly follow-up meeting" 2024-04-17 13:20:21,539 WARN 18 OutlookGoogleCalendarSync.Recurrence [562] - Failed to find master Google event for: 1/11/2024 9:30 AM (R) => "Sävarinfo" 2024-04-17 13:20:22,104 WARN 18 OutlookGoogleCalendarSync.Recurrence [562] - Failed to find master Google event for: 10/20/2023 10:00 AM (R) => "Research updates and discussion on forest damages" 2024-04-17 13:20:25,599 INFO 18 OutlookGoogleCalendarSync.Console [350] - Outlook 67, Google 36 2024-04-17 13:20:34,526 INFO 18 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [935] - 31 unclaimed orphan appointments found. 2024-04-17 13:20:34,526 INFO 18 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [937] - These will be kept due to configuration settings. 2024-04-17 13:20:40,240 INFO 18 OutlookGoogleCalendarSync.Console [350] - 2 Outlook calendar entries to be deleted. 2024-04-17 13:20:40,240 INFO 18 OutlookGoogleCalendarSync.Console [350] - 2 Outlook calendar entries to be created. 2024-04-17 13:20:40,240 INFO 18 OutlookGoogleCalendarSync.Console [350] - 34 calendar entries to be compared. 2024-04-17 13:20:40,315 INFO 18 OutlookGoogleCalendarSync.Console [350] - Deleting 2 Outlook calendar entries 2024-04-17 13:20:40,810 INFO 18 OutlookGoogleCalendarSync.Sync.Engine+Calendar [709] - Done. 2024-04-17 13:20:40,810 INFO 18 OutlookGoogleCalendarSync.Console [350] - Creating 2 Outlook calendar entries 2024-04-17 13:20:41,196 WARN 18 OutlookGoogleCalendarSync.OGCSexception [478] - Unable to determine AppointmentItem body format. 2024-04-17 13:20:41,196 ERROR 18 OutlookGoogleCalendarSync.OGCSexception [28] - System.Runtime.InteropServices.COMException: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME)) 2024-04-17 13:20:41,197 ERROR 18 OutlookGoogleCalendarSync.OGCSexception [21] - Code: 0x80020006,-2147352570; Location: InvokeDispMethod() in 2024-04-17 13:20:41,209 ERROR 18 OutlookGoogleCalendarSync.Console [346] - Unable to add new entries into the Outlook Calendar. 2024-04-17 13:20:41,531 WARN 18 OutlookGoogleCalendarSync.Ogcs.Outlook.Errors [31] - [0x80070057] >> String cannot be of zero length. Parameter name: oldValue 2024-04-17 13:20:41,531 ERROR 18 OutlookGoogleCalendarSync.OGCSexception [28] - System.ArgumentException: String cannot be of zero length. Parameter name: oldValue 2024-04-17 13:20:41,532 ERROR 18 OutlookGoogleCalendarSync.OGCSexception [21] - Code: 0x80070057,-2147024809; Location: ReplaceInternal() in 2024-04-17 13:20:41,532 ERROR 18 OutlookGoogleCalendarSync.OGCSexception [65] - at System.String.ReplaceInternal(String oldValue, String newValue) at System.String.Replace(String oldValue, String newValue) at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.UpdateCalendarEntry(AppointmentItem& ai, Event ev, Int32& itemModified, Boolean forceCompare) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\OutlookOgcs\OutlookCalendar.cs:line 602 at OutlookGoogleCalendarSync.Recurrence.processOutlookExceptions(AppointmentItem& ai, List`1 evExceptions, Boolean forceCompare, Boolean processingDeletions) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Recurrence.cs:line 886 at OutlookGoogleCalendarSync.Recurrence.processOutlookExceptions(AppointmentItem& ai, Event ev, Boolean forceCompare) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Recurrence.cs:line 844 at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.CreateCalendarEntries(List`1 events) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\OutlookOgcs\OutlookCalendar.cs:line 340 at OutlookGoogleCalendarSync.Sync.Engine.Calendar.googleToOutlook(List`1 googleEntries, List`1 outlookEntries, String& bubbleText) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Sync\Calendar.cs:line 725 at OutlookGoogleCalendarSync.Sync.Engine.Calendar.synchronize() in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Sync\Calendar.cs:line 511 at OutlookGoogleCalendarSync.Sync.Engine.Calendar.<>c__DisplayClass11_1.b__0(Object o, DoWorkEventArgs args) in C:\Users\Paul\Git\OutlookGoogleCalendarSync\src\OutlookGoogleCalendarSync\Sync\Calendar.cs:line 132 2024-04-17 13:20:41,532 ERROR 18 OutlookGoogleCalendarSync.Console [346] - String cannot be of zero length. 2024-04-17 13:20:41,532 ERROR 18 OutlookGoogleCalendarSync.Console [346] - Parameter name: oldValue 2024-04-17 13:20:41,812 INFO 1 OutlookGoogleCalendarSync.Forms.Main [1021] - Application window restored. 2024-04-17 13:20:44,994 INFO 1 OutlookGoogleCalendarSync.Forms.Main [1021] - Application window restored. 2024-04-17 13:20:50,272 INFO 1 OutlookGoogleCalendarSync.Sync.Engine+Calendar [97] - User opted to abandon further syncs. 2024-04-17 13:20:50,272 ERROR 1 OutlookGoogleCalendarSync.Console [346] - Sync aborted after 1 failed attempts! ```
phw198 commented 4 months ago

@orphanpiglet As "Updated event failed to save. Forbidden" implies, you don't have write permission on the calendar you are trying to two-way sync with. If you re-retrieve the Google calendar list, it should add "[Read Only]" to the name of the calendar.

I guess either you recently lost permission on the calendar if this issue also only recently started.

phw198 commented 4 months ago

@HenrikJanPersson Your issue isn't related at all - I've raised #1844 to investigate that and will post a hotfix there.

orphanpiglet commented 4 months ago

@orphanpiglet As "Updated event failed to save. Forbidden" implies, you don't have write permission on the calendar you are trying to two-way sync with. If you re-retrieve the Google calendar list, it should add "[Read Only]" to the name of the calendar.

I guess either you recently lost permission on the calendar if this issue also only recently started.

Thanks for your reply. I own both calendars and have write permission on both, and other events seem to sync fine. This issue has been occurring for a long time, but it seems to be limited to three recurring events. Is there some reason recurring events might behave differently or require different permissions?

phw198 commented 4 months ago

The event OGCS is having a problem updating is the recurring series 27/02/2024 3:00 pm => "Pulau Tiga weekly catch-up" - do you know what created this in Google, as I don't think it was OGCS?

Were you invited as an attendee and maybe don't have rights to update it? Can you edit it manually in https://calendar.google.com? This would be the workaround too - to stop OGCS trying to update Google, you need to make sure it has been edited more recently than the item in Outlook.

Note, two attributes are being updated: the frequency (removing a superfluous "BYDAY=TU"), and the description.