Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New deployed azure function returns 404 Not Found error

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.
like image 750
kiflay Avatar asked Nov 21 '20 10:11

kiflay


2 Answers

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.

like image 181
kiflay Avatar answered Oct 21 '22 17:10

kiflay


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.

like image 29
dnndeveloper Avatar answered Oct 21 '22 17:10

dnndeveloper