You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ECONNRESET at TLSWrap.onStreamRead issue impacting Azure extensions zip deploy (related to Node v16?) #146577
Does this issue occur when all extensions are disabled?: No
VS Code Version: VS Code 1.66.0
OS Version: macOS 12.3 Monterey
The zip deploy feature present in the Azure Functions and Azure App Service extension broke in production as a result of the 1.66.0 VS Code release. It does not reproduce on 1.65.2.
The zip deploy feature uses the yazl package to create a .zip archive of app files and then sends a POST request streaming the archive. The code related to archiving lives here.
On version 1.66.0, the following error is thrown after initiating the POST request. Error: read ECONNRESET\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)\n at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)
We're able to reproduce the issue consistently. During our investigation, we noticed that launching the extension with NODE_DEBUG=stream fixes the issue and allows for a successful zip deploy. This is really strange to me and any insight into why this might be happening is greatly appreciated. Does anyone know of specific changes to the Node.JS stream module, and how they could be effecting this?
We know that VS Code has upgraded from Node.JS v14 to v16 in 1.66.0. And suspect that this upgrade is related to this issue. Were there any other changes that could be impacting this?
Steps to Reproduce:
Use the Azure Functions or Azure App Service extensions and use the Zip Deploy method of deploying to an app.
There were quite some changes in node between 14 and 16. I remember at least nodejs/node#33035 which caused problems in Hapi.
FWIW upload fails for me with 1.65.2 if I set NODE_DEBUG=stream. Just now I was able to upload with 1.66 without setting anything (once).
Best guess here is that this is a timing issue. Maybe server ends connection fast for some reason and depending on node version, debug logging this connection reset arrives earlier or later on client side and is ignored in some cases but not in others.
FWIW upload fails for me with 1.65.2 if I set NODE_DEBUG=stream. Just now I was able to upload with 1.66 without setting anything (once).
Are you debugging the extension from source? Or running VS Code with NODE_DEBUG=stream?
Best guess here is that this is a timing issue. Maybe server ends connection fast for some reason and depending on node version, debug logging this connection reset arrives earlier or later on client side and is ignored in some cases but not in others.
We are thinking along those lines as well. Hasn't been easy to pin down. Thank you for pointing me to nodejs/node#33035, I will look into that.
I executed VS Code with NODE_DEBUG=stream (tried also NODE_DEBUG=http) as I have no idea how to execute the individual commands issued by the extension.
Activity
faceoffers28 commentedon Apr 1, 2022
Same here. ng-version = 16.14.2 & VSC - About - Node.js = 16.13.0. #146470 (comment)
Flarna commentedon Apr 1, 2022
There were quite some changes in node between 14 and 16. I remember at least nodejs/node#33035 which caused problems in Hapi.
FWIW upload fails for me with 1.65.2 if I set
NODE_DEBUG=stream. Just now I was able to upload with 1.66 without setting anything (once).Best guess here is that this is a timing issue. Maybe server ends connection fast for some reason and depending on node version, debug logging this connection reset arrives earlier or later on client side and is ignored in some cases but not in others.
alexweininger commentedon Apr 1, 2022
Are you debugging the extension from source? Or running VS Code with
NODE_DEBUG=stream?We are thinking along those lines as well. Hasn't been easy to pin down. Thank you for pointing me to nodejs/node#33035, I will look into that.
Flarna commentedon Apr 1, 2022
I executed VS Code with
NODE_DEBUG=stream(tried alsoNODE_DEBUG=http) as I have no idea how to execute the individual commands issued by the extension.deepak1556 commentedon Apr 4, 2022
Merging to #146470, please subscribe to that issue for updates.