slack-plugin: FATAL: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor since 2.0

Since the upgrade to 2.0 we have the following error for all our builds:

FATAL: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor
java.lang.AssertionError: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor
    at jenkins.model.Jenkins.getDescriptorOrDie(Jenkins.java:1223)
    at hudson.model.JobProperty.getDescriptor(JobProperty.java:105)
    at hudson.model.JobProperty.getDescriptor(JobProperty.java:79)
    at hudson.model.Descriptor.toMap(Descriptor.java:973)
    at hudson.model.Job.getProperties(Job.java:558)
    at hudson.model.Build$BuildExecution.post2(Build.java:187)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)

Downgrade to 1.8.1 seems to solve the issue. Jenkins version: 1.652

See possible fix

edit by @samrocketman: See #191 for possible fixes for this issue.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Reactions: 9
  • Comments: 67 (36 by maintainers)

Commits related to this issue

Most upvoted comments

We encountered the same error, and we resolved it this way - it seems removing the Slack config from jobs via the UI does not cut it: On the Jenkins Server: cd /var/lib/jenkins/jobs Then: find . -maxdepth 2 -type f -name 'config.xml'|xargs grep SlackJobProperty Results:

user@ec2-live-buildmaster-50:/var/lib/jenkins/jobs$ find . -maxdepth 2 -type f -name 'config.xml'|xargs grep SlackJobProperty
./pipe/config.xml:    <jenkins.plugins.slack.SlackNotifier_-SlackJobProperty plugin="slack@1.8">
./pipe/config.xml:    </jenkins.plugins.slack.SlackNotifier_-SlackJobProperty>

Edit each of these files and remove the <jenkins.plugins.slack.SlackNotifier_-SlackJobProperty> block

Go to the Jenkins Manage screen and click on Reload Configuration from Disk to ‘refresh’ its state.

Request for feedback from others that upgraded to 2.0

For information, we had projects failing without any reference to SlackJobProperty in config.xml files. After investigation, this issue was triggered on Inheritance projects. These projects also have versions.xml.gz file, this file contains older versions of the project configuration and these old configurations were including some slack configuration. We solved our issue by deleting versions.xml.gz files and reload configuration from disk (we did not need the previous project configurations).

Using Job DSL causes the issue in this thread, which means the Job DSL is producing old configs. Anyone know how to directly write the XML via Job DSL?

Managed to repeat the issue with the multi-branch-project plugin installed. I don’t know much about this plugin, but it looks like it uses a template to create sub-projects for each branch in a code repository. It also centralizes the configuration for the sub-projects through the template configuration file. The jobs for the sub-projects are reported as having been migrated when Jenkins is started, but they fail with the errors reported. Looks like the template is not migrated, which is where the trouble starts.

A workaround to this issue is to manually update your template files.

  • Edit $JENKINS_HOME/jobs/*/template/config.xml and remove the whole SlackJobProperty section from job properties
  • Restart Jenkins
  • Edit the main project in the Jenkins web interface and recreate your Slack settings.

If you have custom settings for sub-projects, you might need to update those as well, although in my brief testing it looked like they would actually be migrated when the Slack plugin was updated.