Hi,
I have been trying to use azure for file storage for my app.
For a starting few weeks, it worked perfectly fine but soon I am facing this authorization header error problem which I am unable to diagnose and solve.
I have cross-checked multiple times and am using the correct connection string as AZURE_STORAGE_CONNECTION_STRING environment variable.
This is my error:
StorageError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:4b2a3ee6-501e-0013-1ecc-443ffb000000
Time:2021-05-09T12:09:01.4678233Z
at Function.StorageServiceClient._normalizeError (/home/krush/github/defianz_site/node_modules/azure-storage/lib/common/services/storageserviceclient.js:1205:23)
at BlobService.StorageServiceClient._processResponse (/home/krush/github/defianz_site/node_modules/azure-storage/lib/common/services/storageserviceclient.js:751:50)
at Request.processResponseCallback [as _callback] (/home/krush/github/defianz_site/node_modules/azure-storage/lib/common/services/storageserviceclient.js:319:37)
at Request.self.callback (/home/krush/github/defianz_site/node_modules/request/request.js:185:22)
at Request.emit (node:events:369:20)
at Request.<anonymous> (/home/krush/github/defianz_site/node_modules/request/request.js:1154:10)
at Request.emit (node:events:369:20)
at IncomingMessage.<anonymous> (/home/krush/github/defianz_site/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:475:28)
at IncomingMessage.emit (node:events:381:22)
at endReadableNT (node:internal/streams/readable:1307:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 'AuthenticationFailed',
authenticationerrordetail: "The MAC signature found in the HTTP request 'upQE51qiAOp0ZtDPhtO/xWAYG6TkdRPzrjyPWMbXPdk=' is not the same as any computed signature. Server used following string to sign: 'PUT\n" +
'\n' +
'\n' +
'258000\n' +
'\n' +
'application/octet-stream\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'x-ms-blob-content-md5:nfJKGlmSd1e5y1OpoUp1iQ==\n' +
'x-ms-blob-content-type:image/jpeg\n' +
'x-ms-blob-type:BlockBlob\n' +
'x-ms-client-request-id:56d19530-b0bf-11eb-9778-b7f42a1d2cca\n' +
'x-ms-date:Sun, 09 May 2021 12:09:00 GMT\n' +
'x-ms-version:2018-03-28\n' +
"/defianzdtusdc/team-members/test-432582.jpg'.",
statusCode: 403,
requestId: '4b2a3ee6-501e-0013-1ecc-443ffb000000'
}