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

Every JavaScript V2 HTTP-triggered function gives 404 in Azure - runs fine locally #3602

Closed
ChristianWeyer opened this issue Oct 11, 2018 · 6 comments

Comments

@ChristianWeyer
Copy link

I have a created a very simple and plain HTTP-triggered JavaScript function in VS Code - all with the latest runtimes and tools.
You can find it here: /~https://github.com/ChristianWeyer/azure-functions-js-http-repro

Running it locally, everything is fine, e.g. http://localhost:7071/api/ping
However, after deploying it (via VS Code) to Azure, I get a 404. E.g. https://cwplayground.azurewebsites.net/api/ping

BTW: this happens with all the HTTP-triggered JavaScript functions I have tried to build and deploy.

@mhoeger
Copy link
Contributor

mhoeger commented Oct 12, 2018

@ChristianWeyer - I know you commented on #3584, but did changing or adding the App Setting FUNCTIONS_WORKER_RUNTIME => node work as a workaround to unblock you?

@ChristianWeyer
Copy link
Author

Indeed, that helped. Sorry for not having seen this :-/

Is there any ETA for a fix?
Thanks!

@mhoeger
Copy link
Contributor

mhoeger commented Oct 12, 2018

@ChristianWeyer - glad that helped! Could you tell us how you deployed your function? And do you have FUNCTIONS_WORKER_RUNTIME defined in local.settings.json?

@ChristianWeyer
Copy link
Author

I deployed it via the Azure tools in VS Code.
image

Yes, the setting is there:
image

@mhoeger
Copy link
Contributor

mhoeger commented Oct 16, 2018

@ChristianWeyer - I've haven't been able to repro your issue when creating a new function app and deploying through VS Code (see image).
image

I think that the function app you're deploying to may have been created with runtime stack of "dotnet", which gave it the FUNCTIONS_WORKER_RUNTIME app setting of "dotnet". By default, local.settings.json environment variables are not copied over, as App Settings are often secrets and credentials.

We do want to improve this experience though, because FUNCTIONS_WORKER_RUNTIME does not change in local vs. prod. The tracking issue for that fix is here: #3120

@ChristianWeyer
Copy link
Author

So, I guess we can close it for now.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2020
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