Network actions fail with "A task was canceled"

Hello Duplicati team,

I’ve been using Duplicate for backing up my Windows 10 PC to Onedrive for years now, and it was working great, thank you so much for this great software!

A few days ago, without any changes on the Duplicati side (and without any other changes I’m aware of), backups stopped working though. Basically any task that would require some network connectivity (backup, restore, verify) fails with “A task was canceled”.

Here is a log entry I got from a verify attempt (backup and restore fail with the same TaskCanceledException):

{“ClassName”:“System.Threading.Tasks.TaskCanceledException”,“Message”:“A task was canceled.”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Backend.MicrosoftGraphBackend.SendRequest[T](HttpRequestMessage request)\r\n at Duplicati.Library.Backend.MicrosoftGraphBackend.SendRequest[T](HttpMethod method, String url)\r\n at Duplicati.Library.Backend.MicrosoftGraphBackend.d__691.MoveNext()\r\n at Duplicati.Library.Backend.MicrosoftGraphBackend.<List>d__53.MoveNext()\r\n at System.Collections.Generic.List1…ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Duplicati.Library.Main.BackendManager.DoList(FileEntryItem item)\r\n at Duplicati.Library.Main.BackendManager.ThreadRun()",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nThrowForNonSuccess\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.CompilerServices.TaskAwaiter\nVoid ThrowForNonSuccess(System.Threading.Tasks.Task)”,“HResult”:-2146233029,“Source”:“mscorlib”,“WatsonBuckets”:null}

I tried updating 2.0.6.1, as well as re-installing Duplicati - both ran fine, but the problem remains. I’m not sure why, or how I could troubleshoot this further - can you give any hints?

I can provide further logs if needed (if you tell me where from).

Thank you very much in advance!

Well as I found one thing has changed on my system recently though - Onedrive got updated to a new version (21.062.0328.0001) just before the problem started. It seems my Onedrive does have some problems at the moment (e.g. signing in with the Win10 client fails with error 0x8004de40) so I suspect this might be where the problems are rooted. Resetting/reinstalling Onedrive (per the official guidance) did not help. I’ll keep troubleshooting. If you are in the same shoes, or have any hints - comments are most welcome.

Nailed it. I’m sharing the resolution here, for the unlikely case that someone else would encounter similar symptoms.

OneDrive was definitely relevant, but it was not the root cause. I noticed that both 21.062.0328.0001 and 21.073.0411.0001 versions of the OneDrive clients had intermittent problems (failure to log on with error 0x8004de40, as well as failure to unlock the personal vault), but only on the one computer, where Duplicati also failed to perform backups targeting OneDrive.

It turned out (don’t ask me how I found out - it was 99% luck and 1% educated guesswork) that the cause was an incorrect IPv6 DNS entry I made on the affected computer, just before the issue started. I incorrectly configured the network interface with the Cloudflare DNS entries for IPv6-only networks, while in fact I should have used the regular IPv6 DNS addresses. Oddly enough, pretty much everything still worked with this config, apart from the intermittent OneDrive failures and the constant Duplicati error, this is why it was hard to realize the actual cause. As soon as the IPv6 DNS entries were corrected, Duplicati began to work as expected immediately.

1 Like

Glad you were able to solve your issue. Thanks for following up!

1 Like