3
votes

Hey I have deployed new azure function using Azure dev ops CI/CD. The function app has been deployed successfully and when I go to the main URL, it says your function app is running. I tried to test the end points("/save") using azure portal and the output is 404 Not found. The same results when I use POST man as well. Any help would be appreciated?

enter image description here

 2020-11-21T11:30:45.769 [Error] The following 2 functions are in error:
 Get: The function type name 'DocumentContextFunction.Functions.GetDocument' 
 is invalid.
 Save: The function type name 
 'DocumentContextFunction.Functions.SaveDocument' is invalid.
3
what is the endpoint? did you try to check logs with kudu?Sajeetharan
the end point is : dev-document-function.azurewebsites.net/api/Save I have only checked the logs in application insight, nothing is there. How can I check the logs in Kudu?kiflay
thanks @Sajeetharan, i got the two errors: Get: The function type name 'DocumentContextFunction.Functions.GetDocument' is invalid. Save: The function type name 'DocumentContextFunction.Functions.SaveDocument' is invalid.kiflay

3 Answers

3
votes

I have fixed this by updating the value of the "FUNCTIONS_EXTENSION_VERSION" from 1 to 3. For some reason every time I deployed using Azure CI/CD, its value is set to 1, so I have to manually change it to be 3.

0
votes

The author's question helped me understand where the problem was coming from. In my case, it was not about the CI/CD pipeline doing anything funny.

It was my IaC code which was not setting up the function app properly. It picks version ~1 by default but I had to set it to ~3.

enter image description here

0
votes

In my case I had a function created in portal. I then published a function via visual studio. After publishing the portal created function was 404 not found and I could not even delete the function from the portal.

Exact same code in a new function worked as expected.

This is not intuitive and were no indications in the portal that previous portal created functions would break.

This maybe buried somewhere in documentation but I would have expected a warning in azure before allowing other functions to break without code changes.