Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
This repository was 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

@alicenicieja

Description

@alicenicieja

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions