slack-ruby / slack-ruby/slack-ruby-client

"no implicit conversion of Array into String" with client.auth_test

Open
#115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug? question
Dominant language
Ruby
Stars
1.3k
Forks
222
Avg merge
1d 14h
Merged PRs (30d)
3

Description

Hi,

I followed the instructions in the Readme but it's throwing an error at some point. My code is deployed on Heroku. Here's the piece of code in question:

Slack.configure do |config|
    config.token = ENV['SLACK_API_TOKEN']
end
    client = Slack::Web::Client.new
client.auth_test  #Error happens at this line.

The error is (displayed on Slack):

<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
 <HEAD><TITLE>Internal Server Error</TITLE></HEAD>
 <BODY>
   <H1>Internal Server Error</H1>
   no implicit conversion of Array into String
   <HR>
   <ADDRESS>
    WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16) at
    [myapp].herokuapp.com:443
   </ADDRESS>
 </BODY>
</HTML>

Somehow, I can still call client.files_upload() after auth_test with no problem (token is correct) but I still get the error above displayed on Slack. What's wrong?
Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README instructions and the Slack.configure block shown in the report, then trace the client.auth_test call in the Ruby Slack Web API client. Reproduce the Heroku deployment error while comparing it with the successful client.files_upload call. Done means identifying the cause of the Array-to-String error and documenting or fixing the affected request path.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.