-
Notifications
You must be signed in to change notification settings - Fork 411
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
Slack publish failed, response code 404 #480
Comments
Hi don't set teamDomain and baseUrl only set teamDomain, may or may not be your issue. But docker vs non docker probably isn't the issue |
I've tried setting teamDomain only and baseUrl only, still the same issue |
is the slack token correct? |
Yes, I've posted manually with curl and token and the message was sent successfully |
is it correct in jenkins though? |
Tried putting it in through the UI and deselected the credentialId, same error. |
what about with a separate credential? |
Do you mean a different slack token? |
I actually get this issue as well. What is particularly weird about it is that it only seems to fail when I send a message to certain users. It seems to be only newer users at the company (age of slack account may be a red herring, but I don't know). At this point I have no idea what else to do. |
Seeing this problem as well, it started happening quite recently (less than a week ago) |
WTF, in our case the problem was that someone (or Slack themselves?) had disabled the Jenkins CI app from Slack's integration settings. Clicked "enable" and it started working. |
@Jalle19 That could happen if the person who previously added it had their slack account disabled |
I am having the same issue. I am unable to successfully "Test Connection". I have an "Outgoing Webhook Token" and "Outgoing Webhook URL Endpoint" set under "Slack Webhook Settings" (I get warnings if I leave either one blank). Further down, under "Global Slack Notifier Settings" I have:
When I try to test the connection, I see in the server log:
Jenkins 2.163, Slack plugin 2.15 |
Is the slack app integrated into at least one channel? |
Yes, I have one active configuration, into the same channel configured in the global notifier settings in Jenkins. |
check your team domain is just the team name and not the full name not really sure sorry, just check it's all been setup right |
Team subdomain is just the subdomain, no ".slack.com". I regenerated the token and updated it in Jenkins, but no change, still 404. |
Downgrading Slack notification plugin to 2.6 (the last working version I've been trying to upgrade from), I now see:
If I restore my integration token to the global config, it works. |
interesting, i can't see anything around there that should have broken it |
On 2.6 with an integration token (no credential ID) it works. On 2.15, regardless of any settings (with/without token, with/without credential ID), it doesn't work for me. |
For me, with the version 2.15 I if I use the tokenCredentialId I have the 404 reported before. The work around for me was to use the withCredentials. Non working version:
Working version:
|
I'm wondering if there's some encoding issue in the secret Would need to log the request to see what the token is, |
If you change jenkins.plugins.slack.StandardSlackService to fine it will be logged "Posting: to " + roomId + " on " + teamDomain + " using " + url + ": " + attachments.toString() + " " + color |
I had the same problem and managed to get it working. |
@gmsa do you mean setting the integration token as the "secret text" of the jenkins credential? |
@esproul yes |
Cool, 2.15 now works, and I didn't have to do anything; after this most recent upgrade I have a "Migrated Slack Token" credential ID. "Test Connection" succeeds. I don't know if this made a difference, but yesterday after downgrading back to 2.6, I noticed a number of jobs that had the integration token in their job config, when it didn't need to be (none of my jobs need to override the global settings.) I went through and cleaned those out; not sure if that would have interfered with the automatic migration of the global token or not. |
I got the same issue with version 2.22, integration token as a jenkins credential ID is work for me. But could this issue fix in new version? |
what specifically was your issue @tiendungitd? there's many things that can go wrong and cause that issue |
@timja : In build job configuration, the "integratoin token" field have been ingore. under "Slack Notifications" I have:
I got failed when click test connection, look at system log I found the error: And if I setting Slack notification is:
I got success when click Test connection, event I type incorrect token and of course my job build not send anything to slack. I'm using Jenkins 2.164.2. Slack plugin version 2.22. |
Hi, I'm running 2.23. I've installed the Slack Integration and also tried with a bot using an incoming hook. Neither work. If I use
I get
If I use
I get
If I use
I get If I use
I get There aren't any combinations in which this works - but I can manually call the hook using curl. |
you probably want bot user false |
Checked or unchecked it doesn't solve the problem in any scenario. I get "302" and no response. |
can you screenshot please? |
No the slack instructions are wrong, I asked them to update it but it didn't happen... Team subdomain The instructions on the README should be up to date |
Unfortunately it doesn't work with any settings. |
I'm having a similar issue. Is there anything I can do to get it to spit out more log info so that I can try and make sense of this? Or should I break out the network analyzer to see what's going back and forth? Running "test connection" in the admin just lists "Failure" in red. In the logs I see the same 404 issue described here. I'm running version 2.27 of the plugin |
@xorgnz you can add a log recorder to this class: |
Thanks! That was very helpful. I appear to be working (seems the plugin hadn't installed properly) |
The The "global"/default credentials specified in the Slack plug-in configuration did not seem to work. I created a new global credentials, and specified with My
|
I'm trying to setup slack integration on a docker running in localhost.
When trying to publish or test connection in the settings, I'm getting this in the logs:
The same configurations are working in a non-docker configurations
The text was updated successfully, but these errors were encountered: