Skip to content
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] BlobContainerClient.ExistsAsync throws exception after upgrading 12.20.0 => 12.21.0 #45113

Closed
invertedtomato opened this issue Jul 21, 2024 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. duplicate This issue is the duplicate of another issue needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@invertedtomato
Copy link

Library name and version

Azure.Storage.Blobs

Describe the bug

After upgrading from 12.20.0 => 12.21.0 BlobContainerClient.ExistsAsync(...) fails with the following exception:

Unhandled exception. System.AggregateException: One or more errors occurred. (Failed to compare two elements in the array.)
 ---> System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.TypeInitializationException: The type initializer for 'Azure.Storage.StorageSharedKeyPipelinePolicy' threw an exception.
 ---> System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-US is an invalid culture identifier.
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
   at Azure.Storage.StorageSharedKeyPipelinePolicy..cctor()
   --- End of inner exception stack trace ---
   at Azure.Storage.StorageSharedKeyPipelinePolicy.<>c.<BuildCanonicalizedHeaders>b__6_0(HttpHeader x, HttpHeader y)
   at System.Collections.Generic.ArraySortHelper`1.InsertionSort(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   --- End of inner exception stack trace ---
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.List`1.Sort(Comparison`1 comparison)
   at Azure.Storage.StorageSharedKeyPipelinePolicy.BuildCanonicalizedHeaders(StringBuilder stringBuilder, HttpMessage message)
   at Azure.Storage.StorageSharedKeyPipelinePolicy.BuildStringToSign(HttpMessage message)
   at Azure.Storage.StorageSharedKeyPipelinePolicy.OnSendingRequest(HttpMessage message)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.InnerProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.InnerProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Storage.Blobs.ContainerRestClient.GetPropertiesAsync(Nullable`1 timeout, String leaseId, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.GetPropertiesInternal(BlobRequestConditions conditions, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.ExistsInternal(Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.ExistsAsync(CancellationToken cancellationToken)
   at <my code>

I'm running my production environment using an invariant culture.

Expected behavior

BlobContainerClient.ExistsAsync(...) to return if the container exists

Actual behavior

An exception is thrown.

Reproduction Steps

Call BlobContainerClient.ExistsAsync(...) after building code using:

dotnet publish vehicle-listing/vehicle-listing.application/vehicle-listing.application.csproj \
        --configuration Release \
        --output /app \
        --self-contained false \
        /p:UseAppHost=false \
        --nologo

And running in a mcr.microsoft.com/dotnet/aspnet:8.0-alpine Docker container

Environment

mcr.microsoft.com/dotnet/aspnet:8.0-alpine Docker container running on x64.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Jul 21, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@amnguye
Copy link
Member

amnguye commented Jul 25, 2024

Duplicate of #45052

@amnguye amnguye marked this as a duplicate of #45052 Jul 25, 2024
@amnguye amnguye closed this as completed Jul 25, 2024
@amnguye amnguye added the duplicate This issue is the duplicate of another issue label Jul 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. duplicate This issue is the duplicate of another issue needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants