-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] BinaryData.ToString() throws nullreference exception after upgrading Microsoft.Extensions.Azure/Azure.Core #46444
Comments
Change: #46134 (this mentioned the bug) |
@m-redding: Would you please coordinate with the Storage team to make sure a release is going out this week with your fixes? |
Hello @mlankamp the best way to fix this is to add a direct reference in your application on System.Memory.Data 8.0.0 or protect against the bug in the 6.0.0 package with a try/catch. Unfortunately, this is a bug in the System.Memory.Data package so it's not something that can be fixed in the Azure.Storage.Blobs package. |
After internal discussion, it's clear there was an error in my initial analysis. My understanding that the exception was internal to the Storage libraries was incorrect and, as Maddy noted, a new release won't resolve the issue. Apologies for the confusion. To add some additional context, there's a number of our dependencies that are in the process of being upgraded in order to ensure that we remain on supported versions and avoid vulnerabilities. Unfortunately, we also have to ensure compatibility with existing platforms such as Azure Functions and Azure PowerShell which add constraints to the versions that we're able to adopt. In this case, our version of Unfortunately, we cannot do the same for application calls to |
Hi @mlankamp. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
@jsquire Thank you for the update. Maybe the release notes for https://github.com/Azure/azure-sdk-for-net/releases/tag/Microsoft.Extensions.Azure_1.7.6 should be updated, so that people know that, |
@jsquire Side effect with this (minor) upgrade Microsoft.Extensions.Azure from 1.7.5 --> 1.7.6 is/was that our azure functions running .net 8 inprocess won't handle servicebus triggers any longer. We didn't see any "toString()" but just the system.memory.data binary could not be found. The error which shows up: Exception while executing function: ServicebusHandlerName Could not load file or assembly 'System.Memory.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Note. HTTP trigger within the same azure function project just works with no errors. |
Also @bvmeer would you be mind copying & pasting what you wrote into a separate issue? Just in case anyone else running into this then it'll be easier to have it in one spot |
It looks like on top of what @bvmeer mentioned this upgrade seems to completely break .NET 6 in-process model to the point where host refuses to start. From what Ive seen this issue seems to occur not only on local machine but also in Azure Function Apps. Copy-pasted ver
In my case upgrading any of the following packages seems to break. The worst part is that this is considered a patch upgrade, so it was auto-merged by Renovate app to master.
Here's an example repository I used for testing: https://github.com/Kiruyuto/.net6-inprocess-break. |
Hi @mlankamp, since you haven’t asked that we |
/unresolve |
Hi @mlankamp. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Library name and version
Azure.Core 1.44.0
Describe the bug
The dependency System.Memory.Data is upgraded in version 1.44.0 to 6.0.0, this version has very annoying bug. When BinaryData is empty, the .ToString() method throws. This is fixed in a later version of the System.Memory.Data library.
The previous version (1.42.0) used System.Memory.Data version 1.0.2, this version doesn't have the problem.
Expected behavior
BinaryData.ToString() should not throw
Actual behavior
It does :-(
Reproduction Steps
Add manual package dependency to Microsoft.Extensions.Azure 1.7.6
public async Task UpdateBuildingFileStatusActivity(
[BlobInput("path/to/emptyfile.txt", Connection = "MadasterStorage")] BlobClient blob)
{
var content = await blob.DownloadContentAsync();
var text = content.Value.Content.ToString();
}
Environment
No response
The text was updated successfully, but these errors were encountered: