Outlookgooglecalendarsync: Forbidden [403] when syncing calendars

Created on 8 Sep 2019  Â·  12Comments  Â·  Source: phw198/OutlookGoogleCalendarSync

OGCS Version: v2.8.1-alpha (same issue occurs with v2.8.0-beta)
Installed or Portable: Portable (installed has same issue)

Problem Description
When syncing a google calendar to Outlook calendar (bi-directional with defaults applied), the following error is encountered:

2019-09-08 02:13:11,885 DEBUG  30 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [0] -  Processing >> 8/20/2019 9:30 AM (R) => "<redacted subject>"
2019-09-08 02:13:11,886 DEBUG  30 OutlookGoogleCalendarSync.Recurrence [0] -  Creating Google iCalendar definition for recurring event.
2019-09-08 02:13:11,896 DEBUG  30 OutlookGoogleCalendarSync.Recurrence [0] -  RRULE:FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20190917T093000Z
2019-09-08 02:13:11,910 DEBUG  30 OutlookGoogleCalendarSync.Console [0] -  8/20/2019 9:30 AM   "<redacted subject>"
2019-09-08 02:13:11,910 DEBUG  30 OutlookGoogleCalendarSync.Console [0] -  AttributeChangeRecurrenceRRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20190917;BYDAY=... → RRULE:FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20190917T09...RecurrenceRRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20190917;BYDAY=... → RRULE:FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20190917T09...Descriptionhttps//<redacted url> →   <redacted url>  Reminder DefaultTrue → False
2019-09-08 02:13:11,942 DEBUG  30 OutlookGoogleCalendarSync.Console [0] -  4 attributes updated.
2019-09-08 02:13:12,196 DEBUG  30 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [0] -  Saving timestamp when OGCS updated event.
2019-09-08 02:13:12,381 WARN  30 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [0] -  Google.Apis.Requests.RequestError
Forbidden [403]
Errors [
    Message[Forbidden] Location[ - ] Reason[forbidden] Domain[global]
]

2019-09-08 02:13:12,382 ERROR  30 OutlookGoogleCalendarSync.Console [0] -  Updated event failed to save.
2019-09-08 02:13:12,422 DEBUG  30 OutlookGoogleCalendarSync.Forms.ErrorReporting [0] -  Asking user if they want to automatically report errors.

Steps to Reproduce the Issue

  1. Create new calendar in outlook (Add Calendar->Create New Blank Calendar)
  2. Download and extract latest v2.8.1-alpha
  3. Run exe
  4. Configure Settings

    • Outlook - All defaults except picking new calendar in "Select Calendar"

    • Google - Retrieve, auth & select calendar

  5. Sync Options

    • All defaults except setting Bi-Directional for Direction

  6. Start Sync - Successful!
  7. Wait a few mins
  8. Start Sync - Failed with error above
  9. Error dialog appears
  10. Click OK
  11. Application hangs and must be killed

Any other information

  • Outlook account is an @msn.com account
  • Google account is a GSuite account
  • Occurs in v2.8.0-beta (installed) & v.2.8.1-alpha (portable)
  • Full Log submitted via dialog and also directly
  • Attempted multiple times starting the above process from scratch and same result each time
  • No changes were made to the calendar items on either side during the interval between step 5 & 7.
bug recurring appointment resolved

Most helpful comment

This guy Paul is GOOD!!! :-)

All 12 comments

Hi @jondavis9898, could you apply the hotfix posted on #813 - that has some extra logging that may pin down what's causing the 403 error...

Hi @phw198 - Thanks for pointing me to the hotfix. I applied and encountered same issue. There's a little more in the log this time so hopefully it's helpful for you.

Steps Taken:
1) Download & extract patch
2) Overwrite exe in current portable directory
3) Start and verify running 2.8.1.5
4) Click "Start Sync"
5) Encountered same 403 Forbidden - prompted with "Update Google event failed to sync. Continue with synchronization?"
6) Choose "No"
7) Dialog dismissed
8) Prompted with "The synchronization failed - check the Sync tab for further details. Do you want to continue?"
9) Choose "No"
10 Dialog dismissed - Entries in Sync log tab include "Updated event failed to save. Forbidden [403=Forbidden] and "Sync aborted after 1 failed attempts!"
10) Emailed you OGCS log file

Let me know if there's anything additional I can do. Thank you!

Thanks for doing that. So the calendar item failing with 403 is apparently now owned by rohini@<your-domain> - not the barry@<your-domain> that you are using to sync to the calendar.

So:

  • Who owns the target Google calendar?
  • What permissions exactly do you have on it?
  • Did OGCS create the entry in Google?
  • Has anything happened to it since then for it to change owner?

Thanks for the quick analysis!

The calendar item that is failing is a re-occurring item created/organized by rohini@<my-domain>

  • Who owns the target Google calendar? It's my calendar
  • What permissions exactly do you have on it? Full-control (AFAIK)
  • Did OGCS create the entry in Google? - No, it existed in Google first. The Outlook calendar is brand new and this was a first time sync (see initial steps in OP for details).
  • Has anything happened to it since then for it to change owner? Not that I'm aware of. In my initial Sync, everything worked and it showed up in Outlook. Then, wait a few mins and sync again and it fails and then fails every subsequent attempt.

Hope this is helpful, happy to provide any further info.

* Edited * The item in question is not re-occurring, sorry for the confusion.
* Edited # 2 * Re-correction. The item in question is re-occurring, I was looking at the wrong item a few minutes ago.

OK, I've tracked this down. If the Google event is a recurring series invite from someone else, Outlook's recurrence may be equivalent but different. This then wants to update the original Google event, which is not allowed.

Google attribute: RRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20190917;BYDAY=TH,TU
Outlook attribute: RRULE:FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20190917T093000Z

In this situation, we should just ignore recurrence rule changes....

Great news on tracking it down, thank you! Happy to test a new alpha once you have it ready :)

:package: OK, please let me know how it goes with v2.8.1.7.zip (see instructions for applying).

Hi @phw198 -

Thank you for the quick turn on the fix! I've applied 2.8.1.7 and it has resolved the issue. I've been able to sync multiple times and each time it works as expected without encountering any failures (e.g. 403).

I'm going to move on to the next stage of testing the sync but this issue appears to be behind us.

I've emailed you the log from 2.8.1.7 in case you'd like to review.

Thank you again for all your efforts with OGCS and for your prompt attention to this issue, greatly appreciated on all levels!

This guy Paul is GOOD!!! :-)

Hi @jondavis9898 Thanks for confirming the fix :+1: BTW though, it doesn't look like you actually attached the logfile in your email? If you still have the log from 17-Sep I'd be interested in seeing it.

Hi @phw198 - Sorry about that, just emailed you the logs :)

@jondavis9898 Nice - all looks in order.

Was this page helpful?
0 / 5 - 0 ratings