question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft.Azure.WebJobs.Extensions.Storage regression?

See original GitHub issue

A 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

  1. Step A Download the latest version of azure-functions-core-tools (2.7.1948).

  2. 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)"
    }
}
  1. 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
zamzowdcommented, Feb 10, 2020

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):

{
  "version": "2.0"
}

While this file was previously effectively optional, I’m guessing there was an Azure runtime update that relied on having it.

0reactions
dipidoocommented, Jun 17, 2023

facing this issue again currently

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0 and ...
I tried to update a Azure Functions project to use the 5.0.0 version of Microsoft.Azure.WebJobs.Extensions.Storage but with this version my ...
Read more >
Microsoft.Azure.WebJobs.Extensions.Storage 5.1.3
This extension provides functionality for accessing Azure Storage Blobs and Queues in Azure Functions. This package is a metapackage created for backwards ...
Read more >
Microsoft.Azure.WebJobs.Extensions.Http: Could not load ...
We encountered a similar problem after updating Microsoft.Azure.WebJobs.Extensions.Http to 3.2.0 Developers using Rider had no problems but ...
Read more >
Azure WebJobs Storage Blobs and Queues client library ...
This extension provides functionality for accessing Azure Storage Blobs and Queues in Azure Functions. This package is a metapackage created for ...
Read more >
Microsoft.Azure.WebJobs.Extensions.Storage.Queues 5.1.3
Azure WebJobs Storage Queues client library for .NET. This extension provides functionality for accessing Azure Storage Queues in Azure Functions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found