Open PrasantJillella opened 1 year ago
@PrasantJillella
We recent has a fix released for a similar issue in 3.23.0. Would you please upgrade Azurite, and try again?
Hi
Sure, I can check and get back. Thank you.
Hi, The issue is still happening in my case.
I think the ErrorMessage in the other ticket mentioned by you is:
ErrorMessage=URI malformed ErrorStack="URIError: URI malformed\n at decodeURI (<anonymous>)\
The ErrorMessage that I see in my case is:
ErrorMessage=Couldn't extract path from sub-Request: Content-Type: application/http Content-Transfer-Encoding: binary
@edwin-huber
Do you have any idea why the error happen? It looks the error is reported here: https://github.com/Azure/Azurite/blob/704e39b568faf1a80751bbb32683d2abae8396e2/src/table/batch/TableBatchSerialization.ts#L94
It looks like it might be failing due to the empty JSON in the sub request.
I would need to debug it to be 100% sure.
Hi
Checking to see if there was any update. Thank you.
We have the same issue in Version 3.23.0
.
The following error happened:
2023-04-21T13:33:12.144Z 0039946d-f463-463c-879f-cf108d743a61 error: ErrorMiddleware: ErrorName=Error ErrorMessage=Couldn't extract path from sub-Request:
Content-Type: application/http
Content-Transfer-Encoding: binary
MERGE http://127.0.0.1:10002/devstoreaccount1/Perm(PartitionKey='2',RowKey='View') HTTP/1.1
Accept: application/json;odata=minimalmetadata
Content-Type: application/json
DataServiceVersion: 3.0;
{}
We also only have a partiotion and row key in the entity, nothing else. So maybe the empty json is the problem here. @edwin-huber.
How is the progress at the moment for this issue?
oh ok, I am waiting for a fix as well.
Hi @edwin-huber
Checking to see if verifying and fixing the issue would take longer, Just want to review options with my team for unblocking our azurite migration task.
Thank you.
I have a fix for this... will be done in the next PR from me
@edwin-huber any news on this? It continues to fail with "Couldn't extract path from sub-Request" for btch requests for us. We are using product-style URLs (we do not have the account name in the path) and it seems that it fails because BatchSerialization.extractPath
expects that the account name is in the path, whereas for us it is not.
PS: I would be happy to help on this myself, but IDK how to get the information of whether a product-syle url or not in that function.
This appears to be occurring because the JSON body is left empty in some SDKs.
I am currently unable to reproduce with the instructions above.
I was unable to find an SDK and code to replicate the issue to confirm that the fix works as intended.
Can someone share the code and framework / module / Package SDK version you are using to get this error? The following is not causing the issue: Windows.Azure.Storage 9.3.3
var batch = new TableBatchOperation();
batch.Insert(new TableEntity(pk,"rk1"));
batch.Insert(new TableEntity(pk, "rk2"));
batch.Insert(new TableEntity(pk, "rk3"));
I am using Orleans, but by looking at the code it does not at all seem that it is because of an/the empty JSON body. It is failing at this line: https://github.com/Azure/Azurite/blob/62ea623a79ba6860f49a30f66971b67edd5991c6/src/table/batch/TableBatchSerialization.ts#L80, my URL does not contain the account name in the path (am using production-style URLs) and that is why the implementation of extractPath
https://github.com/Azure/Azurite/blob/62ea623a79ba6860f49a30f66971b67edd5991c6/src/table/batch/TableBatchSerialization.ts#L78C27-L78C38 is failing because of its incorrect implementation here: https://github.com/Azure/Azurite/blob/62ea623a79ba6860f49a30f66971b67edd5991c6/src/table/batch/BatchSerialization.ts#L76. You can see how the implementation assumes that for sub-requests in a batch, the path in the URL ALWAYS contains the account name. Am I missing something?
This issue was opened for the error: Couldn't extract path from sub-Request
.
Which is caused as described above.
It appears that the error you are referencing is different: Couldn't extract path from URL in sub-Request
.
Could you open a separate issue for that (if there is not one already)?
Ahh, indeed. You are right, thank you! I will open a new issue.
PS: Created here https://github.com/Azure/Azurite/issues/2322, cc @edwin-huber 🙏
Which service(blob, file, queue, table) does this issue concern?
Table
Which version of the Azurite was used?
3.22.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
v18.14.2
What problem was encountered?
Batch Update operation (tried with batch size of 3 and 60) to table storage fails with 500 "Internal Server Error" Class used for building tableClient = CloudTable, its name space: Microsoft.WindowsAzure.Storage.Table
Function invoked to perform the operation: this.table.ExecuteBatchAsync(batch,GetRequestOptions(operationType),operationContext,cancellationToken);
parameters values:
Is there something to do with Batch Size and timeout at azurite? Checking since this does not fail in AzureTableStorage and Azure Storage Emulator.
Steps to reproduce the issue?
If possible, please provide the debug log using the -d parameter, replacing \<pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:
Have you found a mitigation/solution?
No