Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to dispatch failed build notification #142

Open
bronumski opened this issue Jul 14, 2017 · 3 comments
Open

Failed to dispatch failed build notification #142

bronumski opened this issue Jul 14, 2017 · 3 comments

Comments

@bronumski
Copy link

bronumski commented Jul 14, 2017

Just got this error after a build failure and no slack notification. This is the second build in a build chain with snapshot and artifact dependencies.

[2017-07-13 22:57:47,596]   INFO -   jetbrains.buildServer.SERVER - SlackNotificationListener :: Preparing message for URL https://hooks.slack.com/services/#########
[2017-07-13 22:57:47,596]   WARN - ildServer.util.EventDispatcher - Error in event handler: java.lang.IndexOutOfBoundsException: toIndex = 5 
java.lang.IndexOutOfBoundsException: toIndex = 5
	at java.util.ArrayList.subListRangeCheck(Unknown Source)
	at java.util.ArrayList.subList(Unknown Source)
	at slacknotifications.SlackNotificationImpl.getAttachments(SlackNotificationImpl.java:309)
	at slacknotifications.SlackNotificationImpl.postViaWebHook(SlackNotificationImpl.java:235)
	at slacknotifications.SlackNotificationImpl.post(SlackNotificationImpl.java:157)
	at slacknotifications.teamcity.NotificationUtility.doPost(NotificationUtility.java:17)
	at slacknotifications.teamcity.SlackNotificationListener.doPost(SlackNotificationListener.java:289)
	at slacknotifications.teamcity.SlackNotificationListener.processBuildEvent(SlackNotificationListener.java:123)
	at slacknotifications.teamcity.SlackNotificationListener.buildFinished(SlackNotificationListener.java:177)
	at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.superDispatch(ServerSideEventDispatcher.java:1)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1.run(ServerSideEventDispatcher.java:1)
	at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:7)
	at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:23)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.dispatch(ServerSideEventDispatcher.java:12)
	at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68)
	at com.sun.proxy.$Proxy19.buildFinished(Unknown Source)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.finishBuild(RunningBuildsManagerImpl.java:8)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.access$200(RunningBuildsManagerImpl.java:50)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl$3.run(RunningBuildsManagerImpl.java:4)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[2017-07-13 22:57:47,612]   INFO - tbrains.buildServer.ACTIVITIES - Finished build .....
[2017-07-13 22:57:48,173]   INFO -   jetbrains.buildServer.SERVER - SlackNotificationListener :: Preparing message for URL https://hooks.slack.com/services/######### 
[2017-07-13 22:57:48,173]   WARN -   jetbrains.buildServer.SERVER - Exception occurred in notificator "jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener for notificator tcSlackBuildNotifier" 
java.lang.IndexOutOfBoundsException: toIndex = 5
	at java.util.ArrayList.subListRangeCheck(Unknown Source)
	at java.util.ArrayList.subList(Unknown Source)
	at slacknotifications.SlackNotificationImpl.getAttachments(SlackNotificationImpl.java:309)
	at slacknotifications.SlackNotificationImpl.postViaWebHook(SlackNotificationImpl.java:235)
	at slacknotifications.SlackNotificationImpl.post(SlackNotificationImpl.java:157)
	at slacknotifications.teamcity.NotificationUtility.doPost(NotificationUtility.java:17)
	at slacknotifications.teamcity.SlackNotificator.doNotification(SlackNotificator.java:242)
	at slacknotifications.teamcity.SlackNotificator.notifyBuildFailed(SlackNotificator.java:98)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.buildFailedFirstFail(UserRulesAwareNotificationListener.java:363)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.access$600(UserRulesAwareNotificationListener.java:5)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener.buildFailedAfterSuccess(UserRulesAwareNotificationListener.java:48)
	at jetbrains.buildServer.notification.NotificationProcessor$6.call(NotificationProcessor.java:2)
	at jetbrains.buildServer.notification.NotificationProcessor$18.run(NotificationProcessor.java:7)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
@bronumski
Copy link
Author

bronumski commented Jul 28, 2017

Got the same issue without any build chain. The only thing special about this build is that it uses branch building.

[2017-07-28 09:44:22,496]   INFO -   jetbrains.buildServer.SERVER - SlackNotificationListener :: Preparing message for URL https://hooks.slack.com/services/#### 
[2017-07-28 09:44:22,496]   WARN - ildServer.util.EventDispatcher - Error in event handler: java.lang.IndexOutOfBoundsException: toIndex = 5 
java.lang.IndexOutOfBoundsException: toIndex = 5
	at java.util.ArrayList.subListRangeCheck(Unknown Source)
	at java.util.ArrayList.subList(Unknown Source)
	at slacknotifications.SlackNotificationImpl.getAttachments(SlackNotificationImpl.java:309)
	at slacknotifications.SlackNotificationImpl.postViaWebHook(SlackNotificationImpl.java:235)
	at slacknotifications.SlackNotificationImpl.post(SlackNotificationImpl.java:157)
	at slacknotifications.teamcity.NotificationUtility.doPost(NotificationUtility.java:17)
	at slacknotifications.teamcity.SlackNotificationListener.doPost(SlackNotificationListener.java:289)
	at slacknotifications.teamcity.SlackNotificationListener.processBuildEvent(SlackNotificationListener.java:123)
	at slacknotifications.teamcity.SlackNotificationListener.buildFinished(SlackNotificationListener.java:177)
	at sun.reflect.GeneratedMethodAccessor295.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.superDispatch(ServerSideEventDispatcher.java:1)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1.run(ServerSideEventDispatcher.java:1)
	at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:7)
	at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:23)
	at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.dispatch(ServerSideEventDispatcher.java:12)
	at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68)
	at com.sun.proxy.$Proxy19.buildFinished(Unknown Source)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.finishBuild(RunningBuildsManagerImpl.java:8)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.access$200(RunningBuildsManagerImpl.java:50)
	at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl$3.run(RunningBuildsManagerImpl.java:4)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[2017-07-28 09:44:22,498]   INFO - tbrains.buildServer.ACTIVITIES - Finished build Intz.Ccomm :: Web Build {id=IntzCcomm_WebBuild_2, internal id=bt239} #1.3.59.983 {build id=103758, promotion id=103758, branch=refs/heads/develop, history=false, agent="intz-bld-1" {id=5}, triggered by "Git" (##vcsName='jetbrains.git'). Started 2017-07-28 09:43:10.882} 
[2017-07-28 09:44:22,971]   INFO -   jetbrains.buildServer.SERVER - SlackNotificationListener :: Preparing message for URL https://hooks.slack.com/services/##### 
[2017-07-28 09:44:22,971]   WARN -   jetbrains.buildServer.SERVER - Exception occurred in notificator "jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener for notificator tcSlackBuildNotifier" 
java.lang.IndexOutOfBoundsException: toIndex = 5
	at java.util.ArrayList.subListRangeCheck(Unknown Source)
	at java.util.ArrayList.subList(Unknown Source)
	at slacknotifications.SlackNotificationImpl.getAttachments(SlackNotificationImpl.java:309)
	at slacknotifications.SlackNotificationImpl.postViaWebHook(SlackNotificationImpl.java:235)
	at slacknotifications.SlackNotificationImpl.post(SlackNotificationImpl.java:157)
	at slacknotifications.teamcity.NotificationUtility.doPost(NotificationUtility.java:17)
	at slacknotifications.teamcity.SlackNotificator.doNotification(SlackNotificator.java:242)
	at slacknotifications.teamcity.SlackNotificator.notifyBuildFailed(SlackNotificator.java:98)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.buildFailedFirstFail(UserRulesAwareNotificationListener.java:363)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.access$600(UserRulesAwareNotificationListener.java:5)
	at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener.buildFailedAfterSuccess(UserRulesAwareNotificationListener.java:48)
	at jetbrains.buildServer.notification.NotificationProcessor$6.call(NotificationProcessor.java:2)
	at jetbrains.buildServer.notification.NotificationProcessor$18.run(NotificationProcessor.java:7)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

@shachar-ash
Copy link

We're facing the same issue.
@bronumski were you able to overcome this issue?

@bronumski
Copy link
Author

@shachar-ash I have since left the company but I believe we where still getting it. Sorry I couldn't be of more help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants