For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select Diagnose and solve problems from the left, and view relevant dashboards before opening your issue.
Investigative information
Please provide the following:
Timestamp: 2024-11-13 22:13:56.4826033 to 2024-11-13 22:19:42.4812748
Function App version: 4.1036.3.23284
Function App name: testfinnodeFGG
Function name(s) (as appropriate):HttpTrigger1
Invocation ID:
Region: East US
Repro steps
Provide the steps required to reproduce the problem:
1) Create a new Function App targeting Node 18 or 20 to allow Portal Create.
2) Try and add a Function via the Portal and see that it fails with 500 Server error.
3) The Function does get created but the Script Host restarts.
4) Pin back to 4.36.0 and try step 2 again. There are no errors.
Expected behavior
Provide a description of the expected behavior.
1) The Function create should not result in a 500 Server error.
Actual behavior
Provide a description of the actual behavior observed.
1) The Portal Function Function creation calls /admin/functions and this call returrns a 500 error but the files do get created.
2) The Host detects a file change notification from the Put and Initiates a restart.
3) There is an exception during the restart with this call stack.
System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier,ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Mvc.ObjectResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next,Scope& scope,Object& state,Boolean& isCompleted)
Check for a solution in the Azure portal
For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select
Diagnose and solve problems
from the left, and view relevant dashboards before opening your issue.Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
1) Create a new Function App targeting Node 18 or 20 to allow Portal Create. 2) Try and add a Function via the Portal and see that it fails with 500 Server error. 3) The Function does get created but the Script Host restarts. 4) Pin back to 4.36.0 and try step 2 again. There are no errors.
Expected behavior
Provide a description of the expected behavior.
1) The Function create should not result in a 500 Server error.
Actual behavior
Provide a description of the actual behavior observed.
1) The Portal Function Function creation calls /admin/functions and this call returrns a 500 error but the files do get created. 2) The Host detects a file change notification from the Put and Initiates a restart. 3) There is an exception during the restart with this call stack.
System.ObjectDisposedException : Cannot access a disposed object. Object name: 'IServiceProvider'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException() at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier,ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.AspNetCore.Mvc.ObjectResult.ExecuteResultAsync(ActionContext context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next,Scope& scope,Object& state,Boolean& isCompleted)
The ARM Template is from DataDog and an example deployment creates the Files in the ARM Template e.g datadog-serverless-functions/azure/deploy-to-azure/function_template.json at master · DataDog/datadog-serverless-functions
Known workarounds
Provide a description of any known workarounds.
Pin back to 4.36
Related information
Provide any related information