<?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: Code is stuck on await Methods in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Code-is-stuck-on-await-Methods/m-p/619445#M28524</link>
    <description>&lt;P&gt;I don't see anything wrong in this snippet of code, and it runs successfully for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you say "basic stuff like getting the email address of my account works well", it sounds like you're referring to the GetCurrentAccountAsync method. For comparison, that method calls api.dropboxapi.com, whereas methods that interact with file data, such as UploadAsync, call content.dropboxapi.com.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything on your network connection, such as a firewall, VPN, proxy, anti-virus, etc., that may be interfering with the connection to content.dropboxapi.com in particular?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, it may be due to how you're handling async operations in your app. That would be a more about programming in C#/.NET itself and outside the scope of Dropbox API support, but there are some similar questions here that may be helpful:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/34078296/httpclient-postasync-never-return-response" target="_blank"&gt;https://stackoverflow.com/questions/34078296/httpclient-postasync-never-return-response&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/68730173/why-does-the-dropbox-apis-downloadasync-method-freeze-when-run-in-an-async-ta" target="_blank"&gt;https://stackoverflow.com/questions/68730173/why-does-the-dropbox-apis-downloadasync-method-freeze-when-run-in-an-async-ta&lt;/A&gt; &lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 31 Aug 2022 14:09:28 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-08-31T14:09:28Z</dc:date>
    <item>
      <title>Code is stuck on await Methods</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Code-is-stuck-on-await-Methods/m-p/619308#M28520</link>
      <description>&lt;P&gt;I am trying to implement a Dropbox support in my Maui application on Windows and Android. I have set everything up according to the documentation and basic stuff like getting the email address of my account works well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sadly, anything related to the data on my drive doesn't work. For example, when I call this task from the documentation, the code is stuck on the await method and never responses. No exception is thrown. This happens with every async method regarding the data on my drive, like downloading a file or reading the files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What did I do wrong?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;async Task Upload(DropboxClient dbx, string folder, string file, string content)
{
    using (var mem = new MemoryStream(Encoding.UTF8.GetBytes(content)))
    {
         var updated = await dbx.Files.UploadAsync(                            &amp;lt;-- a breakpoint here is called
            folder + "/" + file,
            WriteMode.Overwrite.Instance,
            body: mem); //Code does never respond after this breakpoint
        Console.WriteLine("Saved {0}/{1} rev {2}", folder, file, updated.Rev); &amp;lt;-- but the breakpoint here never gets called
    }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:52:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Code-is-stuck-on-await-Methods/m-p/619308#M28520</guid>
      <dc:creator>Leopold_</dc:creator>
      <dc:date>2022-09-06T09:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Code is stuck on await Methods</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Code-is-stuck-on-await-Methods/m-p/619445#M28524</link>
      <description>&lt;P&gt;I don't see anything wrong in this snippet of code, and it runs successfully for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you say "basic stuff like getting the email address of my account works well", it sounds like you're referring to the GetCurrentAccountAsync method. For comparison, that method calls api.dropboxapi.com, whereas methods that interact with file data, such as UploadAsync, call content.dropboxapi.com.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything on your network connection, such as a firewall, VPN, proxy, anti-virus, etc., that may be interfering with the connection to content.dropboxapi.com in particular?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, it may be due to how you're handling async operations in your app. That would be a more about programming in C#/.NET itself and outside the scope of Dropbox API support, but there are some similar questions here that may be helpful:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/34078296/httpclient-postasync-never-return-response" target="_blank"&gt;https://stackoverflow.com/questions/34078296/httpclient-postasync-never-return-response&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/68730173/why-does-the-dropbox-apis-downloadasync-method-freeze-when-run-in-an-async-ta" target="_blank"&gt;https://stackoverflow.com/questions/68730173/why-does-the-dropbox-apis-downloadasync-method-freeze-when-run-in-an-async-ta&lt;/A&gt; &lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 31 Aug 2022 14:09:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Code-is-stuck-on-await-Methods/m-p/619445#M28524</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-08-31T14:09:28Z</dc:date>
    </item>
  </channel>
</rss>

