Azure 持久函数 (Node.JS) 错误 "Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'."
Azure Durable Function (Node.JS) error "Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'."
我是 运行 Azure Function App 平台上的一组持久函数(Node.js-编写的)。
节点版本为 10,函数运行时为 2.
其中一些已配置触发器:
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"post"
]
},
{
"bindings": [
{
"name": "name",
"type": "activityTrigger",
"direction": "in"
}
],
"scriptFile": "../.../index.js"
}
从昨天开始,该函数在尝试打开时显示以下错误:
Function (func4/Create) Error: Microsoft.Azure.WebJobs.Host: Error indexing method
'Functions.Create'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type
'System.String'.
Session Id: 9b3d1a97c12b4c86b751b08ab17c06da
Timestamp: 2019-12-11T19:04:49.345Z
我不知道是什么导致了这种行为。
Kudu 日志也充满了同样的错误,但没有详细信息。
已更新(依赖项):
"dependencies": {
"axios": "^0.19.0",
"durable-functions": "^1.3.1",
"moment": "^2.24.0",
"momentjs": "^2.0.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.8",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@azure/functions": "^1.0.2-beta2",
"typescript": "^3.3.3"
}
请注意Azure durable functions
不支持typescript
.
如果你使用JavaScript,它可以支持Azure持久化功能。
看看Offical doc。
问题出在 data
名词中,它似乎是 Azure Functions 中的保留字。
当我将名称从 data
更改为另一个名称(此处为 context
)时,错误消失了:
{
"bindings": [
{
"name": "context",
"type": "activityTrigger",
"direction": "in"
}
],
"scriptFile": "../dist/Container/index.js"
}
不幸的是,此信息未在任何地方记录,我在尝试测试不同的假设时得到了线索。
我是 运行 Azure Function App 平台上的一组持久函数(Node.js-编写的)。
节点版本为 10,函数运行时为 2.
其中一些已配置触发器:
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"post"
]
},
{
"bindings": [
{
"name": "name",
"type": "activityTrigger",
"direction": "in"
}
],
"scriptFile": "../.../index.js"
}
从昨天开始,该函数在尝试打开时显示以下错误:
Function (func4/Create) Error: Microsoft.Azure.WebJobs.Host: Error indexing method
'Functions.Create'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type
'System.String'.
Session Id: 9b3d1a97c12b4c86b751b08ab17c06da
Timestamp: 2019-12-11T19:04:49.345Z
我不知道是什么导致了这种行为。
Kudu 日志也充满了同样的错误,但没有详细信息。
已更新(依赖项):
"dependencies": {
"axios": "^0.19.0",
"durable-functions": "^1.3.1",
"moment": "^2.24.0",
"momentjs": "^2.0.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.8",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@azure/functions": "^1.0.2-beta2",
"typescript": "^3.3.3"
}
请注意Azure durable functions
不支持typescript
.
如果你使用JavaScript,它可以支持Azure持久化功能。
看看Offical doc。
问题出在 data
名词中,它似乎是 Azure Functions 中的保留字。
当我将名称从 data
更改为另一个名称(此处为 context
)时,错误消失了:
{
"bindings": [
{
"name": "context",
"type": "activityTrigger",
"direction": "in"
}
],
"scriptFile": "../dist/Container/index.js"
}
不幸的是,此信息未在任何地方记录,我在尝试测试不同的假设时得到了线索。