Azure / Azure/azure-functions-host

Exception binding parameter 'myEventHubMessage'. Microsoft.Azure.WebJobs.Host: Object reference not set to an instance of an object.

Open
#3,201 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

_From @grik001 on July 26, 2018 13:19_

I am following the example in this link:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs, The first example works and I manage pick up calls from EventHub.

When I try the second example which uses EventData from SB I keep getting the below exception:

**Method:**

```csharp
public static void Run(
[EventHubTrigger("invictus-dev-we-sft-evhb", Connection = "EventHubConnectionAppSetting")] EventData myEventHubMessage,DateTime enqueuedTimeUtc,
Int64 sequenceNumber,string offset,TraceWriter log)
```

**Error:**

```
2018-07-26T13:11:50 Welcome, you are now connected to log-streaming service.
2018-07-26T13:11:58.052 [Information] Executing 'EventHubTriggerCSharp' (Reason='This function was programmatically called via the host APIs.', Id=75035202-d106-4901-a64c-2e3be2ee784c)
2018-07-26T13:11:58.267 [Error] System.Private.CoreLib: Exception while executing function: EventHubTriggerCSharp. Microsoft.Azure.WebJobs.Host: One or more errors occurred. (Exception binding parameter 'myEventHubMessage') (Exception binding parameter 'enqueuedTimeUtc') (Exception binding parameter 'sequenceNumber') (Exception binding parameter 'offset'). Exception binding parameter 'myEventHubMessage'. Microsoft.Azure.WebJobs.Host: Object reference not set to an instance of an object.
2018-07-26T13:11:58.355 [Error] Executed 'EventHubTriggerCSharp' (Failed, Id=75035202-d106-4901-a64c-2e3be2ee784c)
```

_Copied from original issue: Azure/Azure-Functions#898_

Contributor guide

Open the contributing guide

Research direction

Start with the Run method signature and the EventHubTrigger/EventData example linked in the report. Reproduce the binding failure and inspect the host's EventData, enqueuedTimeUtc, sequenceNumber, and offset binding paths; done means the documented signature either binds successfully or the documentation clearly reflects the supported parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.