I'm getting an UnobservedTaskException "Unable to synchronize replica" when synchronizing a replica (upload edits).
I don't always get the error - only occasionally. I'm using ArcGIS Runtime 100.3 and AGOL hosted feature layers.
at Esri.ArcGISRuntime.Http.ArcGISHttpClientHandler.ArcGISClientHandlerInternal.<SendAsync>d__13.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.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.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 Esri.ArcGISRuntime.Internal.RequestRequiredHandler.<IssueRequestAndRespond>d__14.MoveNext()
I'm watching for unobserved task exceptions this way:
TaskScheduler.UnobservedTaskException += (sender, args) =>
{
Logger.Warn($"TaskScheduler.UnobservedTaskException:\n{args.Exception.Message}\n{args.Exception.InnerException?.Message}");
#if DEBUG
DisplayError($"Unobserved task exception: {args.Exception.Message}\n{args.Exception.InnerException?.Message}");
#endif
};