Azure / Azure/azure-functions-host
ArgumentNullException in FunctionInvocationMiddleware
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
System.ArgumentNullException : Value cannot be null. Parameter name: logger at Microsoft.AspNetCore.Routing.RouteConstraintMatcher.Match(IDictionary`2 constraints,RouteValueDictionary routeValues,HttpContext httpContext,IRouter route,RouteDirection routeDirection,ILogger logger) at Microsoft.AspNetCore.Routing.RouteBase.RouteAsync(RouteContext context) at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.FunctionInvocationMiddleware.Invoke(HttpContext context) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/FunctionInvocationMiddleware.cs : 52 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.DefaultMiddlewarePipeline.<>c.b__7_0(??) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/JobHostMiddleware/DefaultMiddlewarePipeline.cs : 31 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.HstsConfigurationMiddleware.<>c.<-ctor>b__1_0(??) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/HstsConfigurationMiddleware.cs : 24 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.HstsConfigurationMiddleware.Invoke(HttpContext context,RequestDelegate next) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/HstsConfigurationMiddleware.cs : 42 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.DefaultMiddlewarePipeline.<>c__DisplayClass8_1.b__1(??) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/JobHostMiddleware/DefaultMiddlewarePipeline.cs : 45 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.CustomHttpHeadersMiddleware.Invoke(HttpContext context,RequestDelegate next) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/CustomHttpHeadersMiddleware.cs : 24 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.DefaultMiddlewarePipeline.<>c__DisplayClass8_1.b__1(??) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/JobHostMiddleware/DefaultMiddlewarePipeline.cs : 45 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.JobHostPipelineMiddleware.Invoke(HttpContext httpContext,IJobHostMiddlewarePipeline middleware) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/JobHostPipelineMiddleware.cs : 26 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.ResponseContextItemsCheckMiddleware.Invoke(HttpContext context) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/ResponseContextItemsCheckMiddleware.cs : 29 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.HttpThrottleMiddleware.Invoke(HttpContext httpContext,IOptions`1 httpOptions,HttpRequestQueue requestQueue,HostPerformanceManager performanceManager,IMetricsLogger metricsLogger) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/HttpThrottleMiddleware.cs : 66 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.HomepageMiddleware.Invoke(HttpContext context) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/HomepageMiddleware.cs : 34 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Buffering.ResponseBufferingMiddleware.Invoke(HttpContext httpContext) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/Buffering/ResponseBufferingMiddleware.cs : 38 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.ExceptionMiddleware.Invoke(HttpContext context) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/ExceptionMiddleware.cs : 28
More logs at
FunctionsLogs
| where PreciseTimeStamp >= datetime(2019-10-30 05:48:15.9534875) - 1d
| where PreciseTimeStamp <= datetime(2019-10-30 05:48:15.9534875) + 1d
| where SourceNamespace == "SFLWAWS"
| where EventStampName == "waws-prod-db3-101"
| where RoleInstance == "App-7DDC630C-637080110142930365"
| order by todatetime(EventTimestamp) asc
| where Level < 3
| project Details, Level
| |
-- | -- | --
| Details | Level
| System.ArgumentNullException : Value cannot be null. Parameter name: logger at Microsoft.AspNetCore.Routing.RouteConstraintMatcher.Match(IDictionary`2 constraints,RouteValueDictionary routeValues,HttpContext httpContext,IRouter route,RouteDirection routeDirection,ILogger logger) at Microsoft.AspNetCore.Routing.RouteBase.RouteAsync(RouteContext context) at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.Middleware.FunctionInvocationMiddleware.Invoke(HttpContext context) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/FunctionInvocationMiddleware.cs : 52 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.DefaultMiddlewarePipeline.<>c.b__7_0(??) at /azure-functions-host-4db83a0cac4a8c27d03aaeedc384f11034227340/src/WebJobs.Script.WebHost/Middleware/JobHostMiddleware/DefaultMiddlewarePipeline.cs : 31 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Middleware.HstsConfigurationMiddleware.<>c.<-ctor>b__1_0(??) at /azure-functions-host-4db83a0cac4a8c27d0... | 2
Contributor guide
Research direction
Start by reading WebJobs.Script.WebHost/Middleware/FunctionInvocationMiddleware.cs around line 52 and trace the routing call shown in the stack trace. The report provides logs but no reproduction steps, expected behavior, or named test, so the failure conditions and completion criteria need to be established before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100