0

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.

Quiver
  • 1,351
  • 6
  • 33
  • 56
  • looks strange, are you using consumption plan? – Manish May 23 '23 at 11:51
  • Is it working locally? – Manish May 23 '23 at 11:53
  • what is FUNCTIONS_EXTENSION_VERSION value on function app configuration? – Manish May 23 '23 at 11:55
  • did you check if your code is not doing anything which is deprecated? https://learn.microsoft.com/en-us/azure/azure-functions/migrate-version-3-version-4?tabs=net6-in-proc%2Cazure-cli%2Cwindows&pivots=programming-language-csharp#breaking-changes-between-3x-and-4x – Manish May 23 '23 at 11:55
  • Last try to check the logs.. – Manish May 23 '23 at 11:56
  • @Manish Thank you for the tips and suggestions. I finally figured it out and I had to downgrade Microsoft.Extensions.Http from 7.0.0 to 6.0.0. I originally could not run the functions locally because I was missing the Azurite storage emulator. Once I got that working I was able to see all of the functions were failing due to "Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0..." – Quiver May 23 '23 at 14:30

1 Answers1

0

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.

Quiver
  • 1,351
  • 6
  • 33
  • 56