Azure Function v3 Returns error 'Did not find any initialized language workers' after change from .Net Core 3.1 to .Net 5

Gareth Frost 106 Reputation points
2021-07-12T10:15:35.143+00:00

I have an Azure Function v3 that was running using the old dotnet runtime with a .Net Core 3.1 framework version with dependant libraries, those libraries have now changed to .Net 5, so I have upgraded the function appropriately.

Having set all the required local settings and configuration elements to using the new dotnet-isolated, any execution of the HTTPTrigger function returns a 500 Error with 'The request timed out', and the console log showing the error 'Did not find any initialized language workers'.

Have currently tried all options, including creating a new Function and App Service plan, still with the same result

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} vote

Accepted answer
  1. Gareth Frost 106 Reputation points
    2021-07-26T15:36:54.747+00:00

    Hello everyone and thanks for the help.

    I managed to work out the issue, after some time, and it turns out that one of the dependant libraries was getting locked up during the dependency injection setup, and hanging for the entire 5 minutes the function was live. This in turns means the the HostBuilder().Build() method never completed during the startup phase as part of the new dotnet-isolated process.

    If you get the same error I have, check that you have the startup and host.RunAsync() as part of the Program.Main() method for dotnet-isolated

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Jorge Octavio Cortes Palacios 1 Reputation point
    2021-11-27T13:24:16.427+00:00

    Same error, in my case I was using dependency injection to add a few services, I was getting one parameter from the environment variables inside the .ConfigureServices() section, but when I deploy I forget to add the variable to the application settings in azure, because of that I was getting this weird error.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.