Open SOFSPEEL opened 7 months ago
I was also experiencing this issue when running the image from: mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0
Exception was being thrown from the same place as in OP's stacktrace (HttpApiHandler.cs, GetWebhookUri method.)
return this.webhookUrlProvider?.Invoke() ?? throw new InvalidOperationException("Webhooks are not configured");
Following mention of this exception message in a previous issue HttpStart failure: Webhooks are not configured, I was able to workaround by adding the following Env variable to my container: WEBSITE_HOSTNAME=localhost:80 Which I guess isn't an acceptable workaround for a deployed container (?), but was sufficient in my case because the container was only being used for local integration testing.
@epDugas, thanks for your feedback, so when I attempt to set the host as you mentioned (and other variations)
then this startup exception shows up, in other words, without setting the WEBSITE_HOSTNAME, the code makes it thru initialization.
What is so weird about the exception above is why is the code even doing anything with a webhook when calling into an orchestator function.
system.Net.Http.HttpRequestException:
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode (System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at Microsoft.Azure.WebJobs.Script.WebHost.SimpleKubernetesClient+<UpdateSecrets>d__17.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/SimpleKubernetesClient.cs:84)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.KubernetesSecretsRepository+<WriteAsync>d__16.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/KubernetesSecretsRepository.cs:71)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.SecretManager+<PersistSecretsAsync>d__47`1.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/SecretManager.cs:731)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.SecretManager+<ModifyFunctionSecretsAsync>d__30.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/SecretManager.cs:465)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.SecretManager+<AddOrUpdateSecretAsync>d__28.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/SecretManager.cs:405)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.SecretManager+<AddOrUpdateFunctionSecretAsync>d__23.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/KeyManagement/SecretManager.cs:275)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.DefaultScriptWebHookProvider+<GetOrCreateExtensionKey>d__7.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/WebHooks/DefaultScriptWebHookProvider.cs:82)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.WebHost.DefaultScriptWebHookProvider.GetExtensionWebHookRoute (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/WebHooks/DefaultScriptWebHookProvider.cs:67)
at Microsoft.Azure.WebJobs.Script.WebHost.DefaultScriptWebHookProvider.GetUrl (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/WebHooks/DefaultScriptWebHookProvider.cs:52)
at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskExtension.Microsoft.Azure.WebJobs.Host.Config.IExtensionConfigProvider.Initialize (Microsoft.Azure.WebJobs.Extensions.DurableTask, Version=3.0.0.0, Culture=neutral, PublicKeyToken=014045d636e89289: D:\a\_work\1\s\src\WebJobs.Extensions.DurableTask\DurableTaskExtension.cs:368)
at Microsoft.Azure.WebJobs.Host.DefaultExtensionRegistryFactory.Create (Microsoft.Azure.WebJobs.Host, Version=3.0.39.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\DefaultExtensionRegistryFactory.cs:38)
at Microsoft.Azure.WebJobs.WebJobsServiceCollectionExtensions+<>c.<AddWebJobs>b__3_0 (Microsoft.Azure.WebJobs.Host, Version=3.0.39.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsServiceCollectionExtensions.cs:58)
at DryIoc.Microsoft.DependencyInjection.DryIocAdapter+<>c__DisplayClass3_0.<RegisterDescriptor>b__0 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/DryIocAdapter.cs:162)
at DryIoc.Registrator+<>c__DisplayClass27_0.<RegisterDelegate>b__0 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:4550)
at DryIoc.Factory+<>c__DisplayClass26_0.<ApplyReuse>b__2 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6605)
at DryIoc.Scope.TryGetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7849)
at DryIoc.Scope.GetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7834)
at DryIoc.Factory.ApplyReuse (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6604)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6564)
at DryIoc.Factory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6634)
at DryIoc.DelegateFactory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7740)
at DryIoc.Container.DryIoc.IResolver.Resolve (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:290)
at lambda_method1067 (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
at DryIoc.Factory+<>c__DisplayClass26_0.<ApplyReuse>b__2 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6605)
at DryIoc.Scope.TryGetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7849)
at DryIoc.Scope.GetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7834)
at DryIoc.Factory.ApplyReuse (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6604)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6564)
at DryIoc.Factory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6634)
at DryIoc.Container.ResolveAndCacheDefaultFactoryDelegate (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:210)
at DryIoc.Container.DryIoc.IResolver.Resolve (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:195)
at Microsoft.Azure.WebJobs.Script.WebHost.DependencyInjection.JobHostServiceProvider.GetService (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/JobHostServiceProvider.cs:99)
at Microsoft.Azure.WebJobs.Script.WebHost.DependencyInjection.JobHostServiceProvider.GetRequiredService (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/JobHostServiceProvider.cs:82)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at Microsoft.Azure.WebJobs.WebJobsServiceCollectionExtensions+<>c.<AddWebJobs>b__3_6 (Microsoft.Azure.WebJobs.Host, Version=3.0.39.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: D:\a\_work\1\s\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsServiceCollectionExtensions.cs:100)
at DryIoc.Microsoft.DependencyInjection.DryIocAdapter+<>c__DisplayClass3_0.<RegisterDescriptor>b__0 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/DryIocAdapter.cs:162)
at DryIoc.Registrator+<>c__DisplayClass27_0.<RegisterDelegate>b__0 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:4550)
at DryIoc.Factory+<>c__DisplayClass26_0.<ApplyReuse>b__2 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6605)
at DryIoc.Scope.TryGetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7849)
at DryIoc.Scope.GetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7834)
at DryIoc.Factory.ApplyReuse (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6604)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6564)
at DryIoc.Factory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6634)
at DryIoc.DelegateFactory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7740)
at DryIoc.Container.DryIoc.IResolver.Resolve (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:290)
at lambda_method1065 (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
at DryIoc.Factory+<>c__DisplayClass26_0.<ApplyReuse>b__2 (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6605)
at DryIoc.Scope.TryGetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7849)
at DryIoc.Scope.GetOrAdd (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7834)
at DryIoc.Factory.ApplyReuse (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6604)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6564)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7083)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6554)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:7083)
at DryIoc.Factory.GetExpressionOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6554)
at DryIoc.Factory.GetDelegateOrDefault (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:6634)
at DryIoc.Container.ResolveAndCacheDefaultFactoryDelegate (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:210)
at DryIoc.Container.DryIoc.IResolver.Resolve (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs:195)
at Microsoft.Azure.WebJobs.Script.WebHost.DependencyInjection.JobHostServiceProvider.GetService (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/JobHostServiceProvider.cs:99)
at Microsoft.Azure.WebJobs.Script.WebHost.DependencyInjection.JobHostServiceProvider.GetService (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/DependencyInjection/JobHostServiceProvider.cs:77)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService (Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService+<UnsynchronizedStartHostAsync>d__57.MoveNext (Microsoft.Azure.WebJobs.Script.WebHost, Version=4.33.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:343)
What version of .NET does your existing project use?
.NET 6
What version of .NET are you attempting to target?
.NET 8
Description
So I converted my Function App to be
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
by following this article: https://learn.microsoft.com/en-us/azure/azure-functions/migrate-dotnet-to-isolated-model?tabs=net8It's running under kubernetes so my DockerFile uses the following image:
I can run the function app without problems when I run locally (using Rider IDE), and also when running in an Azure Function app, but when I run under Kubernetes I get the following exception: I want to point out that the function here is a cosmos trigger function that calls into an Orchestration (i.e. the DurableTask stuff in the ex) and it is failing somewhere in the DurableTask code.
Note that I was able to run my function app without issue prior to upgrading to isolated worker.
Project configuration and dependencies
Link to a repository that reproduces the issue
No response