You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
When a reddit user enables forced SSL, it seems to break the API. I've tested it using the save and unsave methods on a post. It returns a 307 redirect, and the method fails. I'm not sure what's involved to get this working. For now the fix is to disable forced SSL for the account.
I'm guessing this is related to the issue I was just seeing. Here's the backtrace (clipped to include redditkit-related lines):
TypeError: no implicit conversion of Symbol into Integer
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:72:in `[]'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:72:in `object_kind_from_response'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:41:in `object_class_from_response'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:79:in `object_from_response'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/users.rb:17:in `user'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client/account.rb:22:in `sign_in'
/home/me/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redditkit-1.0.2/lib/redditkit/client.rb:61:in `initialize'
It looks like the problem was the response body while logging in was empty. I dug in a bit and found this seemed to be because the signin request was being served a 301 redirect response, redirecting to https://www.reddit.com/... instead of http://.... Here's the response from faraday:
When a reddit user enables forced SSL, it seems to break the API. I've tested it using the
save
andunsave
methods on a post. It returns a 307 redirect, and the method fails. I'm not sure what's involved to get this working. For now the fix is to disable forced SSL for the account.The text was updated successfully, but these errors were encountered: