Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FunctionInvocationException thrown when triggering a js HttpTrigger(template) in v1.0.11 core tool #446

Closed
JohnReeson opened this issue Apr 27, 2018 · 3 comments

Comments

@JohnReeson
Copy link

I install v1.0.11 function core tool and create a httptrigger template locally.
Node: v8.11.1 OS: Windows 10

When I run the function app, it starts successfully. But when I trigger the js httptrigger(a template), exception thrown

Exception while executing function: Functions.myjstrigger -> One or more errors occurred. -> Error: Cannot find module '../azurefunctions/functions.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at eval (eval at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), :1:23) at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16)

Same error happens when I try to use js blobtrigger, but for c#, http&blob trigger both work well.

Details

Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.myjstrigger ---> System.AggregateException : One or more errors occurred. ---> Error: Cannot find module '../azurefunctions/functions.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at eval (eval at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), :1:23) at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16) at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,CancellationToken cancellationToken) at EdgeJs.Edge.Func(String code) at Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.get_GlobalInitializationFunc() at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.InitializeAsync() at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.InvokeCore(Object[] parameters,FunctionInvocationContext context) at async Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) at async Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync[TReflected,TReturnType](TReflected instance,Object[] arguments) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.InvokeAsync[TReflected,TReturnValue](Object instance,Object[] arguments) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker,ParameterHelper parameterHelper,CancellationTokenSource timeoutTokenSource,CancellationTokenSource functionCancellationTokenSource,Boolean throwOnTimeout,TimeSpan timerInterval,IFunctionInstance instance) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) ---> (Inner Exception #0) System.Exception : Error: Cannot find module '../azurefunctions/functions.js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at eval (eval at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), :1:23) at compileFunc (C:\Users\UserName\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16)<--- End of inner exception at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken) at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw() at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??) at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary2 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,Func3 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)

@davidebbo
Copy link

@ahmelsayed
Copy link
Contributor

Fixed in 3f56214

I'm preparing an update now

@ahmelsayed
Copy link
Contributor

Just release 1.0.12 with the fix

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants