[GH-ISSUE #124] Not syncing: System.Threading.Tasks.TaskCanceledException: A task was canceled. #123

Closed
opened 2026-02-25 20:30:57 +03:00 by kerem · 4 comments
Owner

Originally created by @digitalkram on GitHub (Apr 5, 2016).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/124

hi there

for me sync is not working at all using Outlook 2013 and owncloud as CalDAV-Server. Connection testing succeeds.

Sync report:

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>OCCal</ProfileName>
  <ProfileId>002882f3-232b-4e12-894e-07c54ed5ac9b</ProfileId>
  <StartTime>2016-04-05T09:23:58.9072616Z</StartTime>
  <LoadErrors />
  <EntitySynchronizationReports />
  <ExceptionThatLeadToAbortion>System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetVersions&gt;d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.Implementation.CalDavRepository.&lt;GetAllVersions&gt;d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`7.&lt;SynchronizeNoThrow&gt;d__17.MoveNext()</ExceptionThatLeadToAbortion>
  <Duration>00:01:36.3988443</Duration>
</SynchronizationReport>

If there is more information required just let me know.

Cheers,

Originally created by @digitalkram on GitHub (Apr 5, 2016). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/124 hi there for me sync is not working at all using Outlook 2013 and owncloud as CalDAV-Server. Connection testing succeeds. Sync report: ``` <?xml version="1.0" encoding="utf-16"?> <SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ProfileName>OCCal</ProfileName> <ProfileId>002882f3-232b-4e12-894e-07c54ed5ac9b</ProfileId> <StartTime>2016-04-05T09:23:58.9072616Z</StartTime> <LoadErrors /> <EntitySynchronizationReports /> <ExceptionThatLeadToAbortion>System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetVersions&gt;d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Implementation.CalDavRepository.&lt;GetAllVersions&gt;d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`7.&lt;SynchronizeNoThrow&gt;d__17.MoveNext()</ExceptionThatLeadToAbortion> <Duration>00:01:36.3988443</Duration> </SynchronizationReport> ``` If there is more information required just let me know. Cheers,
kerem closed this issue 2026-02-25 20:30:57 +03:00
Author
Owner

@aluxnimm commented on GitHub (Apr 5, 2016):

Sounds like a timeout issue or network problem, since it is around 90secs. Any errors in the owncloud server log? You can try various network settings or use a tool like fiddler to debug the network traffic. Maybe also updating the latest Windows/Office and ,net patches helps, what versions are you using?

<!-- gh-comment-id:205743830 --> @aluxnimm commented on GitHub (Apr 5, 2016): Sounds like a timeout issue or network problem, since it is around 90secs. Any errors in the owncloud server log? You can try various network settings or use a tool like fiddler to debug the network traffic. Maybe also updating the latest Windows/Office and ,net patches helps, what versions are you using?
Author
Owner

@digitalkram commented on GitHub (Apr 5, 2016):

hi aluxnimm,

thanks for your fast response. Windows/Office are set by company policy. However based on your hint that TaskCanceledException might counterintuitively indicate a timeout issue I checked a bit. When I test my configured profile I can see the resulting request in the ownlcoud log and your plugin reports connection success.
When I start a sync I see the following in the OC logs:

my_ip - - [dat and time] "REPORT /remote.php/caldav/calendars/username/calname/ HTTP/1.1" 401 291

And that is it. Is it possible that the REPORT operation (whatever it is) is taking too long for the timeout setting of the plugin? The calendar is HUGE and the server system is not very performant...

<!-- gh-comment-id:205754783 --> @digitalkram commented on GitHub (Apr 5, 2016): hi aluxnimm, thanks for your fast response. Windows/Office are set by company policy. However based on your hint that TaskCanceledException might counterintuitively indicate a timeout issue I checked a bit. When I test my configured profile I can see the resulting request in the ownlcoud log and your plugin reports connection success. When I start a sync I see the following in the OC logs: ``` my_ip - - [dat and time] "REPORT /remote.php/caldav/calendars/username/calname/ HTTP/1.1" 401 291 ``` And that is it. Is it possible that the REPORT operation (whatever it is) is taking too long for the timeout setting of the plugin? The calendar is HUGE and the server system is not very performant...
Author
Owner

@aluxnimm commented on GitHub (Apr 5, 2016):

only the 401 log entry? means not authorized. what network settings are you using? expand tree view in sync profile and try preemptive or force basic auth and close connection after each request. furthermore you can increase calDavConnectTimeout in config file, see readme.

<!-- gh-comment-id:205764710 --> @aluxnimm commented on GitHub (Apr 5, 2016): only the 401 log entry? means not authorized. what network settings are you using? expand tree view in sync profile and try preemptive or force basic auth and close connection after each request. furthermore you can increase calDavConnectTimeout in config file, see readme.
Author
Owner

@digitalkram commented on GitHub (Jun 1, 2016):

sorry that this stalled. had a crazy time lately :)

well, when I limit the time range it is working so I think authorization is working in general. I have a time off for a month or two now - finally. I'll close this for now and might or might not get back to you.

anyways thanks for your replies and helpfulness so far 👍 :)

<!-- gh-comment-id:223117759 --> @digitalkram commented on GitHub (Jun 1, 2016): sorry that this stalled. had a crazy time lately :) well, when I limit the time range it is working so I think authorization is working in general. I have a time off for a month or two now - finally. I'll close this for now and might or might not get back to you. anyways thanks for your replies and helpfulness so far 👍 :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#123
No description provided.