<?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: ListFolderAsync() throws InvalidCastException when file or folder name is ISO-8601 date in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/386805#M21490</link>
    <description>&lt;P&gt;Thank you for the well written bug report! I can reproduce this issue here. We'll look into it and I'll follow up on this thread once I have an update on it from the team.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Dec 2019 16:45:29 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-12-31T16:45:29Z</dc:date>
    <item>
      <title>ListFolderAsync() throws InvalidCastException when file or folder name is ISO-8601 date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/386788#M21488</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When a file or a folder exists with a name that is an ISO-8601 date (such as "2019-12-25T23:58:05"), the ListFolderAsync() method fails by throwing a System.InvalidCastException.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Steps to reproduce&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a folder test in the root folder of your Dropbox.&lt;/LI&gt;
&lt;LI&gt;Upload a file with the name 2019-12-25T23:58:05 to the folder /test or create a new folder with that name as a subfolder of the folder /test. Make sure that there is no file extension.&lt;/LI&gt;
&lt;LI&gt;Run the following C# program, after providing a valid access token:&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;public class Program
{
    static void Main(string[] args)
    {
        using var dbx = new DropboxClient(oauth2AccessToken: "...");
        var result = dbx.Files.ListFolderAsync(
            path: "/test"
        ).GetAwaiter().GetResult();
    }
}&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Expected result&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The method should return a list of Dropbox.Api.Files.Metadata objects, including one object representing the file or folder created above.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Actual result&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The program crashes with the following exception:&lt;/P&gt;
&lt;PRE&gt;System.InvalidCastException
HResult=0x80004002
Message=Value '12/25/2019 23:58:05' is not valid System.String type
Source=Dropbox.Api
StackTrace:
at Dropbox.Api.Stone.JsonReader.ReadValue[T]()
at Dropbox.Api.Stone.JsonReader.Dropbox.Api.Stone.IJsonReader.ReadString()
at Dropbox.Api.Stone.StringDecoder.Decode(IJsonReader reader)
at Dropbox.Api.Files.FileMetadata.FileMetadataDecoder.SetField(FileMetadata value, String fieldName, IJsonReader reader)
at Dropbox.Api.Stone.StructDecoder`1.DecodeFields(IJsonReader reader)
at Dropbox.Api.Files.Metadata.MetadataDecoder.Decode(String tag, IJsonReader reader)
at Dropbox.Api.Stone.UnionDecoder`1.DecodeFields(IJsonReader reader)
at Dropbox.Api.Stone.StructDecoder`1.Decode(IJsonReader reader)
at Dropbox.Api.Stone.ListDecoder`1.TryReadArrayItem(IJsonReader reader, IDecoder`1 decoder, T&amp;amp; value)
at Dropbox.Api.Stone.ListDecoder`1.Decode(IJsonReader reader, IDecoder`1 itemDecoder)
at Dropbox.Api.Stone.StructDecoder`1.ReadList[TItem](IJsonReader reader, IDecoder`1 itemDecoder)
at Dropbox.Api.Files.ListFolderResult.ListFolderResultDecoder.SetField(ListFolderResult value, String fieldName, IJsonReader reader)
at Dropbox.Api.Stone.StructDecoder`1.DecodeFields(IJsonReader reader)
at Dropbox.Api.Stone.StructDecoder`1.Decode(IJsonReader reader)
at Dropbox.Api.Stone.JsonReader.Read[T](String json, IDecoder`1 decoder)
at Dropbox.Api.DropboxRequestHandler.&amp;lt;Dropbox-Api-Stone-ITransport-SendRpcRequestAsync&amp;gt;d__12`3.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in /_/src/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs:line 63
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in /_/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs:line 180
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in /_/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs:line 151
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() in /_/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs:line 369
at DropboxUpload.Program.Main(String[] args) in C:\my\vs\repos\DropboxUpload\Program.cs:line 681

This exception was originally thrown at this call stack:
Dropbox.Api.Stone.JsonReader.ReadValue&amp;lt;T&amp;gt;()
Dropbox.Api.Stone.JsonReader.Dropbox.Api.Stone.IJsonReader.ReadString()
Dropbox.Api.Stone.StringDecoder.Decode(Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Files.FileMetadata.FileMetadataDecoder.SetField(Dropbox.Api.Files.FileMetadata, string, Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Stone.StructDecoder&amp;lt;T&amp;gt;.DecodeFields(Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Files.Metadata.MetadataDecoder.Decode(string, Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Stone.UnionDecoder&amp;lt;T&amp;gt;.DecodeFields(Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Stone.StructDecoder&amp;lt;T&amp;gt;.Decode(Dropbox.Api.Stone.IJsonReader)
Dropbox.Api.Stone.ListDecoder&amp;lt;T&amp;gt;.TryReadArrayItem(Dropbox.Api.Stone.IJsonReader, Dropbox.Api.Stone.IDecoder&amp;lt;T&amp;gt;, out T)
Dropbox.Api.Stone.ListDecoder&amp;lt;T&amp;gt;.Decode(Dropbox.Api.Stone.IJsonReader, Dropbox.Api.Stone.IDecoder&amp;lt;T&amp;gt;)
...
[Call Stack Truncated]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2019 16:29:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/386788#M21488</guid>
      <dc:creator>6EHPS2</dc:creator>
      <dc:date>2019-12-31T16:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: ListFolderAsync() throws InvalidCastException when file or folder name is ISO-8601 date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/386805#M21490</link>
      <description>&lt;P&gt;Thank you for the well written bug report! I can reproduce this issue here. We'll look into it and I'll follow up on this thread once I have an update on it from the team.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2019 16:45:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/386805#M21490</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-12-31T16:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: ListFolderAsync() throws InvalidCastException when file or folder name is ISO-8601 date</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/484260#M24366</link>
      <description>&lt;P&gt;This should be fixed as of v6.0.1 of the SDK.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 19:40:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/ListFolderAsync-throws-InvalidCastException-when-file-or-folder/m-p/484260#M24366</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-01-04T19:40:27Z</dc:date>
    </item>
  </channel>
</rss>

