Deploy Azure function from VSC in WSL2 failed at the end

Hsieh, Todd T 91 Reputation points
2020-10-18T05:45:53.817+00:00

Creating an Azure HTTPTrigger Function App from VSC (1.50.1) and deploy to cloud failed at the end. This happens if running it from WSL 2 (winver=18363.1082/1909). The function app is actually deployed and I can see it from Azure Portal. Access from https://funapp-httptrigger-test.azurewebsites.net/ returns a "Your functions 3.0 is up and running ...". However accessing https://funapp-httptrigger-test.azurewebsites.net/api/HttpTrigger1 gives 404 Not Found. And in the VSC output window it has following error:

Creating zip package...
Error: request to https://funapp-httptrigger-test.scm.azurewebsites.net/api/zipdeploy?isAsync=true&author=VS%20Code failed, reason: socket hang up

If using same way but under Windows, everything works just fine. If it is under VM-ware/Ubuntu, it is also fine.

Wonder if there is any settings/workaround that I can apply?

Here is proxys.json

{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {}
}

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,323 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mike Urnun 9,761 Reputation points Microsoft Employee
    2020-10-19T20:01:35.807+00:00

    Hi @Hsieh, Todd T - This appears to be a known issue being tracked here: https://github.com/microsoft/vscode-azurefunctions/issues/2108 which is included as a bug-fix in a milestone for an upcoming release. Please follow the Github issue and engage for future updates.


0 additional answers

Sort by: Most helpful