Azure-functions-core-tools: Javascript Azure functions crash on [email protected]

Created on 17 Oct 2017  Â·  18Comments  Â·  Source: Azure/azure-functions-core-tools

This issue is also reproducible on Azure.

This seems to fail on Ubuntu and WSL, but works on OSX

[10/17/17 3:10:16 PM] A ScriptHost error has occurred
[10/17/17 3:10:16 PM] Exception while executing function: Functions.myTimer. System.Private.CoreLib: One or more errors occurred. (Worker process with pid 6507 exited with code 1) (Worker process with pid 6520 exited with code 1) (Worker process with pid 6529 exited with code 1). Worker process with pid 6507 exited with code 1.

Running [email protected] still works.

Let me know if you need more information

Most helpful comment

This bug is still happening. Even blank functions throw that exception. No matter with node version is being used (I tried 8.9.4, 8.5.0 and 8.4.0). Happen with beta.18 but also with last version (beta.22)

Repair this should have hightest priority.

All 18 comments

Getting the same issue running on Azure right now:

Runtime version: 2.0.11276.0 (beta)

Exception: Worker process with pid 5096 exited with code 1
Unknown location

AggregateException: One or more errors occurred. (Worker process with pid 5096 exited with code 1) (Worker process with pid 4912 exited with code 1) (Worker process with pid 3392 exited with code 1)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

FunctionInvocationException: Exception while executing function: Functions.CreateFormatFile
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

System.AggregateException: One or more errors occurred. (Worker process with pid 5096 exited with code 1) (Worker process with pid 4912 exited with code 1) (Worker process with pid 3392 exited with code 1) ---> System.Exception: Worker process with pid 5096 exited with code 1
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Script.Description.WorkerLanguageInvoker.d__6.MoveNext() in C:azure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionWorkerWorkerLanguageInvoker.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.d__31.MoveNext() in C:azure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionFunctionInvokerBase.cs:line 95
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.<InvokeAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.<InvokeAsync>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.d__16.MoveNext()
---> (Inner Exception #0) System.Exception: Worker process with pid 5096 exited with code 1<---

---> (Inner Exception #1) System.Exception: Worker process with pid 4912 exited with code 1<---

---> (Inner Exception #2) System.Exception: Worker process with pid 3392 exited with code 1<---

Same. I created a new JavaScript timerTrigger. Ran it on version `~1~ and it executed fine.

I switched the version to BETA and ran it again and got:

2017-10-26T14:17:55  Welcome, you are now connected to log-streaming service.
2017-10-26T14:17:57.938 Function started (Id=b196bcc3-c8ae-493e-84c7-9e037dba7141)
2017-10-26T14:17:58.565 Exception while executing function: Functions.Wrike. System.Private.CoreLib: One or more errors occurred. (Worker process with pid 7820 exited with code 1) (Worker process with pid 6964 exited with code 1) (Worker process with pid 6436 exited with code 1). Worker process with pid 7820 exited with code 1.
2017-10-26T14:17:58.907 Function completed (Failure, Id=b196bcc3-c8ae-493e-84c7-9e037dba7141, Duration=957ms)

This is likely because you're not using the right Node.js version. I'll be adding some support to help detect this soon. Could you confirm which Node.js version you're using?

I believe ~1.x runtime has Node.JS version 6.5 as the locked choice?
v

On Thu, Nov 16, 2017 at 5:29 PM, Christopher Anderson <
[email protected]> wrote:

This is likely because you're not using the right Node.js version. I'll be
adding some support to help detect this soon. Could you confirm which
Node.js version you're using?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-functions-cli/issues/280#issuecomment-345083611,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEOYmPbfD59onKdTd6klTGwKPonQASW2ks5s3LcygaJpZM4P8VGZ
.

It is. For BETA, please make sure it's set to 8.4.0 or above. If you use the toggle in the Function App Settings menu it should do this for you, but there could be a bug.

@christopheranderson I was using node 8.5.0 at the moment.
Also the issue was reproducible on Azure as well, see issue: https://github.com/Azure/azure-webjobs-sdk-script/issues/2126

For your issue, @nelak if you're using 8.5.0, do you get the same exit code error? You should be getting a 500 error because we don't support "raw" in v2 yet. (See this PR: https://github.com/Azure/azure-webjobs-sdk-script/pull/2064)

I was able to solve my problem by updating my Node to latest version. All good here. @christopheranderson

@christopheranderson It seems some kind of bug made it into .beta.18 if you go back to that version you can reproduce it really easy things go down by just running func host start.

image

It's highly likely the bad build made it to Azure causing the issues I was seeing in Azure/azure-webjobs-sdk-script#2126 but completely unrelated to the raw pending implementation.
From what I can see it seems that the regression has already been fixed around version .beta.21 as the issue is no longer reproducible locally.

image

Still it makes me wonder why .beta.18 worked on OSX but not on WSL. It might be worth looking at that build to understand what caused the breakage.

This bug is still happening. Even blank functions throw that exception. No matter with node version is being used (I tried 8.9.4, 8.5.0 and 8.4.0). Happen with beta.18 but also with last version (beta.22)

Repair this should have hightest priority.

I am using beta.23 with node 8.4.0 and I also tried 8.9.4. The issue still persists. So it is not possible to run any node.js function whatsoever right now?

i'm using 2.0.1-beta.24 , node 9.8.0 & npm 5.7.1 with the same issue. (Javascript HttpTrigger function)
even following the steps in the tutorial will bring 500 error.

Facing the same issue here.

@IamNguele Apparently, deleting your function and copy-pasting the code into an identical new function sometimes helps. It helped me once or twice.

Also, make sure your code is not simply throwing an exception due to missing packages, bug or anything else, because that will also cause an identical error message.

Hey @catcher-in-the-try didn't work for me but deleted the whole code and rewrote everything then it worked. Still no idea why it wasn't working. Probably a bug I didn't catch.

Seems like it is still not resolved
Using Runtime version 2.0.1.0 (beta)

Issue still persists in using 2.0.1-beta.28. :(

Closing this, please reopen if it still the case in the latest version

Was this page helpful?
0 / 5 - 0 ratings