This is running the .NET SDK within a Xamarin wrapper, on Android Lollipop (the code should be identical to the standard .NET SDK). I have only seen this error on one specific device and even then it is sporadic.
The problem is that on occasion, some API calls which access the server (e.g. GetCurrentAccountAsync) fail eventually (after 90 secs) with the exception:
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00031] in <f03edc016c014bac8ee539e393953ea8>:0
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in <f03edc016c014bac8ee539e393953ea8>:0
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in <f03edc016c014bac8ee539e393953ea8>:0
at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <f03edc016c014bac8ee539e393953ea8>:0
at Dropbox.Api.DropboxRequestHandler+SendRpcRequestAsync>d__4`3[TRequest,TResponse,TError].MoveNext () [0x000ba] in <a1bcd0b30e2f4dc8afce94d298e18a52>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <72212be3f8434fcc8ed07369601537c5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <72212be3f8434fcc8ed07369601537c5>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <72212be3f8434fcc8ed07369601537c5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <72212be3f8434fcc8ed07369601537c5>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <72212be3f8434fcc8ed07369601537c5>:0
at App.Managers.DropboxManager+<getChanges>d__110.MoveNext () [0x0015b] in <9a4ca823eb0f4b35be14b14b7ed01adb>:0
I am not sure what is triggering this cancellation, but it is not coming from my code. Any ideas or pointers?