TfsNotificationRelay
TfsNotificationRelay copied to clipboard
Exception being raised when triggered for a push notification
Out event log is flooded with an exception when a push notification is triggered. We are running 1.19 and TFS2017.2.
TF53010: The following error has occurred in a Team Foundation component or extension: Date (UTC): 4/6/2018 12:29:41 PM Machine: TFSAPP01 Application Domain: TfsJobAgent.exe Assembly: Microsoft.TeamFoundation.Framework.Server, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v4.0.30319 Service Host: 1f70b4fb-edb5-4819-b9b6-9f8abff7b29b (HybridControl) Process Details: Process Name: TfsJobAgent Process Id: 5404 Thread Id: 2496 Account name: DOMAIN\user
Detailed Message: The subscriber TfsNotificationRelay raised an exception while being notified of event Microsoft.TeamFoundation.Git.Server.PushNotification.
Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)
Exception Stack Trace: at DevCore.TfsNotificationRelay.EventHandlers.GitPushHandler.<CreateNotifications>d__0.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at DevCore.TfsNotificationRelay.EventHandlers.BaseHandler.ProcessEvent(IVssRequestContext requestContext, NotificationType notificationType, Object notificationEventArgs, Int32& statusCode, String& statusMessage, ExceptionPropertyCollection& properties)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationEventService.SubscriptionList.Notify(IVssRequestContext requestContext, NotificationType notificationType, Object notificationEventArgs, String& statusMessage, ExceptionPropertyCollection& properties, Exception& exception)
Does this exception happen for all pushes or are some push notifications relayed properly?
It looks like all of them due to the number of entries in the event viewer, but I will see if I can verify.
Is TfsNotificationRelay working for you for any other events, or have you never gotten it to work at all?
It would help if you e-mailed me your (censored) DevCore.TfsNotificationRelay.dll.config. Btw the TfsJobAgent service needs to be restarted to pick up any config changes.
I am running some tests to confirm. I will get back to you on Monday.
Sorry for the delay.
I have enabled all notifications and the work item ones work it seems to just be the Git ones. In the event viewer, the following are failing.
PushNotification
DiscussionNotification
Both with the same error.
Here is the section in my config file:
<eventRules> <rule notify="true" events="PullRequestComment, ReleaseCreated, RepositoryCreated, RepositoryRenamed, RepositoryDeleted, ReleaseEnvironmentCompleted" teamProjectCollection="MyCollection" teamProject="MyProject" text="Microsoft.TeamFoundation.System commented" /> </eventRules>