How to fix Azure Functions Timer Trigger unable to start running locally with VS2022 17.x (Azurite)

Lately my VS2022 (17.2.x) Azure Functions projects started failing to run locally. The local console had errors related to not being able to start any of the Timer Triggers.

The errors take the format

The listener for function 'function name' was unable to start. Azure.Storage.Blobs: Service request failed.

This error is related to Azurite (the local Azure Functions runtime environment). The version of Azurite used by VS2022 is causing the problem. I was able to fix the issue by:

Closing Visual Studio

Installing the latest version of Azurite globally npm install -g azurite

Open Azure Storage Explorer and delete the azure-webjobs-hosts blob container associated with the local emulator

Pause
Restart Visual Studio, run the Azure Functions project and the timer triggers are all good again

Further reading

Continue reading about Azure functions.

About the Author:

Cameron Dwyer is the Chief Technology Officer at OnePlace Solutions where he oversees a product portfolio focused on the Microsoft Office 365 & SharePoint eco-system. With over 20 years experience as a developer and consultant in collaboration technologies, Cameron has been actively involved in the SharePoint community since 2007 and is a Microsoft MVP in Office Development.

Reference:

Dwyer, C. (2022). How to fix Azure Functions Timer Trigger unable to start running locally with VS2022 17.x (Azurite). Available at: https://camerondwyer.com/2022/07/22/how-to-fix-azure-functions-timer-trigger-unable-to-start-running-locally-with-vs2022-17-2-x-azurite/ [Accessed: 11th October 2022].

Share this on...

Rate this Post:

Share:

Topics:

Azure