<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dropbox API V2 .NET SDK TaskCancelledException in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229718#M12482</link>
    <description>I believe this TaskCanceledException should indicate a timeout on the network connection for the API call. It sounds like that is what's happening, since you mentioned it takes around 90 seconds to fail. Is there anything on the network connection that might be interfering when this happens? (E.g., proxy, firewall, etc.)&lt;BR /&gt;&lt;BR /&gt;Anyway, that being the case, you may want to catch this and retry the call when it occurs.</description>
    <pubDate>Wed, 28 Jun 2017 16:25:48 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-06-28T16:25:48Z</dc:date>
    <item>
      <title>Dropbox API V2 .NET SDK TaskCancelledException</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229695#M12480</link>
      <description>&lt;P&gt;This is running the .NET SDK within a Xamarin wrapper, on Android Lollipop (the code should be identical to the standard .NET SDK).&amp;nbsp;I have only seen this error on one specific device and even then it is sporadic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that on occasion, some&amp;nbsp;API calls which access the server (e.g. GetCurrentAccountAsync) fail eventually (after 90 secs) with the exception:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00031] in &amp;lt;f03edc016c014bac8ee539e393953ea8&amp;gt;:0 
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in &amp;lt;f03edc016c014bac8ee539e393953ea8&amp;gt;:0 
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in &amp;lt;f03edc016c014bac8ee539e393953ea8&amp;gt;:0 
at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in &amp;lt;f03edc016c014bac8ee539e393953ea8&amp;gt;:0 
at Dropbox.Api.DropboxRequestHandler+SendRpcRequestAsync&amp;gt;d__4`3[TRequest,TResponse,TError].MoveNext () [0x000ba] in &amp;lt;a1bcd0b30e2f4dc8afce94d298e18a52&amp;gt;:0 
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in &amp;lt;72212be3f8434fcc8ed07369601537c5&amp;gt;:0 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in &amp;lt;72212be3f8434fcc8ed07369601537c5&amp;gt;:0 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in &amp;lt;72212be3f8434fcc8ed07369601537c5&amp;gt;:0 
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in &amp;lt;72212be3f8434fcc8ed07369601537c5&amp;gt;:0 
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in &amp;lt;72212be3f8434fcc8ed07369601537c5&amp;gt;:0 
at App.Managers.DropboxManager+&amp;lt;getChanges&amp;gt;d__110.MoveNext () [0x0015b] in &amp;lt;9a4ca823eb0f4b35be14b14b7ed01adb&amp;gt;:0 &lt;/PRE&gt;
&lt;P&gt;I am not sure what is triggering this cancellation, but it is not coming from my code. Any ideas or pointers?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:21:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229695#M12480</guid>
      <dc:creator>Mark R.5</dc:creator>
      <dc:date>2019-05-29T09:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API V2 .NET SDK TaskCancelledException</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229718#M12482</link>
      <description>I believe this TaskCanceledException should indicate a timeout on the network connection for the API call. It sounds like that is what's happening, since you mentioned it takes around 90 seconds to fail. Is there anything on the network connection that might be interfering when this happens? (E.g., proxy, firewall, etc.)&lt;BR /&gt;&lt;BR /&gt;Anyway, that being the case, you may want to catch this and retry the call when it occurs.</description>
      <pubDate>Wed, 28 Jun 2017 16:25:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229718#M12482</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-28T16:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API V2 .NET SDK TaskCancelledException</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229719#M12483</link>
      <description>&lt;P&gt;Hi. There was nothing interfering as far as I am aware.&amp;nbsp;Web browsing was working while the Dropbox timeout was occuring so there was a working internet connection at the time. It may not have been the strongest connection though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a related note, I was wanting to follow the code through to see what was going on:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet" target="_self"&gt;https://github.com/dropbox/dropbox-sdk-dotnet&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However I cannot find some of the source code in there. For example I can't see the code for any of the 'Files' methods such as DownloadAsync. Am I missing something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 16:38:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229719#M12483</guid>
      <dc:creator>Mark R.5</dc:creator>
      <dc:date>2017-06-28T16:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API V2 .NET SDK TaskCancelledException</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229723#M12484</link>
      <description>&lt;P&gt;The SDK is actually &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/tree/master/generator" target="_self"&gt;generated&lt;/A&gt;&amp;nbsp;based on &lt;A href="https://github.com/dropbox/dropbox-api-spec/tree/8c790b1169e813072f6e56a9c9f517a3dda3575d" target="_self"&gt;the API spec&lt;/A&gt;, so each method isn't implemented individually. For example, here's &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/9803a40b3169acf66a2d14e29af8750ebe6e3e17/dropbox-sdk-dotnet/Dropbox.Api/DropboxRequestHandler.cs#L213" target="_self"&gt;the implementation for any "download-style" request&lt;/A&gt;&amp;nbsp;(such as DownloadAsync, or GetThumbnailAsync).&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 17:13:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229723#M12484</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-28T17:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API V2 .NET SDK TaskCancelledException</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229726#M12486</link>
      <description>&lt;P&gt;Ok, maybe I should read up on that a bit more. The abstraction just makes it a little harder to work out what is going on. Maybe the generated code could be put into github as well.&lt;BR /&gt;&lt;BR /&gt;To get back to the original issue, one thing I observed is that some methods would work and others would not. For example, I have a ListFolderLongpollAsync method running in a loop to listen for changes. This method was working and returning when changes occurred. However as soon as it then went on to do a ListFolderContinueAsync to get the actual changes the timeout was occurring. This loop was then repeated consistently, with the ListFolderLongpollAsync working, but the ListFolderContinueAsync failing. &lt;BR /&gt;&lt;BR /&gt;I will try and investigate further to see if I can find a trigger.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 17:30:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-V2-NET-SDK-TaskCancelledException/m-p/229726#M12486</guid>
      <dc:creator>Mark R.5</dc:creator>
      <dc:date>2017-06-28T17:30:40Z</dc:date>
    </item>
  </channel>
</rss>

