我有一个带有队列触发器并且可以按预期工作的功能2.0。
但是,从几天开始,有时候我意识到邮件没有被处理。我转到门户中的功能详细信息,然后看到以下错误:
The binding type(s) 'queueTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
当我直接尝试访问https://function_app_name.azurewebsites.net/
时,伴随着错误500。停止并重新启动应用程序后,它通常会再次开始工作。是否有发生相同行为的人?
我正在从VS Community Mac进行部署
答案 0 :(得分:0)
2.0.12050-alpha中有重大更改,您可以在doc中为功能选择两个选项。
一种方法是升级您的扩展程序并配置设置。您可以按照文档中的步骤进行操作。
另一种方法是,通过将应用程序设置FUNCTIONS_EXTENSION_VERSION
更新为2.0.11961-alpha,将功能应用程序固定到运行时的早期版本。您可以在如何避免受到影响的标题下获得详细信息。。
如果您仍有相关问题,可以让我知道或去here并检查是否有人遇到此问题。
答案 1 :(得分:0)
输出日志中出现相同的错误“ The binding type(s) 'queueTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
”
Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll
'func.exe' (CoreCLR: clrhost): Loaded …
不确定是否出了什么问题,但根据here的一些提示,我更新了所有nuget软件包,这些软件包均具有可用的更新版本,并且可以正常工作。
答案 2 :(得分:0)
您可以尝试删除与“功能”相关的本地临时文件夹 C:\ Users .... \ AppData \ Local \ Temp \ Functions \ ExtensionBundles
供参考:https://github.com/Azure/azure-functions-host/issues/4909#issuecomment-530148249
答案 3 :(得分:0)
我通过更新以下NuGet软件包的版本来解决此问题:
Microsoft.Azure.WebJobs.Extensions.Storage v3.0.4
Microsoft.NET.Sdk.Functions v1.0.2
最新版本。
Microsoft.Azure.WebJobs.Extensions.Storage v3.0.10
Microsoft.NET.Sdk.Functions v1.0.29
答案 4 :(得分:0)
同意Adrian Toman。
我所做的更改是:
import React from 'react'
interface State {
pokemon: number[],
id: number,
disables: number[]
}
class View extends React.Component<{}, State>{
constructor(props: any) {
super(props)
this.state = {
pokemon: [],
id: Number.NaN,
disables: []
}
}
renderCard = () => {
const getId = this.state.id
const newPoke = this.state.pokemon.includes(getId)
const disabled = newPoke || this.state.disables.includes(getId)
return (
<button disabled={disabled}></button>
)
}
renderPokemon = () => {
}
render() {
return this.renderCard()
}
}
export default View
这似乎可以解决问题。不过很奇怪。
我的时间表:
- <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.0" />
+ <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.10" />
- <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />
+ <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" />
因此在2019-09-23之后,天蓝色方面似乎发生了一些重大变化。
答案 5 :(得分:0)
我面临着同样的问题。最终,我根据following doc在 host.config 中手动注册了扩展捆绑包。
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}
此外,这是我引用的NuGet软件包的摘要,以防万一:
<PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.14" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.10" />
<PackageReference Include="Microsoft.Data.OData" Version="5.8.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.5.3" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
答案 6 :(得分:0)
将v1 Azure函数更新到v3时,在Azure上遇到了同样的错误。我已经将csproj中的AzureFunctionsVersion更新为v3,但将TargetFramework保留为net472。我需要将AzureFunctionsVersion更新为v3,还需要将TargetFramework更新为netcoreapp3.1(请参见下面的屏幕截图)。
我还用以下方式更新了host.json:
"version": "2.0"
答案 7 :(得分:0)
对我来说,它在我再次删除扩展束并再次强制下载后才起作用。它解决了。在某种程度上,我感觉到扩展捆绑的处理方式不一致。