question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] InvalidQueryParameterValue while trying to delete a blob by BlobBatchClient with Storage Emulator

See original GitHub issue

Library name and version

Azure.Storage.Blobs.Batch 12.10.0

Describe the bug

Unhandled exception. Azure.RequestFailedException: Value for one of the query parameters specified in the request URI is invalid. RequestId:fdaeeccc-bf65-426b-8aee-7d081347db56 Time:2022-09-13T04:15:57.8983848Z Status: 400 (Value for one of the query parameters specified in the request URI is invalid.) ErrorCode: InvalidQueryParameterValue

Additional Information: QueryParameterName: comp QueryParameterValue: batch

Expected behavior

No exception throwed

Actual behavior

Unhandled exception. Azure.RequestFailedException: Value for one of the query parameters specified in the request URI is invalid. RequestId:fdaeeccc-bf65-426b-8aee-7d081347db56 Time:2022-09-13T04:15:57.8983848Z Status: 400 (Value for one of the query parameters specified in the request URI is invalid.) ErrorCode: InvalidQueryParameterValue

Additional Information: QueryParameterName: comp QueryParameterValue: batch Reason:

Content:

<?xml version="1.0" encoding="utf-8"?><Error>InvalidQueryParameterValue<Message>Value for one of the query parameters specified in the request URI is invalid.

RequestId:fdaeeccc-bf65-426b-8aee-7d081347db56 Time:2022-09-13T04:15:57.8983848Z</Message><QueryParameterName>comp</QueryParameterName><QueryParameterValue>batch</QueryParameterValue><Reason /></Error>

Headers: Server: Microsoft-HTTPAPI/2.0 x-ms-request-id: fdaeeccc-bf65-426b-8aee-7d081347db56 x-ms-error-code: InvalidQueryParameterValue Date: Tue, 13 Sep 2022 04:15:57 GMT Content-Length: 376 Content-Type: application/xml

at Azure.Storage.Blobs.Batch.ServiceRestClient.SubmitBatch(Int64 contentLength, String multipartContentType, Stream body, Nullable1 timeout, CancellationToken cancellationToken) at Azure.Storage.Blobs.Specialized.BlobBatchClient.SubmitBatchInternal(BlobBatch batch, Boolean throwOnAnyFailure, Boolean async, CancellationToken cancellationToken) at Azure.Storage.Blobs.Specialized.BlobBatchClient.DeleteBlobsInteral(IEnumerable1 blobUris, DeleteSnapshotsOption snapshotsOption, Boolean async, CancellationToken cancellationToken) at Azure.Storage.Blobs.Specialized.BlobBatchClient.DeleteBlobs(IEnumerable`1 blobUris, DeleteSnapshotsOption snapshotsOption, CancellationToken cancellationToken) at Program.<Main>$(String[] args) in D:\Mine\Projects\MyAzureStorage\MyStupidBlobBatch\Program.cs:line 25

Reproduction Steps

Run this code with C# Console

`using Azure.Storage.Blobs; using Azure.Storage.Blobs.Specialized;

var connectionString = “DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;”; var containerName = Guid.NewGuid().ToString() + “-sample-container”;

BlobServiceClient service = new BlobServiceClient(connectionString); BlobContainerClient container = service.GetBlobContainerClient(containerName); container.Create();

BlobClient foo = container.GetBlobClient(“foo”); BlobClient bar = container.GetBlobClient(“bar”); BlobClient baz = container.GetBlobClient(“baz”); foo.Upload(BinaryData.FromString(“Foo!”)); bar.Upload(BinaryData.FromString(“Bar!”)); baz.Upload(BinaryData.FromString(“Baz!”));

// Delete all three blobs at once BlobBatchClient batch = service.GetBlobBatchClient();

try { batch.DeleteBlobs(new Uri[] { foo.Uri, bar.Uri, baz.Uri });

container.Delete();

} catch (AggregateException ex) { container.Delete();

throw ex;

}

Console.ReadLine();`

Environment

Local: Storage Emulator

It does working on my Azure Storage Account

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
navba-MSFTcommented, Sep 27, 2022

@MrFlyingBear We are aware of this issue and its a work in progress. I will be updating this thread once the fix is released soon. If you have any follow-up questions, you may reopen this thread. We would be happy to help. Thanks again for reaching out to us and reporting this issue.

1reaction
navba-MSFTcommented, Sep 27, 2022

@MrFlyingBear I was discussing this issue with the Azurite product owners and it seems like the latest published Azurite doesn’t support Blob Batch. Blob Batch feature is under development and will release soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

InvalidQueryParameterValue in Query Blob Contents using ...
I give it a try by using sas token for authentication(you can refer to this link for how to generate sas token via...
Read more >
Access Azure Storage Blobs via a browser
I am trying to give a Azure Storage Account Container SAS URL to Business Partner so they can upload files to it.
Read more >
Azure Storage Services REST API; Blob Batch; DELETE ...
I tried a lot with the REST Client for VS Code but can't get it to work. ... Delete all three blobs at...
Read more >
Zip Archives get corrupted when uploading to Azure Blob ...
Zip Archives get corrupted when uploading to Azure Blob Store using REST API ... If the content is in a ZIP format, it's...
Read more >
Microsoft Azure Blob Storage
Rclone docs for Microsoft Azure Blob Storage. ... /home/local/directory to the remote container, deleting any excess files in the container.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found