danbord
danbord

Reputation: 4096

Azure function multiple output binding Extensions error

I'm developing an Azure function through the portal,

My function is an HttpTrigger with httpResponse.

I add a TableStorage output binding and install its Extension (everything is fine).

I add a SendGrid output binding and install its Extension (the extension installer give me a message saying "it takes longer than expected" and seems to fail. Afterward, my function is broken.

I tried creating my bindings in reverse order (SendGrid then TableStorage). It now fails on TableStorage installation.

Any way to resolve this issue?

Thanks

Upvotes: 0

Views: 373

Answers (1)

Jerry Liu
Jerry Liu

Reputation: 17800

It's a known issue that sometimes filesystem for Consumption plans reacts slow, e.g during extension installation with many file I/O operations.

The first suggestion is to delete the extensions and retry.

  1. Stop Function app.
  2. In portal, Platform features> App Service Editor.
  3. Right click on bin folder and extensions.csproj, Delete.
  4. Start Function app.
  5. Delete existing output bindings and add them again to install extensions.

If this doesn't work, try to manually install the extensions.

  1. Stop Function app.
  2. In portal, Platform features> App Service Editor.
  3. Right clik on the blank under WWWROOT, New File extensions.csproj then add content below.

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <WarningsAsErrors />
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid" Version="3.0.0" />
        <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.2" />
        <PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.*" />
      </ItemGroup>
    </Project>
    
  4. Press Ctrl+Shift+C to open console, or click the second button Open Console from the bottom on the sidebar.

  5. Input dotnet build extensions.csproj -o bin --no-incremental --packages D:\home\.nuget and wait for the command to finish.
  6. Start Function app.

Upvotes: 1

Related Questions