0

Hi I have updated the nuget packages for Azure Web Jobs SDK to version 2.0 and I am getting the following error.

 Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.SparkPostCold_Queue ---> System.InvalidOperationException: Exception binding parameter 'emails' ---> System.InvalidOperationException: Invalid invoke string format for attribute. at Microsoft.Azure.WebJobs.Host.Bindings.AttributeCloner`1.New(String invokeString) at Microsoft.Azure.WebJobs.Host.Bindings.DefaultAttributeInvokerDescriptor`1.FromInvokeString(AttributeCloner`1 cloner, String invokeString) at Microsoft.Azure.WebJobs.Host.Bindings.AttributeCloner`1.<ResolveFromInvokeStringAsync>d__10.MoveNext()

My function looks like below.

   public static void QueueItem(
    [Table("emails")] IQueryable<EmailEntity> emails,
    [Queue("queue")] ICollector<string> outputQueueMessage,
    TextWriter logger)
    {
        var query = from p in emails select p;
        foreach (EmailEntity email in query)
        {
            outputQueueMessage.Add(email.RowKey);

        }
    }

Any thoughts will be highly appreciated.

imrn
  • 297
  • 2
  • 12
  • 2
    How are you invoking the function when this fails? – mathewc Sep 13 '17 at 22:50
  • 1
    I'm guessing this is invoked via the Dashboard? Or maybe a JobHost.Call? – Mike S Sep 13 '17 at 23:08
  • Yes, the function is being invoked by the dashboard. – imrn Sep 14 '17 at 05:03
  • From the exception, the function name is **SparkPostCold_Queue**. I tested your code and called `host.Call(typeof(Functions).GetMethod("QueueItem"));` and it could work as expected on my side. Have you checked your code on your local side to narrow this issue? Or does this error only occur on azure side? – Bruce Chen Sep 14 '17 at 05:45
  • Just double checking: is that the *exact* [Table] binding that causes the problem? Are you setting any other properties on the attribute? – Mike S Sep 14 '17 at 17:57
  • @MikeS yes, this is the exact code which runs in version 1.1.2. The only difference in the code is that Changed the func name before pasting here so it might diff from the logs and nothing else. – imrn Sep 14 '17 at 22:42

1 Answers1

0

I think this is a regression bug in the SDK. I saw you filed https://github.com/Azure/azure-webjobs-sdk/issues/1337 . I'll take a look at it. Follow that issue for updates.

Mike S
  • 3,058
  • 1
  • 22
  • 12