phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
374 stars 74 forks source link

on deploy: Slack API Failure! 'Body: No hooks' #42

Closed omenking closed 8 years ago

omenking commented 8 years ago

I've configured using slackbot and it fails on deploy. It appears to be doing the webhook when I have hooked up the slackbot.

I have the slackbot setup, I have the correct token, team name and channel. Any ideas? I would think I would not have to create a hook for slackbot

bundle stderr: Nothing written
[slackistrano] Slack API Failure!
[slackistrano]   URI: https://<name>.slack.com/services/hooks/slackbot?token=<token>&channel=%23_deploy
[slackistrano]   Code: 404
[slackistrano]   Message: Not Found
[slackistrano]   Body: No hooks
phallstrom commented 8 years ago

Can you post your settings from your deploy.rb?

omenking commented 8 years ago

This won't help. My other developer contacted Slack and he told me they have changed their api endpoint so it is possible this gem needs to be tweaked. When we solve it we'll likely present a pull request.

phallstrom commented 8 years ago

Hrm. It's working for me, just tried it.

set :slack_via_slackbot, true
set :slack_team, "xxx"
set :slack_token, "xxxxxx"
set :slack_channel, '#slackistrano'
phallstrom commented 8 years ago

Open this back up if needed.

omenking commented 8 years ago

Can you please reopen this ticket. I have not confirmed this issue and I was currently double checking my developer's insight from Slack's response and I'm actively debugging the ticket.

omenking commented 8 years ago

Email to slack:

This should work (and it doesn't):

curl --data "Hello from Slackbot" $'https://<team>.slack.com/services/hooks/slackbot?token=<token>9&channel=%23_deploy'

Slack's response:

It looks like you may have found some outdated instructions for a separate function that we've deprecated ('Slackbot remote control').

To post into Slack with your bot token you'll want to use the web API chat.postMessage method: https://api.slack.com/methods/chat.postMessage

Please let me know if you have any questions, sorry for any confusion!

@phallstrom, what do you make of this?

phallstrom commented 8 years ago

Hrm. Your command (with my variables) works fine for me. Maybe we're grandfathered in somehow?

Can you get to here: https://slack.com/apps/A0F81R8ET-slackbot and configure and integration?

omenking commented 8 years ago

Yep this is the issue.

We weren't aware that Slackbot was an app due the confusion you can setup bots in Slack. I'm going to update the name of this ticket so in case someone else comes across the 404 error it might lead them to this solution.

habovh commented 8 years ago

Actually the fact that Slackbot integration must be added to the team should be specified on the main README.md file. It would have saved me some precious time looking for that token all over the Slack admin interface. To me since Slackbot is already present in Slack I did not imagine that I needed to install an extra integration in order to Slackistrano to work...