aluxnimm / outlookcaldavsynchronizer

Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
GNU Affero General Public License v3.0
932 stars 100 forks source link

Calendar sync to Google, error 403 #323

Open filippobottega opened 3 years ago

filippobottega commented 3 years ago

Syncing an Outlook calendar with Google calendar I get some errors like this:

CalDavSynchronizer.DataAccess.WebDavClientException: Response status code does not indicate success: '403' ('Forbidden'). Message:
<?xml version="1.0" encoding="UTF-8"?>
<D:error xmlns:D="DAV:"/>

   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<EnsureSuccessStatusCode>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<ExecuteWebDavRequest>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<ExecuteWebDavRequestAndReturnResponseHeaders>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at CalDavSynchronizer.DataAccess.CalDavDataAccess.<CreateNewEntity>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at CalDavSynchronizer.Implementation.CalDavRepository`1.<Create>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at GenSync.EntityRepositories.BatchEntityRepositoryAdapter`4.<PerformOperations>d__3.MoveNext()

How can I understand the root cause of this issue?

I have attached a sample event that generate the exception.

Quest.zip

filippobottega commented 3 years ago

Errors are transient. When I retry sync I get different errors and after some times I'm able to sync all events. Is it possibile to automatically retry sync in case of errors?

felipelrz commented 2 years ago

Please check this thread for a possible solution.