Skip to content

[BUG] ArgumentNullException while getting the App Container's secrets #53670

@RichardChen820

Description

@RichardChen820

Library name and version

Azure.ResourceManager.AppContainers 1.3.0;
Azure.Core 1.44.1

Describe the bug

While using the AppContainer Control Plane SDK to get the secrets of app container:

_client.GetContainerAppResource(new Azure.Core.ResourceIdentifier(_resourceId)).GetSecretsAsync().ToListAsync()

In some case, this line throws ArgumentNullException

Exception: System.ArgumentNullException: Value cannot be null. (Parameter 'bytes') at System.ArgumentNullException.Throw(String paramName) at Azure.RequestFailedException.AppendContentAndHeaders(Response response, StringBuilder messageBuilder) at Azure.RequestFailedException.CreateExceptionDetails(Response response, RequestFailedDetailsParser parser) at Azure.RequestFailedException..ctor(Response response, Exception innerException, RequestFailedDetailsParser detailsParser) at Azure.Core.PageableHelpers.PageableImplementation1.GetResponse(HttpMessage message) at Azure.Core.PageableHelpers.PageableImplementation1.GetNextResponseAsync(Nullable1 pageSizeHint, String nextLink, CancellationToken cancellationToken) at Azure.Core.PageableHelpers.PageableImplementation1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext() at Azure.Core.PageableHelpers.PageableImplementation1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable1 source, CancellationToken cancellationToken) in //Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at System.Linq.AsyncEnumerable.g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in //Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at Cupertino.Providers.SourceProvider.ContainerAppConfigureProvider.ListSecrets() in /__w/1/s/src/Cupertino.Providers/SourceProvider/ContainerAppConfigureProvider.cs:line 467 at

Expected behavior

It should work

Actual behavior

NullReferenceException thrown.

Reproduction Steps

In some case, this line throws ArgumentNullException

_client.GetContainerAppResource(new Azure.Core.ResourceIdentifier(_resourceId)).GetSecretsAsync().ToListAsync()

Environment

No response

Metadata

Metadata

Assignees

Labels

Container ServiceMgmtThis issue is related to a management package.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions