Duplicati 2 crashes after a short time on Windows

I’ve been using the Beta release of Duplicati for a while now on Windows 10 and without any changes to the settings for several months. Today I noticed that the tray icon wasn’t there and so I tried to start it up again. Everything looked normal for about 30 seconds and then it crashed.

When I ran it from the command line here’s the error I received:

C:\Program Files\Duplicati 2>Duplicati.GUI.TrayIcon.exe

C:\Program Files\Duplicati 2>Server has started and is listening on 127.0.0.1, port 8200

Unhandled Exception: System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
   at System.Threading.Tasks.TaskCompletionSource`1.SetResult(TResult result)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

After disabling Automatic Usage Reporting as suggested in other threads it seems to work properly again.

Are there log files stored locally so I can provide more information?

I’m glad to hear it’s working for your, but what gave you the idea to try disabling usage reporting? The only ticket I’m finding with the “An attempt was made to transition a task…” error resolved it by re-installing Duplicati.

As for logs, by default they’re stored in tables in the database files (Duplicati.sqlite / Duplicati-server.sqlitefor tray-icon / service logs and files likeBBHNANLUHM.sqlite` for individual job databases).

You can use the --log-level=profiling and --log-file=<path> parameters to indicate detailed logs should also be written to a plain text file at <path>.

I found the workaround while reading this post. He references another post where disabling the reporting worked as well.

After doing so I haven’t run into any other issues.

Though I’ll be more than happy to run the commands suggested to get a log file we can examine. I’ll reply again with that shortly.

Looking forward to it, thanks!

Here’s the log filedup_log.zip (666 Bytes)

I just started getting the same error today on my Win7 64-bit system.
Logs don’t show anything odd that I can see, but I’m happy to send them along if they’d be useful.

And turning off usage statistics seems to have fixed it for me, too. Very weird, but at least consistent.
As an additional datapoint, I have no proxy or blacklisting.

If you still have them, can you check your logs and see if you have any Error: UsageReporter failed failed messages and how many you see with a particular run?

I’m trying to disprove my own theory that Duplicati crashes (for some reason) after a certain number of these errors have been logged.

So, just for fun I upgraded to the latest Canary and I still have the same problem. Disabling Automatic Usage Reporting is still a workaround. Good news is that my backup times are significantly faster.

Anyway, I’m running a log file with the Automatic Usage Reporting turned off and will send that later. Once it started there are a lot of 500 errors.

Even with reporting turned off?

Yes, this was with Automatic Usage Reporting turned off and the beginning of the log file looks like this for about 600 or so lines:

2018-02-10 02:57:24Z - Information: Server has started and is listening on 127.0.0.1, port 8200
2018-02-10 02:57:24Z - Information: Server has started and is listening on 127.0.0.1, port 8200
2018-02-10 02:57:47Z - Error: UsageReporter failed
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at Duplicati.Library.Utility.AsyncHttpRequest.AsyncWrapper.GetResponseOrStream()
   at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse()
   at Duplicati.Library.UsageReporter.ReportSetUploader.<>c.<<Run>b__2_0>d.MoveNext()

2018-02-10 02:57:47Z - Error: UsageReporter failed
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at Duplicati.Library.Utility.AsyncHttpRequest.AsyncWrapper.GetResponseOrStream()
   at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse()
   at Duplicati.Library.UsageReporter.ReportSetUploader.<>c.<<Run>b__2_0>d.MoveNext()

2018-02-10 02:57:48Z - Error: UsageReporter failed
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at Duplicati.Library.Utility.AsyncHttpRequest.AsyncWrapper.GetResponseOrStream()
   at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse()
   at Duplicati.Library.UsageReporter.ReportSetUploader.<>c.<<Run>b__2_0>d.MoveNext()

Also just in case this stuff starts getting relevant, I’m using this on Windows 10 Pro, v.1709, build 16299.192.

I did not see any Error: UsageReporter messages in the log, but I may not have been capturing the log when they happened. When I have time I will try turning reporting back on and see if any show up.

Thanks to you both - it’s possible there are multiple sources of the crash so the extra info is appreciated.

A post was split to a new topic: Debian “Invalid certificate received from server” error