azure-sdk-for-js: @azure/storage-blob@>12.2.0 throws `Bad Request - Invalid Verb` on upload
Similar to #11163.
I have script running every 5 minutes for all of eternity that uploads to blob storage, starting ~a day ago I started getting consistent Bad Request - Invalid Verb
errors from this code:
const blobServiceClient = BlobServiceClient.fromConnectionString(key)
const containerClient = blobServiceClient.getContainerClient(container)
const createContainerResponse = containerClient.getBlockBlobClient(name)
await createContainerResponse.uploadStream(Readable.from([text]))
This is consistent with the release of 12.2.0, which I see made some changes to the uploadStream
method.
The exact response is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Verb</h2>
<hr><p>HTTP Error 400. The request verb is invalid.</p>
</BODY></HTML>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 34 (23 by maintainers)
Commits related to this issue
- Pin blob storage dep see Azure/azure-sdk-for-js#11187 — committed to microsoft/vscode by deleted user 4 years ago
- Run all node 12 trying to reproduce #11187 — committed to jeremymeng/azure-sdk-for-js by jeremymeng 4 years ago
- updating fork (#1) * Add back hideHover and use on tree context menu show Fixes #106268 * Update distro * :lipstick: * explorer: Fix TrustedTypes violation #106285 * produce deb, rpm ... — committed to jpda/vscode by jpda 4 years ago
We belive this issue is addressed in the hotfix: @azure/storage-blob@12.2.1 and @azure/storage-file-datalake@12.1.1 Let me know if not.
A fix is coming soon. Before that, could you call
uploadFile
for file, orstageBlock
andcommitBlockList
individually.Also, disabling keep-alive will also work.
Good news. Successuflly recreated it locally. Will look into the Fiddler tracing.
https://httptoolkit.tech/javascript seems useful for intercepting HTTP(S) traffic. Never used it though.
@ljian3377 , Don’t know if it’s still relevant, but happens for me on Windows. Will attach my logs.
I also ran some other versions,
12.2.0-dev.20200901.1
and12.2.0-alpha.20200903.1
.12.2.0-dev.20200901.1
worked, but12.2.0-alpha.20200903.1
did not. I attached logs from12.2.0
and12.2.0-dev.20200901.1
.12.2.0
12.2.0-dev.20200901.1