Azure-functions-host: 1.0.12 - Function can not be invoked from Azure WebJobs SDK

Created on 30 Mar 2018  路  3Comments  路  Source: Azure/azure-functions-host

We upgraded our functions project to 1.0.12 this afternoon and can't use any of the http trigger endpoints anymore. When making a request, this exception is thrown:

System.InvalidOperationException : 'Function1' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?
 at Microsoft.Azure.WebJobs.JobHost.Validate(IFunctionDefinition function,Object key)
 at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??) 
at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary`2 arguments,CancellationToken cancellationToken)
 at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken)
 at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager)
 at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??)
 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 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.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) 
at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) 
at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)

I tried a fresh project with only the sample http trigger function and no added dependencies. I believe the SDK version was 1.0.9. Everything worked fine. After upgrading the package to 1.0.12 and changing the TraceWriter param to ILogger, the cli starts fine and everything looks normal, but any requests result in the same exception.

Not sure what the WebJobs SDK attribute is, no mention in any documentation that I've found so far.

Most helpful comment

1.0.11

I was looking for the solution from last 2 days. And now I understand that newer versions of Microsoft.Net.sdk.Functions relased are full of bugs which was the major cause of error in my function. Thanks to @pragnagopa switching to version 1.0.11 resolved it. I wonder why Microsoft released version that does not work. Totally unacceptable.

All 3 comments

We have identified the bug. Issue is being tracked here
For now, as a workaround, please use Microsoft.Net.SDK.Functions 1.0.11

Closing. Issue should be resolved now.

1.0.11

I was looking for the solution from last 2 days. And now I understand that newer versions of Microsoft.Net.sdk.Functions relased are full of bugs which was the major cause of error in my function. Thanks to @pragnagopa switching to version 1.0.11 resolved it. I wonder why Microsoft released version that does not work. Totally unacceptable.

Was this page helpful?
0 / 5 - 0 ratings