Microsoft.Azure.WebJobs.Extensions.Storage regression?
See original GitHub issueA function app that worked yesterday suddenly stopped working today with no code changes or changes to the function app.
We have a function:
[FunctionName("GetBooks")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.System, "get", Route = null)] HttpRequest req,
[Table("manuals")] CloudTable manualsTable,
ILogger log)
{
...
This morning this app failed to start with this error:
Error indexing method 'GetBooks' Cannot bind parameter 'manualsTable' to type CloudTable. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
It looks like a new version of the azure hosting runtime has been released. I believe this is the problem, because downgradning to an earlier version of azure-functions-core-tools (which contains an earlier version of the runtime) resolves the problem.
Repro steps
Provide the steps required to reproduce the problem
-
Step A Download the latest version of azure-functions-core-tools (2.7.1948).
-
Step B Given a function app that contains a host.json with the following contents:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}
- Step C
func start
Expected behavior
Function app should run normally.
Actual behavior
Function app crashes with a type error:
Error indexing method 'GetBooks' Cannot bind parameter 'manualsTable' to type CloudTable. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
Known workarounds
Fix the version of the extensionBundle to 1.0.0
hosts.json now looks like this:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.0.0, 1.0.1)"
}
}
Related information
Version 1.1.0 and later of the extensionBundle seems to refer to version 3.0.10 of Microsoft.Azure.WebJobs.Extensions.Storage. I think this might be the source of the error.
Version 1.0.0 refers to version 3.0.4 of Microsoft.Azure.WebJobs.Extensions.Storage which does not produce the error.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11 (1 by maintainers)
Top GitHub Comments
I had similar issues arise a couple of weeks ago, and was able to resolve them by adding a fairly empty
host.json
file (that copies to the output directory):While this file was previously effectively optional, I’m guessing there was an Azure runtime update that relied on having it.
facing this issue again currently