Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Stage 11th block in blockBlobClient.stageBlock return 400 One of the request inputs is not valid. #584

Open
alicenicieja opened this issue Jul 17, 2023 · 0 comments

Comments

@alicenicieja
Copy link

alicenicieja commented Jul 17, 2023

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

v12.19.1

What problem was encountered?

When I am trying to stageBlock 11th block I am receiving 400 One of the request inputs is not valid.

I observed that this is related to the block id. This is the id I am creating:

String base64BlockId = Base64.getEncoder().encodeToString(String.valueOf(counter).getBytes());

and counter is starting from 0. On 11th I had an error (with number of 10 counting from 0). Based on the documentation I see that all ids should have the same length and each base64BlockId for 0 and 10 has exactly the same length, but before encoding of course the length is bigger for 10 than for 0. And as a result I can commit only less than 11 stages. Can you please point out a problem ?

This is my code snippet:

    String base64BlockId = Base64.getEncoder().encodeToString(String.valueOf(counter).getBytes());
    blockBlobClient.stageBlock(base64BlockId, new ByteArrayInputStream(bytes), bytes.length);

I tried with id pattern like 001 but then I received this error on a first stageBlock call.

@alicenicieja alicenicieja changed the title Stage 10h block in blockBlobClient.stageBlock return 400 One of the request inputs is not valid. Stage 11th block in blockBlobClient.stageBlock return 400 One of the request inputs is not valid. Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant