Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

the string received in server is wrong #3

Open
cui-liqiang opened this Issue · 4 comments

5 participants

@cui-liqiang

In file chat_action.rb:17, the received param 'data' messed up. See error below:

Yajl::ParseError: lexical error: invalid char in json text.
                          ??K\?0~t??5z?if7?$5{?g~`?..7?i
 (right here) ------^

Looks like some encode/decode issue.

@leucos

Same issue here with Chrome (16.0.912.63 beta, Sec-WebSocket-Version: 13)
Works fine with FireFox (8.0, Sec-WebSocket-Version: 8) though.

127.0.0.1 - - [02/Jan/2012 14:24:55] "GET  HTTP/1.1" 200 - 0.0040
Yajl::ParseError: lexical error: invalid char in json text.
                                       ��͞�ٶ�������老�������㪨���
                     (right here) ------^

    /home/leucos/.rvm/gems/ruby-1.9.3-p0@webchat/gems/yajl-ruby-1.1.0/lib/yajl.rb:36:in `parse'

This happens here (gererated from index.erb, line 80):

    // send name when joining
    ws.onopen = function() {
      ws.send($.toJSON({ action: 'join', user: name }));
    }

Cramp::WebSocket probably doesn't support the latest drafts.

@edpratomo

this issue is gone in master branch. probably after websocket implementation has been replaced with faye-websocket.

@ariejan

Nah, still there.

@AmitPatel-BoTreeConsulting

Getting following error in FF 16.0.1 and Chrome 22.0.1229.94 on Ubuntu at chat_action.rb:58:in `parse_json'

Yajl::ParseError: lexical error: invalid char in json text.
                                       ������m�t�b�z�4�7�y�{�:�`�s�7�4
                     (right here) ------^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.