Help in fixing exception on server

10 views
Skip to first unread message

Sydney Wamalwa

unread,
May 29, 2024, 8:02:47 AMMay 29
to go-cd
I am currently building a zulip plugin but I keep getting this exception when pipeline runs successfully please someone help me out resolve it. 
  • Notification update failed for plugin: com.matic.gocd.plugins.http-notifications29 May, 2024 at 14:37:42 Local Time

    java.lang.NullPointerException: Cannot read field "agent" because "this.settings" is null

Chad Wilson

unread,
May 29, 2024, 9:03:14 AMMay 29
to go...@googlegroups.com
This is an issue coming from this 3rd party plugin you have installed: https://github.com/matic-insurance/gocd-http-notifications-plugin This plugin is not built by/supported within the core GoCD team.

If you look at the GoCD Server log traces you should see clearly where the errors are coming from.

Based on the code at https://github.com/matic-insurance/gocd-http-notifications-plugin/blob/3f629daf0b4821b7acb7baf4722487e29a5fb97a/src/main/java/com/matic/gocd/plugins/HttpNotifications.java#L86-L95 you'll get this error if you have not configured the plugin properly. The plugin expects you to supply some settings to the plugin via an environment variable called "GOCD_HTTP_NOTIFICATIONS_CONFIG" which points to a YAML file somewhere on your GoCD server with a custom format documented at https://github.com/matic-insurance/gocd-http-notifications-plugin?tab=readme-ov-file#configuration.

This is not the way "well behaving" GoCD plugins should configure themselves. While the notifications plugin API is not super flexible, GoCD's plugin model supports GoCD-managed configuration; ability to set defaults and model basic views to enter data. The plugin hasn't been updated in 5 years and the developers have not enabled the issues tab on GitHub so it seems difficult to raise or get issues resolved. I would suggest uninstalling/avoiding this plugin and avoiding using it as a model for any plugin you are thinking of building.

If you just want to see how it works you will have to follow its non-standard instructions for configuration in its documentation.

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/24c2d978-100c-4da3-a38b-98b5fa71f9e1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages