question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QueueTrigger appears to be broke with Microsoft.NET.Sdk.Functions 1.0.19

See original GitHub issue

below is my Azure Function that worked with 1.0.14


        [FunctionName("LaunchTenantListener")]
        public static async Task Run([QueueTrigger(Constants.Queue, Connection = Constants.StorageConnection)]string tenantID, [Inject] PollQueuesForTenant pollQueuesForTenant)
        {
            await pollQueuesForTenant.Execute(tenantID);
        }

I’m currently getting this error.

Newtonsoft.Json.JsonReaderException
  HResult=0x80131500
  Message=Input string '5c61b624-567e-433e-a28c-8b044430f087' is not a valid number. Path '', line 1, position 36.
  Source=Newtonsoft.Json
  StackTrace:
   at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)
   at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader)
   at Microsoft.Azure.WebJobs.Host.Protocols.JsonSerialization.ParseJObject(String json) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Protocols\JsonSerialization.cs:line 102
   at Microsoft.Azure.WebJobs.Host.Queues.QueueCausalityManager.GetOwner(CloudQueueMessage msg) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Queues\QueueCausalityManager.cs:line 55

Since our code wasn’t anywhere in the stack trace I changed the message that was being posted to the queue to a number and now I get

Newtonsoft.Json.JsonReaderException
  HResult=0x80131500
  Message=Error reading JObject from JsonReader. Current JsonReader item is not an object: Integer. Path '', line 1, position 3.
  Source=Newtonsoft.Json
  StackTrace:
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader)
   at Microsoft.Azure.WebJobs.Host.Protocols.JsonSerialization.ParseJObject(String json) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Protocols\JsonSerialization.cs:line 102
   at Microsoft.Azure.WebJobs.Host.Queues.QueueCausalityManager.GetOwner(CloudQueueMessage msg) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Queues\QueueCausalityManager.cs:line 55

Also, can you please point me to the proper place for me to post that my local storage no longer appears in Cloud Explorer?

Thank you for an amazing product that in continuously getting more awesome.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
rasmuschristensencommented, Sep 21, 2018

Just ran into this issue too. Posting a json formatted string into the queue removes the exception and If I use a Type as the message, its also serialized correctly. Still sees it as a pain that the exception is thrown

2reactions
paulbatumcommented, Sep 29, 2018

The PR is now merged. For users to get this fix we’ll need to release an updated build of the Microsoft.Azure.WebJobs.Extensions.Storage NuGet package and then users will have to grab the update. The package should be published by mid October.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"The binding type(s) 'queueTrigger' are not registered ...
Extensions.Storage v3.0.10 Microsoft.NET.Sdk.Functions v1.0.29 ... So it would appear some sort of breaking change was made on the azure ...
Read more >
Azure Queue storage trigger for Azure Functions
Use the queue trigger to start a function when a new item is received on a queue. The queue message is provided as...
Read more >
Azure Functions C# script (.csx) developer reference
Understand how to develop Azure Functions using C# script.
Read more >
Azure function build pipeline fails and getting error i.e. ...
Azure function build pipeline fails and getting error i.e. Microsoft.NET.Sdk.Functions.Build.targets(41,5): Error : You must install or update .
Read more >
Guide for running C# Azure Functions in an isolated worker ...
Learn how to use a .NET isolated worker process to run your C# functions in Azure, which supports non-LTS versions of .NET and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found