aspire icon indicating copy to clipboard operation
aspire copied to clipboard

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.

Open varndellwagglebee opened this issue 1 year ago • 9 comments

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.

varndellwagglebee avatar Jun 25 '24 14:06 varndellwagglebee

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.

JordanZaerr avatar Jun 27 '24 21:06 JordanZaerr

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?

zbarrier avatar Jul 02 '24 14:07 zbarrier

Facing the same issue.

for-shariq avatar Jul 02 '24 17:07 for-shariq

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.

JordanZaerr avatar Jul 02 '24 17:07 JordanZaerr

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

VasilisPlavos avatar Jul 02 '24 17:07 VasilisPlavos

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!

zbarrier avatar Jul 02 '24 17:07 zbarrier

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

JordanZaerr avatar Jul 02 '24 17:07 JordanZaerr

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"))

NapalmCodes avatar Jul 24 '24 01:07 NapalmCodes

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

shivamverma-ms avatar Aug 12 '24 07:08 shivamverma-ms

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.

kwaazaar avatar Sep 23 '24 09:09 kwaazaar

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.

hansmbakker avatar Oct 16 '24 10:10 hansmbakker

Part of me thinks we should just pass skipVersiobcheck by default

davidfowl avatar Oct 16 '24 13:10 davidfowl

@sebastienros can you look at this?

davidfowl avatar Jan 10 '25 03:01 davidfowl

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");

kwaazaar avatar Jan 10 '25 08:01 kwaazaar

I have submitted a PR to add --skipApiVersionCheck by default. Thanks for testing it.

sebastienros avatar Jan 24 '25 18:01 sebastienros

This is fixed in 9.1, in ~an hour so you can try a build here and let us know if we missed anything https://github.com/dotnet/aspire/blob/main/docs/using-latest-daily.md 😄

davidfowl avatar Jan 24 '25 20:01 davidfowl