Hi there, I was just using the HttpExample code and nothing was changed, after I clicked F5 according to the guide and the issue came up, even I used func start in the project folder the issue remained the same.
Azure Functions Core Tools (3.0.2912 Commit hash: bfcbbe48ed6fdacdf9b309261ecc8093df3b83f2)
Function Runtime Version: 3.0.14287.0
[9/19/2020 15:00:06] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '5f4c99d4-a810-4ca5-8ea9-2f98573cf816'
[9/19/2020 15:00:06] Reading host configuration file 'G:\projects\example-pj\host.json'
[9/19/2020 15:00:06] Host configuration file read:
[9/19/2020 15:00:06] {
[9/19/2020 15:00:06] "version": "2.0",
[9/19/2020 15:00:06] "logging": {
[9/19/2020 15:00:06] "applicationInsights": {
[9/19/2020 15:00:06] "samplingSettings": {
[9/19/2020 15:00:06] "isEnabled": true,
[9/19/2020 15:00:06] "excludedTypes": "Request"
[9/19/2020 15:00:06] }
[9/19/2020 15:00:06] }
[9/19/2020 15:00:06] },
[9/19/2020 15:00:06] "extensionBundle": {
[9/19/2020 15:00:06] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[9/19/2020 15:00:06] "version": "[1.*, 2.0.0)"
[9/19/2020 15:00:06] }
[9/19/2020 15:00:06] }
[9/19/2020 15:00:06] Loading functions metadata
[9/19/2020 15:00:06] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[9/19/2020 15:00:06] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[9/19/2020 15:00:06] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[9/19/2020 15:00:06] Reading functions metadata
[9/19/2020 15:00:06] 2 functions found
[9/19/2020 15:00:06] 2 functions loaded
[9/19/2020 15:00:06] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\USERNAME\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[9/19/2020 15:00:06] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json[9/19/2020 15:00:10] Downloading extension bundle from https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2/Microsoft.Azure.Functions.ExtensionBundle.1.3.2_any-any.zip to C:\Users\USERNAME\AppData\Local\Temp\4f3275ce-db69-47b8-bb7b-a828041003c2\Microsoft.Azure.Functions.ExtensionBundle.1.3.2.zip
Hosting environment: Production
Content root path: G:\projects\example-pj
Now listening on: http://0.0.0.0:7071
Application started. Press Ctrl+C to shut down.
Value cannot be null. (Parameter 'provider')
Application is shutting down...
[9/19/2020 15:02:28] Stopping host...
[9/19/2020 15:02:28] Host shutdown completed.
@5m1 Sorry you ran into this. Can you try deleting the contents of C:\Users\USERNAME\.azure-functions-core-tools\Functions\ExtensionBundles and try again.
Related #1700 #1999
/cc @soninaren I think we still need some ability to check that the bundles cache is corrupt/incomplete and redownload.
I'm also experiencing this issue with the v3 Functions runtime, and Java worker runtime.
@anthonychu I don't use extension bundles and don't have .azure-functions-core-tools in my user folder.
Here's the output:
> Executing task: func host start <
Azure Functions Core Tools (3.0.2912 Commit hash: bfcbbe48ed6fdacdf9b309261ecc8093df3b83f2)
Function Runtime Version: 3.0.14287.0
System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 267
at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 66
Application is shutting down...
Starting worker process failed
System.TimeoutException: The operation has timed out.
Failed to start language worker process for runtime: (null). workerId:830a4245-94b4-451c-8b50-db3ba38c65eb
EDIT: This issue only occurs when I debug the function app through VSCode, but not when I manually trigger func host start...
@axel-op That looks like a different problem. Could you please create a new issue so we can track it separately?
Hey @anthonychu, thank you for your prompt response. Unfortunately I don't have folder named .azure-functions-core-tools under C:\Users\USERNAME\.

Is there any other place I could check?
I'm seeing a similar problem, trying to use dependency injection on an Azure Functions project. I'm targeting .NET Core 3.1, Azure Functions v3, and currently referencing the following set of packages;
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
</ItemGroup>
The error is;
Azure Functions Core Tools (2.7.2913 Commit hash: 3261cf16a459ad227f13ccbafc51b738ed6ed927)
Function Runtime Version: 2.0.14248.0
AZURE_FUNCTIONS_ENVIRONMENT: Development
A host error has occurred during startup operation '4ae75a9f-eadb-454d-9223-fa74b820e118'.
Location.Api: Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Azure.Functions.Extensions.DependencyInjection.IFunctionsHostBuilder.get_Services()'.
Value cannot be null.
Parameter name: provider
Application is shutting down...
I've already tried uninstalling and reinstalling the Azure Functions Core Tools, which recently solved this problem with the same codebase.
@5m1 Looking at your logs again, it actually looks like you might be hitting the same problem as @axel-op, and perhaps @airadam as well. My initial thought was this is related to extension bundles but the functions are loading so it's probably not.
Interesting the log output is different though.
@pragnagopa @brettsam Looks like from the stack trace this is close to some recent changes for logging. Also might be DI related.
@airadam -- for you, it looks like you're running a v2 function app but using v3 dependencies. Can you share your full csproj? What is the AzureFunctionsVersion?
Here it is @brettsam - AzureFunctionsVersion is v3 according to this!
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Location.Services\Location.Services.csproj" />
<ProjectReference Include="..\Location.Models\Location.Models.csproj" />
</ItemGroup>
</Project>
Are you running from VS Code or Visual Studio?
@brettsam VS Code, v1.49.1
It sounds like there may be multiple different issues here:
@brettsam - I'll see what I can do; there were quite a few steps over several days between having a project/environment that worked to one that stopped, so it may take me a while to get to any kind of reliable reproduction.
Same issue here. MacOS 10.14.6/Python 3.8.5. Installed Visual Studio Code, then the Azure Functions Extension, which installed azure-functions-core-tools 3.0.2912. Same error when run from both Visual Studio and cmdline. See . .venv/bin/activate && func host start --verbose with CLI_DEBUG=1 on.
Azure Functions Core Tools (3.0.2912 Commit hash: bfcbbe48ed6fdacdf9b309261ecc8093df3b83f2)
Function Runtime Version: 3.0.14287.0
Setting unsupported .NET environemt variables (empty string) is not implemented for this platform.
[9/25/2020 6:09:11 AM] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '9a1868a1-18fc-40d5-a7d7-5187be2e1a06'
[9/25/2020 6:09:11 AM] Reading host configuration file '/Users/parker/foo/host.json'
[9/25/2020 6:09:11 AM] Host configuration file read:
[9/25/2020 6:09:11 AM] {
[9/25/2020 6:09:11 AM] "version": "2.0",
[9/25/2020 6:09:11 AM] "logging": {
[9/25/2020 6:09:11 AM] "applicationInsights": {
[9/25/2020 6:09:11 AM] "samplingSettings": {
[9/25/2020 6:09:11 AM] "isEnabled": true,
[9/25/2020 6:09:11 AM] "excludedTypes": "Request"
[9/25/2020 6:09:11 AM] }
[9/25/2020 6:09:11 AM] }
[9/25/2020 6:09:11 AM] },
[9/25/2020 6:09:11 AM] "extensionBundle": {
[9/25/2020 6:09:11 AM] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[9/25/2020 6:09:11 AM] "version": "[1.*, 2.0.0)"
[9/25/2020 6:09:11 AM] }
[9/25/2020 6:09:11 AM] }
[9/25/2020 6:09:12 AM] Loading functions metadata
[9/25/2020 6:09:12 AM] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[9/25/2020 6:09:12 AM] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[9/25/2020 6:09:12 AM] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[9/25/2020 6:09:12 AM] Reading functions metadata
[9/25/2020 6:09:12 AM] 1 functions found
[9/25/2020 6:09:12 AM] 1 functions loaded
[9/25/2020 6:09:12 AM] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /Users/parker/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[9/25/2020 6:09:12 AM] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[9/25/2020 6:09:12 AM] Downloading extension bundle from https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2/Microsoft.Azure.Functions.ExtensionBundle.1.3.2_any-any.zip to /var/folders/lq/1c1rv9r11wgb32hq7f283zdc0000gn/T/181f4b1f-ab06-4c8e-a2e8-8f85a65beca8/Microsoft.Azure.Functions.ExtensionBundle.1.3.2.zip
Hosting environment: Production
Content root path: /Users/parker/foo
Now listening on: http://0.0.0.0:7071
Application started. Press Ctrl+C to shut down.
System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 267
at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 66
Application is shutting down...
[9/25/2020 6:11:26 AM] Stopping host...
[9/25/2020 6:11:26 AM] Host shutdown completed.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Same issue here. MacOS 10.15.6
Installed Visual Studio Code, then the Azure Functions Extension, which installed azure-functions-core-tools 3.0.2881
Azure Functions Core Tools (3.0.2881 Commit hash: fa9641ad925588192888bc977ff51d8a63536267)
Function Runtime Version: 3.0.14287.0
Setting unsupported .NET environemt variables (empty string) is not implemented for this platform.
[10/2/2020 12:03:31 AM] Starting Rpc Initialization Service.
[10/2/2020 12:03:31 AM] Initializing RpcServer
[10/2/2020 12:03:31 AM] RpcServer initialized
[10/2/2020 12:03:31 AM] Initializing language worker channel for runtime:java
[10/2/2020 12:03:31 AM] Creating language worker channel for runtime:java
[10/2/2020 12:03:31 AM] Workers Directory set to: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers
[10/2/2020 12:03:31 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/python/worker.config.json
[10/2/2020 12:03:31 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:31 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:python
[10/2/2020 12:03:31 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java/worker.config.json
[10/2/2020 12:03:31 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:31 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME_VERSION:
[10/2/2020 12:03:31 AM] Added WorkerConfig for language: java
[10/2/2020 12:03:31 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/powershell/worker.config.json
[10/2/2020 12:03:31 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:31 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:powershell
[10/2/2020 12:03:31 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/node/worker.config.json
[10/2/2020 12:03:31 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:31 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:node
[10/2/2020 12:03:31 AM] Worker path for language worker java: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java
[10/2/2020 12:03:31 AM] Adding webhost language worker channel for runtime: java. workerId:25f96a4c-0d44-4e4a-9568-9c32ca0ebd36
[10/2/2020 12:03:31 AM] Initiating Worker Process start up
[10/2/2020 12:03:31 AM] Environment variable:%JAVA_OPTS% is not set
[10/2/2020 12:03:31 AM] Starting worker process with FileName:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java WorkingDirectory:/Users/miguel/projects/bcp-ttib/azure/azure-function-demo Arguments: -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -noverify -Djava.net.preferIPv4Stack=true -jar "/usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java/azure-functions-java-worker.jar" --host 127.0.0.1 --port 65199 --workerId 25f96a4c-0d44-4e4a-9568-9c32ca0ebd36 --requestId bcfecadc-b50f-4042-8d1e-a10612438a78 --grpcMaxMessageLength 2147483647
[10/2/2020 12:03:31 AM] /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java process with Id=18628 started
[10/2/2020 12:03:31 AM] LanguageWorkerConsoleLog[INFO] {Application.main}: Azure Functions Java Worker version [ 1.7.3-SNAPSHOT]
[10/2/2020 12:03:31 AM] LanguageWorkerConsoleLog[INFO] {MessageHandler.handle}: Message generated by "StartStream.Builder"
[10/2/2020 12:03:32 AM] Established RPC channel. WorkerId: 25f96a4c-0d44-4e4a-9568-9c32ca0ebd36
[10/2/2020 12:03:32 AM] Worker Process started. Received StartStream message
[10/2/2020 12:03:32 AM] Received WorkerInitResponse. Worker process initialized
[10/2/2020 12:03:32 AM] Worker capabilities: { "TypedDataCollection": "TypedDataCollection", "WorkerStatus": "WorkerStatus", "RpcHttpBodyOnly": "RpcHttpBodyOnly", "RpcHttpTriggerMetadataRemoved": "RpcHttpTriggerMetadataRemoved" }
[10/2/2020 12:03:32 AM] Updating capabilities: { "TypedDataCollection": "TypedDataCollection", "WorkerStatus": "WorkerStatus", "RpcHttpBodyOnly": "RpcHttpBodyOnly", "RpcHttpTriggerMetadataRemoved": "RpcHttpTriggerMetadataRemoved" }
[10/2/2020 12:03:32 AM] Adding jobhost language worker channel for runtime: (null). workerId:25f96a4c-0d44-4e4a-9568-9c32ca0ebd36
[10/2/2020 12:03:32 AM] Adding webhost language worker channel for runtime: java. workerId:25f96a4c-0d44-4e4a-9568-9c32ca0ebd36
[10/2/2020 12:03:32 AM] Rpc Initialization Service started.
[10/2/2020 12:03:32 AM] Startup operation 'f05319ac-79c7-44bb-a2df-cae02255cf44' with parent id '(null)' created.
[10/2/2020 12:03:32 AM] Startup operation 'f05319ac-79c7-44bb-a2df-cae02255cf44' starting.
[10/2/2020 12:03:32 AM] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: 'f05319ac-79c7-44bb-a2df-cae02255cf44'
[10/2/2020 12:03:32 AM] Host configuration applied.
[10/2/2020 12:03:32 AM] Reading host configuration file '/Users/miguel/projects/bcp-ttib/azure/azure-function-demo/host.json'
[10/2/2020 12:03:32 AM] Host configuration file read:
[10/2/2020 12:03:32 AM] {
[10/2/2020 12:03:32 AM] "version": "2.0",
[10/2/2020 12:03:32 AM] "logging": {
[10/2/2020 12:03:32 AM] "logLevel": {
[10/2/2020 12:03:32 AM] "default": "Trace"
[10/2/2020 12:03:32 AM] }
[10/2/2020 12:03:32 AM] },
[10/2/2020 12:03:32 AM] "extensionBundle": {
[10/2/2020 12:03:32 AM] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[10/2/2020 12:03:32 AM] "version": "[1., 2.0.0)"
[10/2/2020 12:03:32 AM] }
[10/2/2020 12:03:32 AM] }
[10/2/2020 12:03:32 AM] Loading functions metadata
[10/2/2020 12:03:32 AM] Workers Directory set to: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers
[10/2/2020 12:03:32 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/python/worker.config.json
[10/2/2020 12:03:32 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:32 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:python
[10/2/2020 12:03:32 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java/worker.config.json
[10/2/2020 12:03:32 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:32 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME_VERSION:
[10/2/2020 12:03:32 AM] Added WorkerConfig for language: java
[10/2/2020 12:03:32 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/powershell/worker.config.json
[10/2/2020 12:03:32 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:32 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:powershell
[10/2/2020 12:03:32 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/node/worker.config.json
[10/2/2020 12:03:32 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:03:32 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:node
[10/2/2020 12:03:32 AM] Worker path for language worker java: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java
[10/2/2020 12:03:32 AM] Reading functions metadata
[10/2/2020 12:03:32 AM] 0 functions found
[10/2/2020 12:03:32 AM] 0 functions loaded
[10/2/2020 12:03:32 AM] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /Users/miguel/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[10/2/2020 12:03:32 AM] Found a matching extension bundle at /Users/miguel/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2
[10/2/2020 12:03:32 AM] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredServiceT
at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 267
at Azure.Functions.Cli.ConsoleApp.RunAsyncT in D:\a1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 66
Application is shutting down...
[10/2/2020 12:04:47 AM] Skipping bundle download since it already exists at path /Users/miguel/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2
[10/2/2020 12:04:47 AM] Loading extension bundle from /Users/miguel/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2/bin
[10/2/2020 12:04:47 AM] Host configuration applied.
[10/2/2020 12:04:47 AM] Reading host configuration file '/Users/miguel/projects/bcp-ttib/azure/azure-function-demo/host.json'
[10/2/2020 12:04:47 AM] Host configuration file read:
[10/2/2020 12:04:47 AM] {
[10/2/2020 12:04:47 AM] "version": "2.0",
[10/2/2020 12:04:47 AM] "logging": {
[10/2/2020 12:04:47 AM] "logLevel": {
[10/2/2020 12:04:47 AM] "default": "Trace"
[10/2/2020 12:04:47 AM] }
[10/2/2020 12:04:47 AM] },
[10/2/2020 12:04:47 AM] "extensionBundle": {
[10/2/2020 12:04:47 AM] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[10/2/2020 12:04:47 AM] "version": "[1., 2.0.0)"
[10/2/2020 12:04:47 AM] }
[10/2/2020 12:04:47 AM] }
[10/2/2020 12:04:48 AM] Active host changing from '(null)' to 'f556025a-4d9f-49aa-8025-09b1a97cda4e'.
[10/2/2020 12:04:48 AM] Workers Directory set to: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers
[10/2/2020 12:04:48 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/python/worker.config.json
[10/2/2020 12:04:48 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:04:48 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:python
[10/2/2020 12:04:48 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java/worker.config.json
[10/2/2020 12:04:48 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:04:48 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME_VERSION:
[10/2/2020 12:04:48 AM] Added WorkerConfig for language: java
[10/2/2020 12:04:48 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/powershell/worker.config.json
[10/2/2020 12:04:48 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:04:48 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:powershell
[10/2/2020 12:04:48 AM] Found worker config: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/node/worker.config.json
[10/2/2020 12:04:48 AM] EnvironmentVariable FUNCTIONS_WORKER_RUNTIME: java
[10/2/2020 12:04:48 AM] FUNCTIONS_WORKER_RUNTIME set to java. Skipping WorkerConfig for language:node
[10/2/2020 12:04:48 AM] Worker path for language worker java: /usr/local/Cellar/azure-functions-core-tools@3/3.0.2881/workers/java
[10/2/2020 12:04:48 AM] Initializing Warmup Extension.
[10/2/2020 12:04:48 AM] Initializing Host. OperationId: 'f05319ac-79c7-44bb-a2df-cae02255cf44'.
[10/2/2020 12:04:48 AM] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=f05319ac-79c7-44bb-a2df-cae02255cf44
[10/2/2020 12:04:48 AM] Host startup operation 'f05319ac-79c7-44bb-a2df-cae02255cf44' was canceled.
[10/2/2020 12:04:48 AM] Startup operation 'f05319ac-79c7-44bb-a2df-cae02255cf44' completed.
[10/2/2020 12:04:48 AM] Initialization cancellation requested by runtime.
[10/2/2020 12:04:48 AM] Shuttingdown Rpc Channels Manager
[10/2/2020 12:04:48 AM] Shutting down language worker channels for runtime:java
[10/2/2020 12:04:48 AM] Stopping host...
[10/2/2020 12:04:48 AM] Active host changing from 'f556025a-4d9f-49aa-8025-09b1a97cda4e' to '(null)'.
[10/2/2020 12:04:48 AM] Hosting stopping
[10/2/2020 12:04:48 AM] Hosting stopped
[10/2/2020 12:04:48 AM] Disposing ScriptHost.
[10/2/2020 12:04:48 AM] Disposing FunctionDispatcher
[10/2/2020 12:04:48 AM] Host shutdown completed.
[10/2/2020 12:04:48 AM] Shutting down RPC server
[10/2/2020 12:04:48 AM] Disposing MetricsEventManager
Seeing a similar issue to the original comment. @anthonychu your comment on it possibly being a DI issue sounds compelling based on this stack trace.
Azure Functions Core Tools (3.0.2931 Commit hash: d552c6741a37422684f0efab41d541ebad2b2bd2)
Function Runtime Version: 3.0.14492.0
[2020-10-13T17:15:58.908] Starting metrics publisher for container : recipes. Publishing endpoint is https://:31002/api/metrics
[2020-10-13T17:15:59.032] Initializing LinuxContainerInitializationService.
[2020-10-13T17:15:59.033] No host context specified. Waiting for host assignment
[2020-10-13T17:15:59.033] Initializing LinuxContainerActivityPublisher
[2020-10-13T17:15:59.033] Starting LinuxContainerActivityPublisher
[2020-10-13T17:15:59.062] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: 'a94583fe-9860-4eb4-a123-4c1b78b16dc9'
[2020-10-13T17:15:59.095] Reading host configuration file '/Users/creator/Desktop/my-food-project/recipe-scraper/host.json'
[2020-10-13T17:15:59.097] Host configuration file read:
[2020-10-13T17:15:59.097] {
[2020-10-13T17:15:59.097] "version": "2.0",
[2020-10-13T17:15:59.097] "functions": [
[2020-10-13T17:15:59.097] "CrawlRecipe",
[2020-10-13T17:15:59.097] "StoreRecipe"
[2020-10-13T17:15:59.097] ],
[2020-10-13T17:15:59.097] "logging": {
[2020-10-13T17:15:59.097] "fileLoggingMode": "always"
[2020-10-13T17:15:59.097] },
[2020-10-13T17:15:59.097] "extensionBundle": {
[2020-10-13T17:15:59.097] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[2020-10-13T17:15:59.097] "version": "[1.*, 2.0.0)"
[2020-10-13T17:15:59.097] }
[2020-10-13T17:15:59.097] }
[2020-10-13T17:15:59.123] Loading functions metadata
[2020-10-13T17:15:59.144] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[2020-10-13T17:15:59.146] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[2020-10-13T17:15:59.146] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[2020-10-13T17:15:59.148] Reading functions metadata
[2020-10-13T17:15:59.163] 2 functions found
[2020-10-13T17:15:59.173] 2 functions loaded
[2020-10-13T17:15:59.177] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[2020-10-13T17:15:59.177] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /Users/creator/site/wwwroot/.azureFunctions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[2020-10-13T17:15:59.178] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /Users/creator/data/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[2020-10-13T17:15:59.180] Found a matching extension bundle at /Users/creator/data/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2
[2020-10-13T17:15:59.181] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[2020-10-13T17:15:59.624] Skipping bundle download since it already exists at path /Users/creator/data/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2
[2020-10-13T17:15:59.629] Loading extension bundle from /Users/creator/data/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.3.2/bin_v3/linux-x64
[2020-10-13T17:15:59.632] Loading startup extension 'AzureStorage'
[2020-10-13T17:15:59.676] A host error has occurred during startup operation 'a94583fe-9860-4eb4-a123-4c1b78b16dc9'.
[2020-10-13T17:15:59.676] System.Private.CoreLib: An attempt was made to load a program with an incorrect format.
[2020-10-13T17:15:59.676] (0x8007000B).
Value cannot be null. (Parameter 'provider')
Application is shutting down...
[2020-10-13T17:15:59.693] Initialization cancellation requested by runtime.
[2020-10-13T17:15:59.695] Stopping LinuxContainerActivityPublisher
[2020-10-13T17:15:59.698] Stopping host...
[2020-10-13T17:15:59.698] Host shutdown completed.
I have checked the conn string like #1995 and other similars to it. Also tried deleting the extensions folder. Running this on macOS. The project was running locally up until i upgraded core-tools. Also running this on VS Code 1.50.0. Created a new functions project pointing to the same subscription and storage account and everything loads up correct.
Update & Solution
Turned out having CONTAINER_NAME as a key in the local.settings.json was the source of the above issue. Coding is humbling.
Wow @ClockerZadq. Glad you figured it out but that's quite unfortunate. The host looks for an environment variable named CONTAINER_NAME and uses it to make certain decisions.
@fabiocav Is there anything we could've done here to warn about using special variables like that?
Got similar output when added AddJsonFormatters() to Startup.cs (i want to specify json serialization settings):
Startup configuration:
builder.Services
.AddMvcCore()
._AddJsonFormatters()_
._AddJsonOptions_(options =>
{
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
options.SerializerSettings.MissingMemberHandling = MissingMemberHandling.Ignore;
});
And the output:
Azure Functions Core Tools (3.0.2931 Commit hash: d552c6741a37422684f0efab41d541ebad2b2bd2)
Function Runtime Version: 3.0.14492.0
[2020-10-18T16:01:34.052] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '2e09904f-4475-40a0-bfe9-715b8df1f278'
[2020-10-18T16:01:34.071] Reading host configuration file '...\bin\output\host.json'
[2020-10-18T16:01:34.081] Host configuration file read:
[2020-10-18T16:01:34.083] {
[2020-10-18T16:01:34.084] "version": "2.0",
[2020-10-18T16:01:34.085] "logging": {
[2020-10-18T16:01:34.086] "applicationInsights": {
[2020-10-18T16:01:34.088] "samplingExcludedTypes": "Request",
[2020-10-18T16:01:34.090] "samplingSettings": {
[2020-10-18T16:01:34.092] "isEnabled": true
[2020-10-18T16:01:34.095] }
[2020-10-18T16:01:34.096] }
[2020-10-18T16:01:34.097] }
[2020-10-18T16:01:34.098] }
[2020-10-18T16:01:34.106] Loading functions metadata
[2020-10-18T16:01:34.121] FUNCTIONS_WORKER_RUNTIME set to dotnet. Skipping WorkerConfig for language:java
[2020-10-18T16:01:34.126] FUNCTIONS_WORKER_RUNTIME set to dotnet. Skipping WorkerConfig for language:node
[2020-10-18T16:01:34.131] FUNCTIONS_WORKER_RUNTIME set to dotnet. Skipping WorkerConfig for language:powershell
[2020-10-18T16:01:34.134] FUNCTIONS_WORKER_RUNTIME set to dotnet. Skipping WorkerConfig for language:python
[2020-10-18T16:01:34.136] Reading functions metadata
[2020-10-18T16:01:34.150] 1 functions found
[2020-10-18T16:01:34.164] 1 functions loaded
[2020-10-18T16:01:34.169] Loading extensions from ...\bin\output\bin. BundleConfigured: False, PrecompiledFunctionApp: False, LegacyBundle: False
[2020-10-18T16:01:34.176] Loading startup extension 'Startup'
[2020-10-18T16:01:34.220] Loaded extension 'Startup' (1.0.0.0)
[2020-10-18T16:01:34.238] Loading startup extension 'CosmosDB'
[2020-10-18T16:01:34.240] Loaded extension 'CosmosDB' (3.0.7.0)
[2020-10-18T16:01:34.243] Loading startup extension 'AzureStorage'
[2020-10-18T16:01:34.245] Loaded extension 'AzureStorage' (4.0.3.0)
[2020-10-18T16:01:34.268] Reading host configuration file ...
[2020-10-18T16:01:34.270] Host configuration file read:
[2020-10-18T16:01:34.272] {
[2020-10-18T16:01:34.273] "version": "2.0",
[2020-10-18T16:01:34.274] "logging": {
[2020-10-18T16:01:34.275] "applicationInsights": {
[2020-10-18T16:01:34.277] "samplingExcludedTypes": "Request",
[2020-10-18T16:01:34.278] "samplingSettings": {
[2020-10-18T16:01:34.279] "isEnabled": true
[2020-10-18T16:01:34.282] }
[2020-10-18T16:01:34.284] }
[2020-10-18T16:01:34.285] }
[2020-10-18T16:01:34.287] }
[2020-10-18T16:01:34.309] A host error has occurred during startup operation '2e09904f-4475-40a0-bfe9-715b8df1f278'.
[2020-10-18T16:01:34.313] JournalContributor: Could not load type 'Microsoft.Extensions.DependencyInjection.MvcJsonMvcCoreBuilderExtensions' from assembly 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Value cannot be null. (Parameter 'provider')
Application is shutting down...
[2020-10-18T16:01:34.331] Initialization cancellation requested by runtime.
[2020-10-18T16:01:34.335] Stopping host...
[2020-10-18T16:01:34.337] Host shutdown completed.`
I'm getting this issue with a dotnet5 function project on windows. No dependency injection or anything as functions were created with func init and func new. Deleted extension bundle contents but no joy in fixing it. Moving to dotnetcore 3.1 looks to get around the issue.
Azure Functions Core Tools
Core Tools Version: 3.0.3160 Commit hash: 00aa7f43cc5c5f15241b5e6e5363256f19ceb990
Function Runtime Version: 3.0.14916.0[2020-12-29T17:13:48.182Z] A host error has occurred during startup operation '11765cce-cad0-4c58-b5f1-413de864cbb2'.
[2020-12-29T17:13:48.183Z] System.Private.CoreLib: Could not load type 'System.Diagnostics.DebuggerStepThroughAttribute' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Value cannot be null. (Parameter 'provider')
csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="4.0.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
}
}
}
Any updates, I'm experiencing this upgrading from 3.1 to 5.0
Same issue for me :
Azure Functions Core Tools
Core Tools Version: 3.0.3233 Commit hash: d1772f733802122a326fa696dd4c086292ec0171
Function Runtime Version: 3.0.15193.0Value cannot be null. (Parameter 'provider')
Having this error today trying to run our Azure Functions locally (Windows, using Visual Studio and command line)
Azure Functions Core Tools
Core Tools Version: 3.0.3284 Commit hash: 98bc25e668274edd175a1647fe5a9bc4ffb6887d
Function Runtime Version: 3.0.15371.0
[2021-02-18T19:48:13.508Z] A host error has occurred during startup operation 'a78d628b-b914-45a0-be72-69de17c3e83e'.
[2021-02-18T19:48:13.512Z] Microsoft.Azure.WebJobs.ServiceBus: Method not found: 'Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder Microsoft.Azure.WebJobs.WebJobsExtensionBuilderExtensions.ConfigureOptions(Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder, System.Action``3<Microsoft.Extensions.Configuration.IConfiguration,System.String,!!0>)'.
Value cannot be null. (Parameter 'provider')
Installed the npm package to run on the command line using func host start, and got the same error. Rolled back the npm package to version 3.0.3233, and do NOT get the error; project runs successfully. Is this a problem with the current version (3.0.3284) or runtime?
Runs successfully with:
Core Tools Version: 3.0.3233 Commit hash: d1772f733802122a326fa696dd4c086292ec0171
Function Runtime Version: 3.0.15193.0
Having this error today trying to run our Azure Functions locally (Windows, using Visual Studio and command line)
Azure Functions Core Tools Core Tools Version: 3.0.3284 Commit hash: 98bc25e668274edd175a1647fe5a9bc4ffb6887d Function Runtime Version: 3.0.15371.0
[2021-02-18T19:48:13.508Z] A host error has occurred during startup operation 'a78d628b-b914-45a0-be72-69de17c3e83e'. [2021-02-18T19:48:13.512Z] Microsoft.Azure.WebJobs.ServiceBus: Method not found: 'Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder Microsoft.Azure.WebJobs.WebJobsExtensionBuilderExtensions.ConfigureOptions(Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder, System.Action3)'. Value cannot be null. (Parameter 'provider') `` Installed the npm package to run on the command line using func host start, and got the same error. Rolled back the npm package to version 3.0.3233, and do NOT get the error; project runs successfully. Is this a problem with the current version (3.0.3284) or runtime?
Runs successfully with:
Core Tools Version: 3.0.3233 Commit hash: d1772f733802122a326fa696dd4c086292ec0171 Function Runtime Version: 3.0.15193.0
Same issue for me :
Azure Functions Core Tools
Core Tools Version: 3.0.3233 Commit hash: d1772f7
Function Runtime Version: 3.0.15193.0
Value cannot be null. (Parameter 'provider')
After i removed the extensionBundle section from host.json it started working for me.

I have had this issue for almost a year now on my Windows machine. The last version that worked for me was "3.0.2798". I have tried many different versions after that including "3.0.3233" as well as the latest. All give this error:
Value cannot be null. (Parameter 'provider')
But this is also only an issue when I run a Java project from VS Code. Java and running "func host start" manually works. Node.js projects also work both manually and from VS Code. This is all on the same machine.
When I delete the "ExtensionsBundles" from either "\Temp\Functions" or from ".azure-functions-core-tools\Functions" then that folder is never downloaded before I get the error.
Removing "extensionBundle" from the "host.json" file doesn't do any difference for me.
There are two more people in my team that also experience the exact same issue. Even when changing to new computers we get the same issue.
It would be really good if a solution for this could be found. Right now I can't upgrade to Node.js 14 because I need to run this older version which doesn't support Node.js 14.
Most helpful comment
After i removed the extensionBundle section from host.json it started working for me.