0
votes

A brand new javascript FunctionApp with a blobtriggered function crashes with error 500 :

Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.WindowsAzure.Storage.StorageException: The specifed resource name contains invalid characters. at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token) at Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener.ExecuteAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Queues\Listeners\QueueListener.cs:line 155 at Microsoft.Azure.WebJobs.Host.Timers.TaskSeriesTimer.RunAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\TaskSeriesTimer.cs:line 147 at Microsoft.Azure.WebJobs.Host.Timers.WebJobsExceptionHandler.<>c__DisplayClass3_0.<OnUnhandledExceptionAsync>b__0() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\WebJobsExceptionHandler.cs:line 54 at System.Threading.Thread.ThreadMain_ThreadStart() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Steps : I created a new FunctionApp with :

  • in javascript
  • on a windows serviceplan
  • brand new storage/resource group

Next, I navigated to the FunctionApp and created a new function :

  • from portal
  • with "Azure Blob Storage trigger" template (I installed the storage extension)
  • default storage path, var names, etc

Next, I created the container "samples-workitems" on the storage and put a file in it to trigger the function and have the error message from the function logs.

I also tried to "test" the function from the right panel in the portal with the value samples-workitems/{the file I copied} and I got a 500 error and the previous message.

Something weird I noticed by going back to the function app in web portal :

enter image description here Azure storage extension seems properly installed but if I try to add a new blob triggered function, it asks me again to install the storage extension... So I guess it never succeed to install the extension and is not able to do it.

EDIT: Turns out Azure now aknowledges that the extension is installed but I still have the StorageException

2

2 Answers

0
votes

You can check if an extension is successfully installed or not from Kudu. Open DebugConsole --> Go to D:\home\site\wwwroot\bin. Microsoft.Azure.WebJobs.Extensions.Storage.dll. If the storage dll is not there, extension installation did not succeed.

0
votes

You could choose to reinstall the extensions you want . You could refer to this wiki: Update your app from portal.

Edit the extensions.csproj file, make the required additions and updates of PackageReference items in the ItemGroup, then select Save. About the supported package versions can be found in the What NuGet packages do i need?.

Then in the wwwroot folder run the below command to build the referenced assemblies.

dotnet build extensions.csproj -o bin --no-incremental --packages D:\home\.nuget