Search code examples
azure.net-coreazure-functionsazure-functions-runtime

All Azure Functions returning 404 after upgrading to v4 runtime


I recently upgraded our Azure Functions to use the new v4 runtime. I followed the migration guide from v3 to v4. As far as I know, I followed all of the steps and according to the Azure Portal, the functions app is now running runtime v4.x.

The issue that I am having now is that none of my functions are being triggered anymore. All of the functions use queue triggers but the queues are filling up and the functions are not triggering/executing.

When I use the portal and use the Test/Code function, I receive a 404 Not Found response code as the output for every function that I try it against.

I have completely deleted the old function app and created a new one thinking that maybe some old files were not being deleted or something. I published to the new app but am having the same problems.

My project file in visual studio looks fine too:

enter image description here

I even created a test http triggered function and I get the same result when trying to execute it from the portal:

enter image description here

I'm running out of ideas here so any guidance would be greatly appreciated. I'm not sure how to even debug this issue as the only error I am getting is a 404. I assume this issue has to do something with the migration because all of them were working without issues before I migrated them.


Solution

  • I solved this by downgrading the Microsoft.Extensions.Http nuget package from 7.0.0 to 6.0.0. When running the functions locally I was getting an error of:

    Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified

    This error was causing the functions to not startup at all. Hence the reason they were returning 404 when published to Azure. Everything is working great now - locally and in Azure.

    I found the solution here.