dblock / slack-strava

(Re)Post Strava activities to Slack
https://slava.playplay.io
MIT License
37 stars 6 forks source link

Slack::Web::Api::Errors::SlackError: invalid_auth #59

Open dblock opened 5 years ago

dblock commented 5 years ago
…t-0.13.1/lib/slack/web/faraday/response/raise_error.rb:  11:in `on_complete'
…ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:   9:in `block in call'
…ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:  61:in `on_complete'
…ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:   8:in `call'
…ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:   8:in `call'
…gems/faraday-0.15.3/lib/faraday/request/url_encoded.rb:  15:in `call'
…0/gems/faraday-0.15.3/lib/faraday/request/multipart.rb:  15:in `call'
…/2.5.0/gems/faraday-0.15.3/lib/faraday/rack_builder.rb: 143:in `build_response'
…by/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb: 387:in `run_request'
…by/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb: 175:in `post'
…ck-ruby-client-0.13.1/lib/slack/web/faraday/request.rb:  25:in `request'
…ck-ruby-client-0.13.1/lib/slack/web/faraday/request.rb:  10:in `post'
…nt-0.13.1/lib/slack/web/api/endpoints/conversations.rb: 195:in `conversations_members'
…-ruby-client-0.13.1/lib/slack/web/pagination/cursor.rb:  28:in `block in each'
…-ruby-client-0.13.1/lib/slack/web/pagination/cursor.rb:  25:in `loop'
…-ruby-client-0.13.1/lib/slack/web/pagination/cursor.rb:  25:in `each'
…nt-0.13.1/lib/slack/web/api/endpoints/conversations.rb: 191:in `conversations_members'
                       /app/slack-strava/models/
team.rb:  88:in `bot_in_channel?'

This is a POST with a channel to /api/slack/command.

dblock commented 5 years ago
I, [2019-01-17T23:18:38.975119 #235]  INFO -- : Connected team=5c307722b3393400ec094746, user=..., user_id=..., athlete_id=...
E, [2019-01-17T23:18:39.031367 #235] ERROR -- : Slack::Web::Api::Errors::SlackError: invalid_auth
  /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.13.1/lib/slack/web/faraday/response/raise_error.rb:11:in `on_complete'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:9:in `block in call'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:61:in `on_complete'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:8:in `call'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:8:in `call'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/request/url_encoded.rb:15:in `call'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/request/multipart.rb:15:in `call'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/rack_builder.rb:143:in `build_response'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb:387:in `run_request'
  /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb:175:in `post'
  /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.13.1/lib/slack/web/faraday/request.rb:25:in `request'
dblock commented 5 years ago

Looks like this starts happening when a user uninstalls the bot from within slack.

okyzaprabowo commented 5 years ago

I got this problem and I saw from Bots configuration that API Token has been changed automatically. I am not sure why. But you need to go inside to the Bots configuration page, and re-copy the API token. It works for me.

dblock commented 5 years ago

This was with slack-strava or another bot (your own)? @okyzaprabowo