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

The API version 2024-05-04 is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter "--skipApiVersionCheck" or Visual Studio Code configuration "Skip Api Version Check" can skip this error. #4646

Open
varndellwagglebee opened this issue Jun 25, 2024 · 14 comments
Assignees
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-storage Issues related to azure storage integration
Milestone

Comments

@varndellwagglebee
Copy link

Getting the following azurite error. I upgrade Azurite and still the same message:
The API version 2024-05-04 is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter "--skipApiVersionCheck" or Visual Studio Code configuration "Skip Api Version Check" can skip this error.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jun 25, 2024
@davidfowl davidfowl added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication azure Issues associated specifically with scenarios tied to using Azure and removed area-integrations Issues pertaining to Aspire Integrations packages labels Jun 25, 2024
@JordanZaerr
Copy link

JordanZaerr commented Jun 27, 2024

Ran into this today and had to poke around in their sample app to figure out why it worked and my code didn't.

If you target Azure.Storage.Blobs version 12.19.1 instead of 12.20.0 then it avoids this error. That package is a dependency of Aspire.Azure.Storage.Blobs. That is my workaround for now at least.

@zbarrier
Copy link

zbarrier commented Jul 2, 2024

This work around only works for the previous version of Aspire. The latest (8.0.2) requires Azure.Storage.Blobs >= 12.20.0. Is there another work around for 8.0.2?

@for-shariq
Copy link

Facing the same issue.

@JordanZaerr
Copy link

JordanZaerr commented Jul 2, 2024

They released 8.0.2 after my previous comment. I'm sure this will be updated eventually as well but they released a new version of Azurite that supports this API version(3.30.0).

The RunAsEmulator call hardcodes version 3.29.0 inside that extension method. That is suppose to be fixed though.

    storage.RunAsEmulator(c => c.WithImageTag("3.30.0"));

That should download the new azurite container and start it up as usual.

@VasilisPlavos
Copy link

VasilisPlavos commented Jul 2, 2024

As @JordanZaerr said, just use Azure.Storage.Blobs version 12.19.1 and it will work. 😊

@zbarrier
Copy link

zbarrier commented Jul 2, 2024

They released 8.0.2 after my previous comment. I'm sure this will be updated eventually as well but they released a new version of Azurite that supports this API version(3.3.0).

The RunAsEmulator call hardcodes version 3.29.0 inside that extension method. So I just call that function again with the new version...

storage.RunAsEmulator()
    .WithAnnotation(new ContainerImageAnnotation
    {
        Registry = "mcr.microsoft.com",
        Image = "azure-storage/azurite",
        Tag = "3.30.0"
    });

That should download the new azurite container and start it up as usual.

This worked with 8.0.2. Thank you!

@JordanZaerr
Copy link

@zbarrier I edited my comment because in the PR I linked I found a cleaner way to do the same thing.

@NapalmCodes
Copy link

NapalmCodes commented Jul 24, 2024

FYI with the release of 8.1.0 today you need to use an Azurite docker container with the 3.31.0 tag supporting "2024-08-04" api version.

var storage = builder.AddAzureStorage("storage").RunAsEmulator(c => c.WithImageTag("3.31.0"))

@shivamverma-ms
Copy link

Hi Folks, with the new GA version of Azure Storage 2.0.0, it is only compliant with 12.20.0 version of Azure.Storage.Blobs, in this version the mismatch issue is not getting resolved. What should we do here?

Added to this, we need to use blob uri of azurite instead of connection string, as part of the new methods introduced in azure storage 2.0.0

foxminchan added a commit to foxminchan/BookWorm that referenced this issue Sep 4, 2024
@davidfowl davidfowl added area-integrations Issues pertaining to Aspire Integrations packages and removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Sep 7, 2024
@davidfowl davidfowl added azure-storage Issues related to azure storage integration bug labels Sep 15, 2024
@kwaazaar
Copy link

Yep, issue is back. I "fixed" it by referencing (=not updating) the Aspire.Azure.Storage.Blobs package to 8.2.0. By keeping it at 8.0.2 you can also keep using Azure.Storage.Blobs 12.20.0.

@joperezr joperezr added the untriaged New issue has not been triaged label Oct 15, 2024
@davidfowl davidfowl removed the bug label Oct 16, 2024
@hansmbakker
Copy link
Contributor

hansmbakker commented Oct 16, 2024

When using these components:

  • Aspire.Azure.Storage.Blobs / Aspire.Hosting.Azure.Storage version 8.2.1
  • docker image azure-storage/azurite:3.31.0

The error is now

The API version 2024-11-04 is not supported by Azurite

In my opinion it is a new symptom of the issue reported above; if you feel it should be a new issue, please convert this comment into an issue.

@davidfowl
Copy link
Member

Part of me thinks we should just pass skipVersiobcheck by default

foxminchan added a commit to foxminchan/BookWorm that referenced this issue Dec 25, 2024
@davidfowl davidfowl added this to the 9.1 milestone Jan 10, 2025
@davidfowl davidfowl removed the untriaged New issue has not been triaged label Jan 10, 2025
@davidfowl
Copy link
Member

@sebastienros can you look at this?

@kwaazaar
Copy link

kwaazaar commented Jan 10, 2025

Why not use the 'latest' image tag? Solved the issues for me.

        var blobs = builder.AddAzureStorage("storage")
            .RunAsEmulator(c => c
                .WithDataVolume()
                .WithImageTag("latest")
             )
            .AddBlobs("blobs");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-storage Issues related to azure storage integration
Projects
None yet
Development

No branches or pull requests