stevegraham/slanger — Issue #8: JSON parse exception when channel names are too long
Author: masterkain
Created: 2011-12-29 23:29:52+00:00
State: open

When trying to authenticate a private- channel with a name that appears too long, the following happens:

/Users/kain/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/json/common.rb:148:in `parse': 743: unexpected token at '{"event":"pusher:subscribe","data":{"channel":"private-player-123a2a66352cf21b088909e657e43d089517577e","auth":"158ccfa8293455a0045b:86263a2688271f933239e7c07d59d3cab80c4c73416f646e40e983a229b4ee' (JSON::ParserError)
from /Users/kain/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/json/common.rb:148:in `parse'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/slanger-0.1.1/lib/slanger/handler.rb:16:in `onmessage'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/slanger-0.1.1/lib/slanger/web_socket_server.rb:13:in `block (3 levels) in run'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/connection.rb:17:in `call'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/connection.rb:17:in `trigger_on_message'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/message_processor_06.rb:45:in `message'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/framing07.rb:102:in `process_data'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/handler.rb:28:in `receive_data'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/em-websocket-0.3.6/lib/em-websocket/connection.rb:69:in `receive_data'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/gems/slanger-0.1.1/bin/slanger:46:in `'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/bin/slanger:21:in `load'
from /Users/kain/.rvm/gems/ruby-1.9.3-p0@push/bin/slanger:21:in `

'