question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] System.ObjectDisposedException with message "Cannot access a closed Stream." - when calling QueueClient#UpdateMessageAsync

See original GitHub issue
 System.ObjectDisposedException : Cannot access a closed Stream.
     at System.IO.MemoryStream.Write(ReadOnlySpan`1 buffer)
     at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
     at System.IO.StreamWriter.Dispose(Boolean disposing)
     at System.IO.TextWriter.Dispose()
     at System.Xml.XmlTextWriter.Close()
     at System.Xml.XmlWriter.Dispose(Boolean disposing)
     at System.Xml.XmlWriter.Dispose()
     at Azure.Core.XmlWriterContent.Dispose()
     at Azure.Core.Pipeline.HttpClientTransport.PipelineRequest.Dispose()
     at Azure.Core.HttpMessage.Dispose()
     at Azure.Storage.Queues.MessageIdRestClient.UpdateAsync(String messageid, String popReceipt, Int32 visibilitytimeout, Nullable`1 timeout, QueueMessage queueMessage, CancellationToken cancellationToken)
     at Azure.Storage.Queues.QueueClient.UpdateMessageInternal(BinaryData message, String messageId, String popReceipt, TimeSpan visibilityTimeout, Boolean async, CancellationToken cancellationToken, String operationName)
     at Azure.Storage.Queues.QueueClient.UpdateMessageAsync(String messageId, String popReceipt, String messageText, TimeSpan visibilityTimeout, CancellationToken cancellationToken)

See https://github.com/Azure/autorest.csharp/issues/1402 for details

May I know when would the new version of the queue sdk get released with the above fix?

Environment:

  • Name and version of the Library package used: Azure.Storage.Queues 12.7.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dxynnezcommented, Sep 10, 2021

The Azure.Storage.Queues 12.8.0 shipped this week. Please give it a try and let us know if the issue is resolved.

wow that was quick! My tests are now passing. Thanks so much @kasobol-msft !

0reactions
kasobol-msftcommented, Sep 10, 2021

Great to hear that. I’m closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MemoryStream - Cannot access a closed Stream
When the StreamReader is closed (after leaving the using), it closes it's underlying stream as well, so now the MemoryStream is closed.
Read more >
[BUG] **System.ObjectDisposedException:** 'Can not ...
I get the following exception on Android in a Xamarin.Android native app: System.ObjectDisposedException: 'Can not access a closed Stream.' The ...
Read more >
Cannot access a closed Stream when running this ...
System.ObjectDisposedException: Cannot access a closed Stream when running this statement MemoryStream stream = (MemoryStream)data.
Read more >
System.ObjectDisposedException: Cannot access a closed ...
Following our migration to cosmos SDK v3 and usage of feed range API, we started to see this exception occasionally in our traces:...
Read more >
Can not access a closed Stream? - Uncategorised
Hi. I need some help with a problem I run into randomly. I will get the following error sometimes… , 30>MSBUILD : OctoPack...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found