Azure / Azure/azure-functions-durable-js

Known regression: Activity input fails to deserialize when the input is an array

Open
#581 1 comment 0 reactions 0 assignees View on GitHub
known-regression
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

**Known regression notice:** Activity input fails to deserialize when the input is an array

**Error description:**
We have just noticed that users are experiencing errors in Durable Functions JS apps with an exception that includes `Exception binding parameter ''` and `Unexpected character encountered while parsing value`.

This issue started with Durable Functions version v2.13.0. The following extension bundles are affected:
- v4 bundles: 4.13.1
- v3 bundles: 3.30.1+

**Repro:**
Use an array type as an input to your activity function.

``` javascript
const { app } = require('@azure/functions');
const df = require('durable-functions');

const activityName = 'durableHello1';

df.app.orchestration('durableHello1Orchestrator', function* (context) {
const outputs = [];
outputs.push(yield context.df.callActivity(activityName, ["Tokyo", "Seattle", "Cairo"]));

return outputs;
});

df.app.activity(activityName, {
handler: (input) => {
return `Hello, ${input}`;
},
});

app.http('durableHello1HttpStart', {
route: 'orchestrators/{orchestratorName}',
extraInputs: [df.input.durableClient()],
handler: async (request, context) => {
const client = df.getClient(context);
const body = await request.text();
const instanceId = await client.startNew(request.params.orchestratorName, { input: body });

context.log(`Started orchestration with ID = '${instanceId}'.`);

return client.createCheckStatusResponse(request, instanceId);
},
});
```

**Incoming solution:**
We're issuing a hotfix extension bundles release that will automatically fix any apps that are hitting the issue described here. It will take a few days to roll out.

**Immediate Mitigation Options:**
There are two ways to fix this issue: Pinning the extension bundles version or manually installing the working Durable Functions extension version.

1) Pinning the extension bundles version - Update the extension bundles version in host.json to use v3.29.0 or v4.12.0.

Example:

```json

"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 4.13.0)"
},
```

2) Manually install Durable Functions extension version v2.12.0 or lower by following [these instructions.](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-register#explicitly-install-extensions)

Contributor guide

Open the contributing guide

Research direction

Start with the JavaScript activity and orchestration reproduction in the issue, then inspect the host.json extensionBundle settings and the explicitly installed Durable Functions extension version. The report names no repository file or test; done is confirmed when array inputs deserialize successfully after the extension-bundle hotfix or a documented version pin.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript, typescript
Domain
backend
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.