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

Javascript Azure functions crash on azure-functions-core-tools@2.0.1-beta.18 #280

Closed
nelak opened this issue Oct 17, 2017 · 18 comments
Closed
Assignees

Comments

@nelak
Copy link
Contributor

nelak commented Oct 17, 2017

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 azure-functions-core-tools@2.0.1-beta.17 still works.

Let me know if you need more information

@valorekhov
Copy link

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-script\src\WebJobs.Script\Description\Worker\WorkerLanguageInvoker.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-script\src\WebJobs.Script\Description\FunctionInvokerBase.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<---

@naknode
Copy link

naknode commented Oct 26, 2017

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)

@christopheranderson
Copy link

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?

@christopheranderson christopheranderson self-assigned this Nov 16, 2017
@valorekhov
Copy link

valorekhov commented Nov 16, 2017 via email

@christopheranderson
Copy link

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.

@nelak
Copy link
Contributor Author

nelak commented Nov 16, 2017

@christopheranderson I was using node 8.5.0 at the moment.
Also the issue was reproducible on Azure as well, see issue: Azure/azure-functions-host#2126

@christopheranderson
Copy link

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: Azure/azure-functions-host#2064)

@naknode
Copy link

naknode commented Nov 17, 2017

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

@nelak
Copy link
Contributor Author

nelak commented Nov 17, 2017

@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-functions-host#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.

@blackcid
Copy link

blackcid commented Feb 1, 2018

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.

@anton-bot
Copy link

anton-bot commented Mar 13, 2018

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?

@gregatcssi
Copy link

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.

@CodingNagger
Copy link

Facing the same issue here.

@anton-bot
Copy link

@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.

@CodingNagger
Copy link

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.

@Alexander-0x80
Copy link

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

@reggiepangilinan
Copy link

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

@ahmedelnably
Copy link
Contributor

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

@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 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