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

Viewed 1146

When creating a new QueueTrigger Azure function, I'd like to switch the string input to a CloudQueueMessage.

I have changed the signature to:

public async static Task Run([QueueTrigger("%queue-name%", Connection = "AzureStorageConnection")]CloudQueueMessage myQueueItem, TraceWriter log)

I get the 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] A 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 to an instance of a String. [8/15/17 12:16:07 AM] Parameter name: s.

The function app is correctly popping items and then then because it is then throwing rapid exceptions all items in that queue go to the poison queue. I'm using the latest functions sdk and windows azure sdk nuget packages.

2 Answers
Related