-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Description
With app insights enabled, I've seen the following failures when executing HTTP triggered functions from the portal:
System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'LoggerFactory'.
at Microsoft.Extensions.Logging.LoggerFactory.CreateLogger(String categoryName)
at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\WebScriptHostManager.cs : 183
at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ProcessRequestAsync(HttpRequestMessage request,FunctionDescriptor function,CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Controllers\FunctionsController.cs : 110
at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Controllers\FunctionsController.cs : 57
at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func`3 processRequestHandler,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Controllers\FunctionsController.cs : 59
at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Handlers\SystemTraceHandler.cs : 50
at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Handlers\WebScriptHostHandler.cs : 63
at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
Unfortunately I don't have a reliable repro - I suspect there is a race. I'm also not sure yet if this is a script level bug or a SDK bug.