Azure / Azure/Azure-Functions

Microsoft.Azure.WebJobs.Extensions.Storage version 5.1.2 and Azure Functions v. 4.2.0, error: "The specified container already exists", status 409

Open
#2,370 8 comments 0 reactions 1 assignee Claimed by @vijaykumar911 View on GitHub
Needs: Triage (functions)
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

I'm using **.net 6** and **Azure Function v. 4**, and I get the error: "The specified container already exists", status 409.

Those are the **dependencies** in my project:

```





```

The **exception** seems to be called by:
```
BlobContainerClient.CreateIfNotExists ---> BlobContainerClient.Create
```

**it seems to happen in my implementation when I use**:
```
await blobContainerClient.CreateIfNotExistsAsync(PublicAccessType.BlobContainer);
```

I see this **error in Azure Application Insights**:

```
Azure.RequestFailedException: The specified container already exists.
RequestId:7aadc04c-601e-0051-2726-7fab43000000
Time:2023-05-05T07:54:33.5483399Z
Status: 409 (The specified container already exists.)
ErrorCode: ContainerAlreadyExists

Content:
ContainerAlreadyExistsThe specified container already exists.
RequestId:7aadc04c-601e-0051-2726-7fab43000000
Time:2023-05-05T07:54:33.5483399Z

Headers:
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 7aadc04c-601e-0051-2726-7fab43000000
x-ms-client-request-id: 45bb8263-7256-4297-9f81-12c74c6ecb1d
x-ms-version: 2022-11-02
x-ms-error-code: ContainerAlreadyExists
Date: Fri, 05 May 2023 07:54:32 GMT
Content-Length: 230
Content-Type: application/xml

at Azure.Storage.Blobs.ContainerRestClient.Create(Nullable`1 timeout, IDictionary`2 metadata, Nullable`1 access, String defaultEncryptionScope, Nullable`1 preventEncryptionScopeOverride, CancellationToken cancellationToken)
at Azure.Storage.Blobs.BlobContainerClient.CreateInternal(PublicAccessType publicAccessType, IDictionary`2 metadata, BlobContainerEncryptionScopeOptions encryptionScopeOptions, Boolean async, CancellationToken cancellationToken, String operationName)
```

Do you know if it is available a fix?

Thank you

_Originally posted by @MarGraz in https://github.com/Azure/Azure-Functions/issues/2166#issuecomment-1536138042_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.