Azure / Azure/azure-functions-durable-js

Failed: node exited with code 1

Open
#543 3 comments 0 reactions 0 assignees View on GitHub
Debuggability Needs: Attention :wave: P3 programming model 🚀
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

**Describe the bug**
Functions are randomly failing without any details on the error that caused the failure.

**Investigative information**

- Azure Functions extension version: 4.0.0-alpha.1
- durable-functions npm module version: 3.0.0-alpha.5
- Language (JavaScript/TypeScript) and version: Typescript
- Node.js version: 18.12.1

***If deployed to Azure App Service***

- Timeframe issue observed: 2023-09-21 11:11:24.162
- Function App name: ****links-node-v2
- Function name(s): Functions.durableActScrapeWebsite
- Region: SouthEastAsia
- Orchestration instance ID(s): 0e095b528fe4425caa3a1f8e673f491e

> If you don't want to share your Function App name or Functions names on GitHub, please be sure to provide your Invocation ID, Timestamp, and Region - we can use this to look up your Function App/Function. Provide an invocation id per Function. See the [Functions Host wiki](https://github.com/Azure/azure-webjobs-sdk-script/wiki/Sharing-Your-Function-App-name-privately) for more details.

**To Reproduce**
A long running operation

> While not required, providing your orchestrator's source code in anonymized form is often very helpful when investigating unexpected orchestrator behavior.

**Expected behavior**
It shouldn't have crashed and if it did, there should be an error to understand what caused the error

**Actual behavior**
Here's the output of get status
```
{
"name": "durableScraping",
"instanceId": "0e095b528fe4425caa3a1f8e673f491e",
"runtimeStatus": "Failed",
"input": "jooble.org",
"customStatus": null,
"output": "Orchestrator function 'durableScraping' failed: Activity function 'durableActScrapeWebsite' failed: node exited with code 1 (0x1) \n {\"$type\":\"Microsoft.Azure.WebJobs.Script.Workers.WorkerProcessExitException, Microsoft.Azure.WebJobs.Script\",\"Message\":\"node exited with code 1 (0x1)\",\"Data\":{\"$type\":\"System.Collections.ListDictionaryInternal, System.Private.CoreLib\"},\"InnerException\":{\"$type\":\"System.Exception, System.Private.CoreLib\",\"ClassName\":\"System.Exception\",\"Message\":\"\",\"Data\":null,\"InnerException\":null,\"HelpURL\":null,\"StackTraceString\":null,\"RemoteStackTraceString\":null,\"RemoteStackIndex\":0,\"ExceptionMethod\":null,\"HResult\":-2146233088,\"Source\":null,\"WatsonBuckets\":null},\"HelpLink\":null,\"Source\":\"System.Private.CoreLib\",\"HResult\":-2146233088,\"StackTrace\":\" at Microsoft.Azure.WebJobs.Script.Description.WorkerFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in /src/azure-functions-host/src/WebJobs.Script/Description/Workers/WorkerFunctionInvoker.cs:line 101\\n at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in /src/azure-functions-host/src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 82\\n at Microsoft.Azure.WebJobs.Script.Description.FunctionGenerator.Coerce[T](Task`1 src) in /src/azure-functions-host/src/WebJobs.Script/Description/FunctionGenerator.cs:line 225\\n at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync(Object instance, Object[] arguments) in D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\Microsoft.Azure.WebJobs.Host\\\\Executors\\\\FunctionInvoker.cs:line 52\\n at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\Microsoft.Azure.WebJobs.Host\\\\Executors\\\\FunctionExecutor.cs:line 581\\n at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\Microsoft.Azure.WebJobs.Host\\\\Executors\\\\FunctionExecutor.cs:line 527\\n at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\\\\a\\\\_work\\\\1\\\\s\\\\src\\\\Microsoft.Azure.WebJobs.Host\\\\Executors\\\\FunctionExecutor.cs:line 306\"}",
"createdTime": "2023-09-21T10:50:05Z",
"lastUpdatedTime": "2023-09-21T11:48:46Z"
}
```

**Known workarounds**
None at this time

**Additional context**

- Development environment (ex. Visual Studio)
- Links to source
- Additional bindings used
- Function invocation IDs

Contributor guide

Open the contributing guide

Research direction

Start with the reported durableScraping orchestration and durableActScrapeWebsite activity, using the supplied instance ID and get-status output. Reproduce the long-running TypeScript operation and inspect the Azure Functions worker failure around WorkerFunctionInvoker.cs. Done means the activity either completes reliably or exposes the underlying error details when it fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, node.js, typescript
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.