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.CreateIfNotExistsAsync() returns null #17710

Closed
elraikhm opened this issue Dec 28, 2020 · 3 comments
Closed

[BUG] BlobContainerClient.CreateIfNotExistsAsync() returns null #17710

elraikhm opened this issue Dec 28, 2020 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@elraikhm
Copy link
Contributor

Describe the bug
Customer reported bug from HaTS survey
"Some very obvious issues that need to be fixed. For example, in the Blob Storage SDK, BlobContainerClient.CreateIfNotExistsAsync() returns null if the container already exists, causing a null reference exception if the result is assigned to a variable (Response is not null friendly). This somewhat defeats the purpose of the function."

Expected behavior
What is the expected behavior?

Actual behavior (include Exception or Stack Trace)
What is the actual behavior?

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

Environment:

  • Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.2.0]
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
  • IDE and version : [e.g. Visual Studio 16.3]
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 28, 2020
@AlexGhiondea AlexGhiondea added Client This issue points to a problem in the data-plane of the library. 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 Dec 28, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 28, 2020
@ghost
Copy link

ghost commented Dec 28, 2020

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

Issue Details

Describe the bug
Customer reported bug from HaTS survey
"Some very obvious issues that need to be fixed. For example, in the Blob Storage SDK, BlobContainerClient.CreateIfNotExistsAsync() returns null if the container already exists, causing a null reference exception if the result is assigned to a variable (Response is not null friendly). This somewhat defeats the purpose of the function."

Expected behavior
What is the expected behavior?

Actual behavior (include Exception or Stack Trace)
What is the actual behavior?

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

Environment:

  • Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.2.0]
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
  • IDE and version : [e.g. Visual Studio 16.3]
Author: elraikhm
Assignees: -
Labels:

Client, Service Attention, Storage, needs-triage, question

Milestone: -

@AlexGhiondea AlexGhiondea added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Dec 28, 2020
@AlexGhiondea
Copy link
Contributor

I am able to reproduce this. It looks like the CreateIfNotExistsInternal will return a null object from the catch clause when the container already exists. /cc @tg-msft

@jsquire jsquire removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Dec 29, 2020
@amnguye
Copy link
Member

amnguye commented Jan 6, 2021

This is a duplicate issue to this one. @tg-msft already discussed what it would take to resolve this issue which would contain a breaking change. We have some workaround for the customers that they can see in the issue I linked.

Closing this issue in preference to the already opened issue.

@amnguye amnguye closed this as completed Jan 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
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. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team 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

4 participants