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

Unable to deploy Flask app from VS Code #2193

Closed
kjoshea opened this issue Apr 2, 2022 · 4 comments
Closed

Unable to deploy Flask app from VS Code #2193

kjoshea opened this issue Apr 2, 2022 · 4 comments

Comments

@kjoshea
Copy link

kjoshea commented Apr 2, 2022

I receive the below error message when trying to deploy my Flask app from VS Code, App Service Extension:

The deployment failed with error: request to https://[INSERT MY APP NAME].scm.azurewebsites.net/api/zipdeploy?isAsync=true&author=VS%20Code failed, reason: socket hang up.

When I got to the above link, I get: No route registered for '/api/zipdeploy'

Default_docker.log:

2022-04-02T22:13:25.998998714Z
2022-04-02T22:13:25.999041614Z _____
2022-04-02T22:13:25.999049014Z / _ \ __________ _________ ____
2022-04-02T22:13:25.999135013Z / /\ ___ / | _ __ _/ __ \
2022-04-02T22:13:25.999356613Z / | / /| | /| | /\ /
2022-04-02T22:13:25.999363313Z _
|__ /_____ _
/ || ___ >
2022-04-02T22:13:25.999369013Z / / /
2022-04-02T22:13:25.999374313Z
2022-04-02T22:13:25.999379313Z A P P S E R V I C E O N L I N U X
2022-04-02T22:13:25.999384713Z
2022-04-02T22:13:25.999389813Z Documentation: http://aka.ms/webapp-linux
2022-04-02T22:13:25.999395413Z Python 3.8.12
2022-04-02T22:13:25.999400713Z Note: Any data outside '/home' is not persisted
2022-04-02T22:13:26.428232995Z Starting OpenBSD Secure Shell server: sshd.
2022-04-02T22:13:26.462861937Z Site's appCommandLine: gunicorn --bind=0.0.0.0 --timeout 600 --chdir app init:app
2022-04-02T22:13:26.464304535Z Launching oryx with: create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -virtualEnvName antenv -defaultApp /opt/defaultsite -userStartupCommand 'gunicorn --bind=0.0.0.0 --timeout 600 --chdir app init:app'
2022-04-02T22:13:26.715880114Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2022-04-02T22:13:26.715921113Z Could not find operation ID in manifest. Generating an operation id...
2022-04-02T22:13:26.715929013Z Build Operation ID: cd813458-09ac-49c7-8e58-1fd621555524
2022-04-02T22:13:27.679314501Z Oryx Version: 0.2.20211207.1, Commit: 46633df49cc8fbe9718772a3c894df221273b2af, ReleaseTagName: 20211207.1
2022-04-02T22:13:27.812167178Z Writing output script to '/opt/startup/startup.sh'
2022-04-02T22:13:28.458080397Z WARNING: Could not find virtual environment directory /home/site/wwwroot/antenv.
2022-04-02T22:13:28.458117797Z WARNING: Could not find package directory /home/site/wwwroot/oryx_packages.
2022-04-02T22:13:30.219517348Z
2022-04-02T22:13:30.219586948Z Error: can't chdir to 'app'

VS CODE VERSION:

Version: 1.66.0 (user setup)
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5
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.19044

@alexweininger
Copy link
Member

Until a fix is released in VS Code stable (hopefully the next major release), here are some options:

  1. Wait for the fix to come in VS Code Insiders
  2. Deploy via Azure CLI
  3. Downgrade your Azure App Service extension version to v0.21.1 (Mar 04, 2021), we used a different zip deploy method which seems to be working still. Note: it might not work in environments like WSL or Codespaces, which is why we changed our deploy in v0.21.2 (Mar 09, 2021).
  4. Downgrade to the VS Code February 2022 release, where zip deploy is working as discussed and confirmed above.

Here's some information on the bug we suspect is causing the issue with zip deploy.

We suspect that it was a regression in the libuv library caused by libuv/libuv@ce15b84, which was included in Node.JS 16.13.0.

See this issue, and specifically this comment for more information.

@alexweininger
Copy link
Member

Closing as a duplicate of #2191. Follow along there, or the corresponding Azure Functions issue for further updates and discussion.

@kjoshea
Copy link
Author

kjoshea commented Apr 9, 2022

Rolling back to VS Code February 2022 release worked well. Thanks!

@alexweininger
Copy link
Member

Fix has been released in version https://github.com/microsoft/vscode-azureappservice/releases/tag/v0.23.2 of the extension.

@microsoft microsoft locked and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants