You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to implement the new ListObjectsEnumAsync function. But when I execute it, the code crashed and gives the following error:
An unhandled exception has occurred while executing the request.
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Minio.MinioClient.ListObjectsEnumAsync(ListObjectsArgs args, CancellationToken cancellationToken)+MoveNext()
at Minio.MinioClient.ListObjectsEnumAsync(ListObjectsArgs args, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
when I have logging enabled, I get I think a getting a valid xml from the minio server
Hello,
I had the same exact issue, but i have fixed it when I removed the SetTraceOn. So I suppose there is a bug here, when the travec is enabled, somewhere the stream seems to be consume and so the ListObjectsEnumAsync is not working anymore.
Basically, the first code has the error, but not the second.
varminio=newMinioClient().WithEndpoint("127.0.0.1:9000").WithCredentials("JZRk76FAXRZOab8yoVl0","dgApzvqZYRbxcnZ59RLYEwNvnBvb0HmgfI5nVK9G").WithSSL(false).Build();minio.SetTraceOn(newDefaultRequestLogger(_logger));varlistArgs=newListObjectsArgs().WithBucket("bucket1").WithRecursive(true);awaitforeach(variteminminio.ListObjectsEnumAsync(listArgs).ConfigureAwait(false))// Root xml exception here{_logger.LogInformation("Item: {Item}",item.Key);}
I tried to implement the new ListObjectsEnumAsync function. But when I execute it, the code crashed and gives the following error:
when I have logging enabled, I get I think a getting a valid xml from the minio server
this is the code is used to get the objects:
I hope someone can figure out what's wrong here
The text was updated successfully, but these errors were encountered: