-
Notifications
You must be signed in to change notification settings - Fork 414
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
FATAL: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor since 2.0 #188
Comments
Request for feedback from others that upgraded to 2.0 |
Same error here. |
…enkinsci/slack-plugin#188, which caused Jenkins from launching properly thus no builds. By reverting the slack plugin to 1.8.1 resulted in stable Jenkins setup.
@josb-mi what version of Jenkins? |
@kmadel : latest, 1.653 |
just got the same issue. Jenkins 1.647 |
This used to be a warning from what I can tell, not sure if something changed in core after 1.642??? |
Part of the reason this did not get spotted sooner is that the parent pom for the project is such an old version (1.609.2). I think that also applies to the issue with the newly added webhook functionality. We should update the parent pom version, but that is going to result in some more changes. |
@OwensCode Any chance you can put together a PR with a fix in the next 6-8 hours? @dpires already has a PR with a possible fix for the webhook issue. I was hoping to do a bug fix 2.0.1 release at around 9PM EDT. |
I have not been able to repeat the problem so far, so it's hard to say. Trying to fit it into my normal work day, so I'll do what I can. I'll update as soon as possible. |
I have not been able to replicate the issue with Jenkins 1.652 so far, and the "simple" change that is shown in the documentation (https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor) and elsewhere is not so simple here because the class already inherits from something else and Java does not support multiple inheritance, so I really need to be able to see it happen so that I can verify that it gets fixed. If anyone who has experienced this problem can think of anything that will help me replicate it, I would greatly appreciate it.
|
I have a vagrant and ansible script combo that creates an ec2 instance, installs jenkins, install the slack notifier plugin, uploads a config, and then runs a job that reproduces this error message - would that help? |
Yes, it sounds like it would be. Maybe there is something specific in the config that triggers it. |
If anyone needs the link to downgrade temporarily, I downloaded 1.8.1 manually from here: https://updates.jenkins-ci.org/download/plugins/slack/1.8.1/slack.hpi Thanks for working on the real fix too 👍 |
I knocked up a test project here: https://github.com/lukosan/vagrant-ansible-ec2-jenkins-slack However, this doesn't reproduce the problem as it works fine :-/ Now, I do have a similar stack that does fail however I can't share it because it's a private corporate stack :-/ However, I do now have one working jenkins box/config and one failing jenkins box/config so I'll do a bit of digging tomorrow morning and try and track down which specific bit of the config is causing the problem and I'll let you know. |
Although I can't repeat the issue, I can get a unit test to try to retrieve the descriptor and it currently fails to do so. I think if I can get it to pass, then there is a good chance I'll have a fix, so that's what I'll aim at for now. |
I've created a script console script which patches the runtime to disable Slack outbound webhooks. |
I'm able to reliably replicate the issue. I'll post how in a bit while I prep. |
Closing this issue in favor of #191. |
No luck with the changes, and I'm concerned that this is a red herring. I'm suspicious that configs are not being migrated for some reason, and that is the reason for the errors. It would explain why downgrading worked without having to restore the old configurations. If possible, can somebody post Jenkins logs from when they upgraded the plugin. In particular, I'm looking for log entries after "Starting Settings Migration Process". Thanks! |
Just saw the update from @samrocketman. Thanks! Will chase things down from that angle. |
I'm not sure where this is being tracked now; maybe it needs to be reopened. Anyway, I think the |
Unfortunately @psharkey's stack trace still points to the env inject plugin. I'm not sure if the workflow/pipeline plugin depends on it or something, or if that's just what was captured. In terms of a fix, I haven't seen anything that indicates we can control the order Jenkins loads the plugins, which seems to be the problem with env inject plugin (and possibly others); they seem to be getting loaded before the Slack plugin can migrate the configs. The only idea I have at this stage is to create a script that migrates the settings outside of Jenkins, which admins could run on their servers. @christek91 I just wanted to clarify on your statement that you can't run Slack 2.0+ alongside those other plugins. That should actually be working fine. It's just the configuration migration when you go from 1.8 to 2.0 that causes problems, and you can potentially make the transition yourself, manually. That's maybe what you meant, but I wanted to clarify. For developers, don't forget that there's PR #202 waiting for review, which should fix the problem for at least one other plugin. |
Ah yeah I should have been more clear. The issue appears to be with config migration. What @psharkey and I are running into seems to be that the Slack plugin configs aren't migrated for jobs that use the Pipeline/Workflow plugin. So even if you do upgrade in the way you've laid out (temporarily disabling envinject so that the config values can be migrated to their new format), any workflow jobs you have will still have So it looks like the config migration isn't happening for workflow/pipeline plugin jobs. Removing the elements from these configs will solve this as @psharkey mentioned, as does changing the elements by hand but that's certainly not ideal. Ideally the migration would be automatic like it is for other jobs. I understand that the envinject issue isn't in the domain of this plugin and that's fine. Temporarily disabling envinject is easy enough. But this workaround only works if all configs migrate properly, which doesn't appear to be the case in 2.0.1 . I can open another issue for the failing config migration in workflow jobs if you'd like. |
A quick update that I've taken a quick look at the Pipeline issue and can see the errors. If I upgrade to a build from PR #202 I get a little more info in my logs, which will help me dig into a fix:
Just to clarify to make sure I'm not missing something, @christek91, you weren't sending notifications from Pipeline jobs prior to the update, right? ... because |
You're correct the jobs weren't actually sending anything using |
Thanks. Yes, they are not being migrated. The log entry is from the branch for my PR, but it's basically the same issue in the released code. I am working on a fix that I'll add to my PR, since nobody has looked at it yet, and I want to refactor a little to avoid getting more complex. I don't think the Slack job properties are being used at all in these jobs, so the migration will just remove that section from the config. |
PR #202 has been updated with fixes for pipeline projects. If anyone has the ability to test it, please do so and let me know of any issues. Thanks. |
I wisely created a new Jenkins master with 2.0, rather than install it atop my current Jenkins server (which is happily running jobs in a charming, yet retro manner) I re-created all of my jobs on the new server. It was harmless because it's not running the Agent servers, so any jobs would just stack up and not run. When I restarted Jenkins 2.0, it was unable to come up due to the Slack error. Once I removed all of the jobs that use the Slack plugin, the server came up normally. I checked and the Slack plugin that was installed is already at the most current release. hudson.util.HudsonFailedToLoad: java.lang.AssertionError: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor I'll continue to tinker with this. It bothers me that the plugin entirely prevented Jenkins from being accessible, rather than just borking individual jobs. Just another datapoint. tl;dr - set up new J2.0 server. Migrated old jobs to it. Server would not start. Removed jobs that use Slack. Server started. --Edit to add. The old configuration on the "Manage Jenkins" page is different than the one on 2.0. The 2.0 configuration wants "Outgoing Webhook Token" and "Outgoing Webhook URL Endpoint" Clicking around to find out what this is takes me to the plugin documentation page, which does not at all document these settings. Now I get to ask Mister Google what an Outgoing Webhook Token and an Outgoing Webhook URL Endpoint are. Please update your documentation, at the very least. |
@ElaineRichards: Re: What are outgoing webhooks? https://api.slack.com/outgoing-webhooks From my understanding, Slack has a new feature in which slack can notify Jenkins of an event (kind of like how GitHub can notify Jenkins of open pull requests or reference updates). The "outgoing" webhook is referring to slack sending "out" data (and not your Jenkins). I feel this is poorly worded because in reality it is slack communicating inbound to your Jenkins server. If you, like me, firewall Jenkins far from the internet as possible then you have no need for Slack "outgoing" webhooks. In that case, I wrote scripts to disable it (see issue #191 for details). |
@ElaineRichards: thanks for your comments (the stack trace in particular), and well done on trying out the upgrade on a separate server first. If you take a look at my comment from Mar 24th (#188 (comment)) there is a description of the issue with the EnvInject plugin (which you appear to be using) and a potential workaround. The workaround apparently doesn't work if you are using the pipeline/workflow plugin as well, but I have an open PR #202 that should fix those issues, and it would be awesome if we can get some more testing and feedback on the fixes. |
Thank you @OwensCode and @samrocketman for your responses. I very much appreciate both of you taking the time to look at this issue and provide responses. I did do a little muppet flailing due to Documentation Fuzziness and cut and pasted the URL that our slack messages show up in and it and Jenkins not only booted up correctly, but it also started sending messages to Slack. |
I have a freshly installed Jenkins 2.7 with the slack plugin version 2.0.1 and I also have this problem (The build config is generated with the job-dsl plugin):
Any ideas how to work around it? |
Never mind my previous comment. I needed to use |
I am having the same problem with Jenkins ver 2.7. hudson.util.HudsonFailedToLoad: java.lang.AssertionError: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor I have tried restarting Jenkins but that hasn't fixed the issue. Any ideas how to work around it? |
Not sure if this is any help, but I manually configured the plugin similarly to how @samrocketman has, although I didn't have the same problem having to include false on unused properties. The below has worked for our Jenkins 1.654 Edit: This is more a comment in general, not necessarily directed at @ianceicys |
@andrewbell Thanks for the info. Which file do I update with these configuration settings? I'm not very familiar with jenkins configuration settings. |
@ianceicys It looks like you're having problems with the environment injector plugin. Take a look at #188 (comment) for a possible workaround. |
I encountered a conflict between the environment injector plugin and Slack plugin 2.0.1 (would work with one or the other but not both, with the exception mentioned in this thread). The workaround mentioned above didn't work, but I removed all mentions of SlackJobProperty from my pipeline config.xml's and Jenkins booted OK. |
I am seeing the same problem in Jenkins V1.609.18.3. I see the stack trace when trying to save configuration changes on some (but not all) jobs, and the changes are not saved. javax.servlet.ServletException: java.lang.AssertionError: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor I am disabling the plugin until there is a fix, as I can't have an optional plugin breaking some of the basic functions of Jenkins. |
For information, we had projects failing without any reference to |
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:
Edit each of these files and remove the Go to the Jenkins Manage screen and click on |
I went ahead and updated the main issue to highlight the thread which contains fixes. |
Feel free to subscribe to #296 for updates related to Slack Plugin 2.2 release. |
Since the upgrade to 2.0 we have the following error for all our builds:
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.
The text was updated successfully, but these errors were encountered: