Currently having issues with a Node Azure Function App throwing Error AZFD0005. The node application runs fine locally. The specific error from Azure is :
Microsoft.Azure.WebJobs.Script.ExternalStartupException : Error building configuration in an external startup class. ---> Microsoft.Azure.WebJobs.Script.HostInitializationException : Referenced bundle Microsoft.Azure.Functions.ExtensionBundle of version 1.8.1 does not meet the required minimum version of 2.6.1. Update your extension bundle reference in host.json to reference 2.6.1 or later. For more information see https://aka.ms/func-min-bundle-versions.
We have a total of 3 Function apps in a resource group that seem to have this error which started Friday 4/07/23. Before this time, the functions were running fine with no errors. We can focus on 1.
I have tried several different ways to solve this error, first one being the obvious. Lets call the problem app stackoverflow-test-app.
I deleted the function app : stackoverflow-test-app using the portal and re-deployed using the infrastructure pipeline with upgraded host.json to
[3.3.0, 4.0.0)
. - This did not remove the errorI deployed a function app : stackoverflow-test-app-two with a new name using the infrastructure pipeline and using the same configuration as stackoverflow-test-app (this was done to try and replicate the error on a new function app) - This somehow works and doesn't show the AZFD0005 error
I decided to not use our infrastructure pipeline and not deploy code (so have the function app bare bones) and try deploying using CLI. I used the "az functionapp create" command (this was done to ensure nothing unexpected was going on in our infrastructure) - This did not remove the error
- The command i used was:
az functionapp create -g "groupHere" -p "planHere" -n "nameHere" -s "storageHere" --assign-identity '[system]' --runtime node --runtime-version 16 --functions-version 4
I thought maybe something was broken with node runtime 16 so decided to use the command above and use node 14 function version 3. This did not remove the error
I deleted the function app : stackoverflow-test-app and created the same function using the portal - This did not remove the error
This is what baffles me, the only thing that removed the error was creating a whole new function appstackoverflow-test-app-two with a separate name and using the same configuration. I can delete the problem function app : stackoverflow-test-app fine, but the moment i re-create it with the same function name whether that's with the portal or CLI commands, the AZFD0005 error pops up again.
I can confirm all is okay with the resource group, app service plan or storage account since any new function app created will work fine.
Here is my host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}