obrie / turntabler

An evented Turntable API for Ruby (turntable.fm)
MIT License
28 stars 6 forks source link

Intermittent "No song playing" issue when calling client.room.current_song.vote #31

Open xpemps opened 11 years ago

xpemps commented 11 years ago

I am curious why I would get the below error when there is a song playing.

D, [2013-04-27T10:44:09.233116 #2131] DEBUG -- : Message received: {"msgid"=>6, "err"=>"No song playing.", "success"=>false, "command"=>"response_received"} E, [2013-04-27T10:44:09.233478 #2131] ERROR -- : Command "room.vote" failed with message: "No song playing." /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/client.rb:175:in api' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/resource.rb:184:inapi' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/song.rb:162:in vote' tt_client.rb:28:inblock (2 levels) in

' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/handler.rb:51:in call' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/handler.rb:51:inblock in run' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/handler.rb:49:in each' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/handler.rb:49:inrun' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/client.rb:556:in block in trigger' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/client.rb:555:ineach' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/client.rb:555:in trigger' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/client.rb:110:inblock in connect' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/connection.rb:130:in call' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler/connection.rb:130:inblock in dispatch' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler.rb:90:in call' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/turntabler-0.3.3/lib/turntabler.rb:90:inblock (2 levels) in run' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/em-synchrony-1.0.3/lib/em-synchrony.rb:29:in `block in synchrony'

Thank you for your help.

obrie commented 11 years ago

I'll admit I haven't seen that before. Any chance you have any of the logging information before and after that exception? Is there any chance the song starts and then immediately gets skipped -- before the vote has gotten a chance to go through? Nothing obvious is jumping out at me...

StephanieSunshine commented 11 years ago

So i've seen it numerous times, if you make something like autobop, you will trigger a natural defense to point padding at some point if the bot votes on X amount of your songs a day and this is how it silently fails you.

Easy way to check is to try and vote for a different account.

jasonhazel commented 11 years ago

This can also happen shortly after your bot starts. If it tries to vote before it has received information from turntable about the current song, this error happens.

I, personally, consider it a non-issue.

StephanieSunshine commented 11 years ago

@mrhazel I agree and I think we should close this one too :)

KevinNorth commented 10 years ago

I just ran into this myself. If the problem is that turntable's silently failing votes, is it possible to make that more clear in the log output?