Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment to Azure Function Fails with reason: read ECONNRESET #146470

Closed
ebrenton opened this issue Mar 31, 2022 · 34 comments
Closed

Deployment to Azure Function Fails with reason: read ECONNRESET #146470

ebrenton opened this issue Mar 31, 2022 · 34 comments
Assignees
Labels
electron-17-update Issues related to electron 17 update extension-host Extension host issues extensions Issues concerning extensions

Comments

@ebrenton
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.66.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Attempt to deploy to an Azure Function using Azure Function extension fails with the error "reason: read ECONNRESET"
  2. I downgraded VSCode to version 1.65.2 and the deployment started working again
  3. I have disabled automatic updates for the time being.
@DiegoGFritz
Copy link

I have the same problem when deploy to web app

Version: 1.66.0 (user setup)
Commit: e18005f
Date: 2022-03-30T05:50:14.623Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.22000

@ShawnMcGough
Copy link

I am also experiencing this issue deploying a function app.

Reverting to version 1.65.2 (user setup) fixed the issue.

@jrieken
Copy link
Member

jrieken commented Apr 1, 2022

Looks like an extension issue but maybe something with our proxy solution has changed?

@bwateratmsft
Copy link
Contributor

@jrieken that seems plausible; we released an update about a week ago but a significant volume of comments appeared just yesterday. Also, users have said that downgrading VSCode to 1.65.2 causes it to work again. So it seems like some change in VSCode caused this--either the Node 16 upgrade or proxy changes (sounds more likely).

@ebrenton
Copy link
Author

ebrenton commented Apr 1, 2022

@jrieken that seems plausible; we released an update about a week ago but a significant volume of comments appeared just yesterday. Also, users have said that downgrading VSCode to 1.65.2 causes it to work again. So it seems like some change in VSCode caused this--either the Node 16 upgrade or proxy changes (sounds more likely).

Agreed!
I have been deploying new code to Azure on a daily basis. Everything was working fine until VSCode auto-updated to version 1.66. I have not made any changes or updates to any extensions in several weeks.
Thank you.

@chrmarti
Copy link
Contributor

chrmarti commented Apr 1, 2022

There were no changes to the network proxy support in 1.66.

@ebrenton Do you also see this with the proxy support in user settings disabled?
image

@ShawnMcGough
Copy link

There were no changes to the network proxy support in 1.66.

@ebrenton Do you also see this with the proxy support in user settings disabled? image

@chrmarti
I can confirm deployment still does not work with 1.66 when setting 'Http: Proxy Support' for extensions to 'off'. Fails in the same way.

@DiegoGFritz
Copy link

I have this configuration
image

@faceoffers28
Copy link

faceoffers28 commented Apr 1, 2022

Sames issue. Running 1.66.0 now. It worked just fine last week. Visual Studio Code 1.66.0 installed / updated on 3/30/22.

@ChrisMidkiff
Copy link

I am also seeing this issue after upgrade today.

@alexweininger
Copy link
Member

@jrieken @chrmarti I outlined this in #146577, but will repeat here in case it provides more context to the issue:

I found that setting NODE_DEBUG=stream while debugging the Azure Functions extension somehow fixes the issue. Without NODE_DEBUG=stream, I can reproduce the issue consistently. Any insight?

@deepak1556
Copy link
Collaborator

Very likely regressed with libuv/libuv@ce15b84, need to test with Nodejs >= 16.14.0 that contains libuv/libuv@b2614a1 and nodejs/node@3b5b893. Refs nodejs/node#39683

@deepak1556 deepak1556 added upstream Issue identified as 'upstream' component related (exists outside of VS Code) extension-host Extension host issues confirmation-pending electron-17-update Issues related to electron 17 update nodejs NodeJS support issues labels Apr 4, 2022
@Elrinth
Copy link

Elrinth commented Apr 4, 2022

I am on 1.66.0 and also experience this problem.
Installing https://code.visualstudio.com/updates/v1_65 instead solved the problem.

@alexweininger
Copy link
Member

Very likely regressed with libuv/libuv@ce15b84, need to test with Nodejs >= 16.14.0 that contains libuv/libuv@b2614a1 and nodejs/node@3b5b893. Refs nodejs/node#39683

@deepak1556 if you could supply a VS Code build with Nodejs >= 16.14.0, I can check to see if the issue is resolved.

@klodha
Copy link

klodha commented Apr 6, 2022

@deepak1556

I just tried insiders build but that doesn't seems to address the issue. Same issue of ECONNRESET.

Version: 1.67.0-insider
Commit: f050b17dacedba13962244b13c70084a473d08f7
Date: 2022-04-06T05:26:11.128Z (3 hrs ago)
Electron: 17.3.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin arm64 21.4.0
Error log: 

2:40:55 PM func-sample: Starting deployment...
2:40:58 PM func-sample: Creating zip package...
2:41:02 PM func-sample: Zip package size: 1.34 MB
2:45:42 PM: Error: request to https://func-sample.scm.azurewebsites.net/api/zipdeploy?isAsync=true&author=VS%20Code failed, reason: read ECONNRESET

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Apr 6, 2022

I grabbed the latest Insiders build and it seems to still be on Electron v17, so does not have the needed fix yet as I understand. It needed an update to v18 right?

Did it just miss the cutoff and will be in the next Insider's build? I'm guessing that's what happened based on the timing of the build (05:26 UTC) and the timing of @deepak1556's comment (09:13 UTC).

@alexweininger
Copy link
Member

today's insider contains the fixes mentioned in #146470 (comment), can you check if it addresses the issue. Thanks!

@deepak1556

I tested the latest insiders build and the issue still reproduces. As @bwateratmsft mentioned above, it appears that the latest Insiders release is still on Electron v17.3 and Node.JS 16.3.0.

VS Code version details

Version: 1.67.0-insider (Universal)
Commit: f050b17
Date: 2022-04-06T05:15:27.397Z
Electron: 17.3.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin x64 21.4.0

@deepak1556
Copy link
Collaborator

I grabbed the latest Insiders build and it seems to still be on Electron v17, so does not have the needed fix yet as I understand. It needed an update to v18 right?

Sorry for the confusion, the electron build numbers don't change, backports have been made to the same version. What would change in these cases is process.versions["microsoft-build"]

Since it is confirmed that insiders does not fix the issue, I would need to investigate further with E2E setup. I will update here once there is some progress.

@LidorPrototype
Copy link

LidorPrototype commented Apr 7, 2022

After I downgraded, and tried most of the stuff I found about this issue, that error passed away but now I get the following fail:

Creating virtual environment... 1:22:05 PM boirndextauto: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -i /tmp/8da1880713886a2 --compress-destination-dir -p virtualenv_name=antenv --log-file /tmp/build-debug.log 1:22:07 PM boirndextauto: Deployment Failed. 1:22:16 PM boirndextauto: Deployment failed.

Do you know why is this?

@alexweininger
Copy link
Member

After I downgraded, and tried most of the stuff I found about this issue, that error passed away but now I get the following fail:

Creating virtual environment... 1:22:05 PM boirndextauto: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -i /tmp/8da1880713886a2 --compress-destination-dir -p virtualenv_name=antenv --log-file /tmp/build-debug.log 1:22:07 PM boirndextauto: Deployment Failed. 1:22:16 PM boirndextauto: Deployment failed.

Do you know why is this?

@LidorPrototype please file a new issue on the Azure Functions extension, thanks!

@macrozone

This comment was marked as off-topic.

@deepak1556
Copy link
Collaborator

Just to update on the progress, the azure extension team is working on a minimal repro with Nodejs to see if there is already a fix in newer versions that can be backported and at the same time identify the commit which caused this behavior change.

@faceoffers28
Copy link

faceoffers28 commented Apr 11, 2022

I just tried to deploy my Angular app using the Zip Deployment Power Shell method. I zipped up the dist folder. I'm now getting the following error.

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

@ShawnMcGough
Copy link

ShawnMcGough commented Apr 12, 2022

It is still failing with version 1.66.2.

Important for testing - if the zip file is ~10 kB or less, it works. Make sure your test cases are larger than 10 kB or you'll get false successes.

Fails when > 10kB

4:51:13 PM function-test: Starting deployment...
4:51:14 PM function-test: Creating zip package...
4:51:14 PM function-test: Zip package size: 10.7 kB
4:52:01 PM: Error: request to /api/zipdeploy?isAsync=true&author=VS%20Code failed, reason: read ECONNRESET

Success when < 10kB

4:52:13 PM function-test: Starting deployment...
4:52:14 PM function-test: Creating zip package...
4:52:14 PM function-test: Zip package size: 9.91 kB
...
4:52:21 PM function-test: Deployment successful.

Version

Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19042

@alexweininger
Copy link
Member

@ShawnMcGough

Sorry you're still running into this issue, we're working on a fix in the Azure Functions extension. We have a development build out that you can test to see if it fixes your issues. If you could try it out and report back your results, that'd be a big help.

Details on installing and testing the development build: microsoft/vscode-azurefunctions#2844 (comment)

@faceoffers28
Copy link

@alexweininger Will this fix deployment issues with apps that aren't Functions? Seems like it will since you folks merged 146577 with this one.

@alexweininger
Copy link
Member

Will this fix deployment issues with apps that aren't Functions? Seems like it will since you folks merged 146577 with this one.

@faceoffers28 Yes, this fix is for both Functions and App Service. See microsoft/vscode-azureappservice#2191 (comment) for the development build for App Service if you want to test it out.

@isidorn
Copy link
Contributor

isidorn commented Apr 13, 2022

@alexweininger awesome, thanks for working on a fix.
Is there still some work needed on the VS Code side? Sorry if you and @deepak1556 are already in sync and I am jumping in here :)

@deepak1556
Copy link
Collaborator

@isidorn yup the issue has been isolated to a third-party module used by the extension whose behavior regressed with some changes to the Nodejs streams component. I have been syncing with @alexweininger offline, we can close this issue as it does not require any work from core and can be addressed on the extension side.

@deepak1556 deepak1556 removed upstream Issue identified as 'upstream' component related (exists outside of VS Code) nodejs NodeJS support issues labels Apr 13, 2022
@deepak1556 deepak1556 removed this from the April 2022 milestone Apr 13, 2022
@alexweininger
Copy link
Member

Fix has been released in version v1.6.2 of the Azure Functions extension. 🎉

@ebrenton
Copy link
Author

I can confirm that deployment is now working with VS Code v1.66 and Azure Functions Extension v1.6.2.
Thank you everyone for your help.

@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron-17-update Issues related to electron 17 update extension-host Extension host issues extensions Issues concerning extensions
Projects
None yet
Development

No branches or pull requests

16 participants