collectiveidea / tinder

Tinder is a Ruby API for interfacing with Campfire, the 37Signals chat application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to Faraday Breaks Room#Listen

chriswarren opened this issue · comments

Using 1.4.4 I could connect to a room and listen to it fine, but switching to 1.5.0 breaks it. I haven't had time to investigate possible causes yet, but based on other issues I've experienced with Faraday I suspect it's that the oAuth headers aren't being generated properly. Will look in to it more soon.

Did you happen to catch if any errors were raised? The current tests pass, but that doesn't necessarily mean much.

Oh yeah, sorry for not including that.

Tinder::ListenFailed: got an error! "invalid status code: 401."!

My first guess is that the headers aren't being written correctly. We ran in to something with this on another gem recently and ended up with a hack to fix it in a monkey patch. https://github.com/zencoder/assistly/commit/162a1c065d34cc8c6d43a96b98c928826dedad58 Haven't had a chance to go back and look at it in more depth yet.

Was finally able to reproduce this issue and am digging into it now.

@chriswarren: After playing around a bit, it seems that the call to #join inside the listen isn't joining the room (as far as I can tell).

The error is a bit unhelpful. The message is buried in the twitter-stream, and is actually saying Access Denied, user not in room. I'll keep digging over the weekend.

Thanks for investigating this @bryckbost. If I can help dig in to it at all let me know. I apologize for not doing more testing of my own yet - it's been a busy week.

If you have time, have at it. Hacked away at it for a while this morning but wasn't getting anywhere. Figured it was best to move on to something else :)

Fixed in 4497d18. Released 1.6.0 minutes ago.