Azure-sdk-for-js: InvalidHeaderValue x-ms-version 2020-04-08

Created on 28 Jan 2021  路  11Comments  路  Source: Azure/azure-sdk-for-js

  • @azure/storage-file-datalake:
  • 12.3.0:

Describe the bug
When we try to interact with a Data Lake Gen2 Storage Account where HNS is enabled we receive the error.
The same function is working fine with a Storage account where HNS is disabled.
When we revert to version 12.0.0 the same function (e.g.: DataLakeFileSysteClient.exists()) is working.

To Reproduce
getClient() {
if (!this.client) {
this.client = new DataLakeServiceClient(
https://${this.accountName}.dfs.core.windows.net,
this.credentials
);
}
return this.client;
}

let fileSystem = this.getClient().getFileSystemClient(this.fileSystemName);
let exists = await fileSystem.exists();

Client Storage customer-reported needs-author-feedback question

All 11 comments

Could you share me the request id of the failing request?
This is bizarre because 2020-04-08 should have already been rolled out in the production environment.

@ljian3377 I'm encountering the same kind of InvalidHeaderValue issue (although with a slightly different use case).

The following code (leveraging @azure/storage-blob 12.4.0) works ok against a DEV storage account, but fails against a TEST storage account.

_Note:_ both DEV and TEST storage accounts are standard_LRS storage v2 and have been created using the exact same ARM template. However, they live under different subscriptions.

  try {
    const { BlobClient } = await import("@azure/storage-blob");

    const bc = new BlobClient(cn, "[REDACTED]", "[REDACTED]", undefined);
    const buf = await bc.downloadToBuffer();
    return buf.toString();
  } catch (e) {
    const content = JSON.stringify(e);
    console.log(content);
    await Fs.promises.writeFile("./err.json", content, 'utf8');
    throw e;
  }

The content below is the output of err.json when ran against our TEST environment

{
  "name": "RestError",
  "statusCode": 400,
  "request": {
    "streamResponseBody": false,
    "url": "https://zmovemoveppaew1sto01.blob.core.windows.net/[REDACTED]/[REDACTED]?se=[REDACTED]",
    "method": "HEAD",
    "headers": {
      "_headersMap": {
        "x-ms-version": {
          "name": "x-ms-version",
          "value": "2020-04-08"
        },
        "user-agent": {
          "name": "user-agent",
          "value": "azsdk-js-storageblob/12.4.0 (NODE-VERSION v14.15.0; Windows_NT 10.0.18363)"
        },
...
    "status": 400,
    "bodyAsText": "",
    "parsedHeaders": {
      "metadata": {},
      "objectReplicationRules": {},
      "requestId": "5cd7e97a-a01e-0020-1e1b-f6da0c000000",
      "date": "2021-01-29T08:51:26.000Z",
      "errorCode": "InvalidHeaderValue"
    }
  },
  "details": {
    "metadata": {},
    "objectReplicationRules": {},
    "requestId": "5cd7e97a-a01e-0020-1e1b-f6da0c000000",
    "date": "2021-01-29T08:51:26.000Z",
    "errorCode": "InvalidHeaderValue"
  }
}

@ljian3377 The same exact code works perfectly against both our DEV and TEST storage accounts when using @azure/storage-blob v12.3.0

@nulltoken The server hit is not rolled-out with the right configuration. Already notified the service team to fix it.

@jbreunung
Could you share us the failing request's requestId or your account name so that we can locate the server and fix it for you?

@ljian3377 Awesome feedback! Thanks a lot. How could I monitor on my side the rollout? Is there an API I could call to check for a version change or a specific blade in Azure Portal?

@ljian3377 Awesome feedback! Thanks a lot. How could I monitor on my side the rollout? Is there an API I could call to check for a version change or a specific blade in Azure Portal?

I am afraid not. I have asked the service team to notify you here when it's fixed.

@nulltoken
It should be working now. Could you retry?

It should be working now. Could you retry?

@ljian3377 Everything is 200 OK now on my side! Thanks you so much for your tremendous help and amazing support! <3

image

Hi together,
i am working with @jbreunung. It seems you fixed the problem. i can no longer reproduce the issue with version 12.3.0 to create a failing request id.
Thanks a lot for the very fast reply!

Hi together,
i am working with @jbreunung. It seems you fixed the problem. i can no longer reproduce the issue with version 12.3.0 to create a failing request id.
Thanks a lot for the very fast reply!

Yes. They fixed it for all.

Was this page helpful?
0 / 5 - 0 ratings