TfsNotificationRelay icon indicating copy to clipboard operation
TfsNotificationRelay copied to clipboard

Exception being raised when triggered for a push notification

Open huntantr opened this issue 7 years ago • 5 comments

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)

huntantr avatar Apr 10 '18 19:04 huntantr

Does this exception happen for all pushes or are some push notifications relayed properly?

kria avatar Apr 10 '18 20:04 kria

It looks like all of them due to the number of entries in the event viewer, but I will see if I can verify.

huntantr avatar Apr 11 '18 11:04 huntantr

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.

kria avatar Apr 11 '18 11:04 kria

I am running some tests to confirm. I will get back to you on Monday.

huntantr avatar Apr 13 '18 18:04 huntantr

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>

huntantr avatar Apr 20 '18 14:04 huntantr