azure - Changing CloudQueueMessage type leads to Exception binding parameter 'myQueueItem'. mscorlib: String reference not set to an instance of a String -


when creating new queuetrigger azure function, i'd switch string input cloudqueuemessage.

i have changed signature to:

public async static task run([queuetrigger("%queue-name%", connection = "azurestorageconnection")]cloudqueuemessage myqueueitem, tracewriter log)

i error below:

8/15/17 12:16:07 am] function started (id=a137d868-1256-4a67-a225-8a95fb0e31fb) [8/15/17 12:16:07 am] executing 'tokenrefresh' (reason='new queue message detected on 'refreshtoken'.', id=a137d868-1256-4a67-a225-8a95fb0e31fb) [8/15/17 12:16:07 am] scripthost error has occurred [8/15/17 12:16:07 am] exception while executing function: tokenrefresh. microsoft.azure.webjobs.host: exception binding parameter 'myqueueitem'. mscorlib: string reference not set instance of string. [8/15/17 12:16:07 am] parameter name: s.

the function app correctly popping items , then because throwing rapid exceptions items in queue go poison queue. i'm using latest functions sdk , windows azure sdk nuget packages.

according description, checked issue on azure portal. found work, , here code snippet under run.csx file follows:

#r "microsoft.windowsazure.storage" using system; using microsoft.windowsazure.storage.queue;  [functionname("queuetriggercsharp")] public static void run([queuetrigger("myqueue-items", connection = "azurewebjobsstorage")]cloudqueuemessage myqueueitem, tracewriter log) {     log.info($"c# queue trigger function processed: {myqueueitem.asstring}"); } 

result:

2017-08-15t07:35:27.104 function started (id=0ed03b74-bc9c-408a-9607-55e2942f1d50)

2017-08-15t07:35:27.214 c# queue trigger function processed: sample queue data

2017-08-15t07:35:27.214 function completed (success, id=0ed03b74-bc9c-408a-9607-55e2942f1d50, duration=108ms)

as garth mason mentioned, checked on local side using vs 2017 function class library. also, found similar issue how change parameters types using queue trigger , vs 2017 function class library , git issue, refer them solving issue.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -