{"action":"created","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/15","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/15/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/15/events","html_url":"https://github.com/rabbitmq/rabbitmq-stomp/issues/15","id":86600251,"number":15,"title":"Parsing frames with non-ascii characters fails","user":{"login":"stefaneg","id":140227,"avatar_url":"https://avatars.githubusercontent.com/u/140227?v=3","gravatar_id":"","url":"https://api.github.com/users/stefaneg","html_url":"https://github.com/stefaneg","followers_url":"https://api.github.com/users/stefaneg/followers","following_url":"https://api.github.com/users/stefaneg/following{/other_user}","gists_url":"https://api.github.com/users/stefaneg/gists{/gist_id}","starred_url":"https://api.github.com/users/stefaneg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefaneg/subscriptions","organizations_url":"https://api.github.com/users/stefaneg/orgs","repos_url":"https://api.github.com/users/stefaneg/repos","events_url":"https://api.github.com/users/stefaneg/events{/privacy}","received_events_url":"https://api.github.com/users/stefaneg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"priviterag","id":54381,"avatar_url":"https://avatars.githubusercontent.com/u/54381?v=3","gravatar_id":"","url":"https://api.github.com/users/priviterag","html_url":"https://github.com/priviterag","followers_url":"https://api.github.com/users/priviterag/followers","following_url":"https://api.github.com/users/priviterag/following{/other_user}","gists_url":"https://api.github.com/users/priviterag/gists{/gist_id}","starred_url":"https://api.github.com/users/priviterag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priviterag/subscriptions","organizations_url":"https://api.github.com/users/priviterag/orgs","repos_url":"https://api.github.com/users/priviterag/repos","events_url":"https://api.github.com/users/priviterag/events{/privacy}","received_events_url":"https://api.github.com/users/priviterag/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-06-09T13:29:18Z","updated_at":"2015-09-04T11:24:20Z","closed_at":null,"body":"Seems like the rabbitmq-stomp plugin is not handling non-ascii characters very well.Using this code from a browser will crash the plugin, resulting in a silent failure on the client side, no message in the queue, and a crash report in the rabbitMQ logs (see below code).\r\n\r\n```javascript\r\n var ws = new SockJS('http://127.0.0.1:15674/stomp');\r\n    var client = Stomp.over(ws);\r\n/*\r\n    Once you have the client object you can follow API's exposed by stomp.js library. The next step is usually to establish a STOMP connection with the broker:\r\n*/\r\n\r\n    // SockJS does not support heart-beat: disable heart-beats\r\n    client.heartbeat.outgoing = 0;\r\n    client.heartbeat.incoming = 0;\r\n    client.debug = function() {\r\n        if (window.console && console.log && console.log.apply) {\r\n            console.log.apply(console, arguments);\r\n        }\r\n    };\r\n\r\n    var on_connect = function() {\r\n        console.log('connected', arguments);\r\n\r\n        var id = client.subscribe('measurements', function(d) {\r\n            console.debug(\"Got measurement\", d);\r\n        });\r\n        var msg = JSON.stringify({ message: \"Þetta er íslenska sem fer illa í rabbitmq-stomp\" });\r\n        console.log(\"msg\", msg);\r\n        client.send(\"crashqueue\", {\"content-type\":\"text/json\"}, msg);\r\n\r\n    };\r\n    var on_error =  function() {\r\n        console.log('error', arguments);\r\n    };\r\n    client.connect('guest', 'guest', on_connect, on_error, '/');\r\n\r\n```\r\n\r\nError log entry from rabbit<mypc>.log:\r\n\r\n```\r\n=ERROR REPORT==== 9-Jun-2015::13:24:01 ===\r\n** Generic server <0.5801.0> terminating \r\n** Last message in was {'$gen_cast',\r\n                           {sockjs_msg,\r\n                               <<83,69,78,68,10,99,111,110,116,101,110,116,\r\n                                 45,116,121,112,101,58,116,101,120,116,47,\r\n                                 106,115,111,110,10,100,101,115,116,105,110,\r\n                                 97,116,105,111,110,58,99,114,97,115,104,113,\r\n                                 117,101,117,101,10,99,111,110,116,101,110,\r\n                                 116,45,108,101,110,103,116,104,58,54,49,10,\r\n                                 10,123,34,109,101,115,115,97,103,101,34,58,\r\n                                 34,195,158,101,116,116,97,32,101,114,32,195,\r\n                                 173,115,108,101,110,115,107,97,32,115,101,\r\n                                 109,32,102,101,114,32,105,108,108,97,32,195,\r\n                                 173,32,114,97,98,98,105,116,109,113,45,115,\r\n                                 116,111,109,112,34,125,0>>}}\r\n** When Server state == {state,\r\n                            {sockjs_session,\r\n                                {<0.5798.0>,\r\n                                 [{peername,{{127,0,0,1},50344}},\r\n                                  {sockname,{{127,0,0,1},15674}},\r\n                                  {path,\"/stomp/905/oxauey2o/websocket\"},\r\n                                  {headers,[]}]}},\r\n                            <0.5800.0>,\r\n                            {resume,#Fun<rabbit_stomp_frame.0.85562437>}}\r\n** Reason for termination == \r\n** {{case_clause,{{badmatch,<<123,34,109,101,115,115,97,103,101,34,58,34,195,\r\n                              158,101,116,116,97,32,101,114,32,195,173,115,\r\n                              108,101,110,115,107,97,32,115,101,109,32,102,\r\n                              101,114,32,105,108,108,97,32,195,173,32,114,97,\r\n                              98,98,105,116,109,113,45,115,116,111,109,112,34,\r\n                              125,0>>},\r\n                  [{rabbit_stomp_frame,parse_body2,4,[]},\r\n                   {rabbit_ws_client,process_received_bytes,3,[]},\r\n                   {rabbit_ws_client,handle_cast,2,[]},\r\n                   {gen_server,try_dispatch,4,\r\n                               [{file,\"gen_server.erl\"},{line,593}]},\r\n                   {gen_server,handle_msg,5,\r\n                               [{file,\"gen_server.erl\"},{line,659}]},\r\n                   {proc_lib,init_p_do_apply,3,\r\n                             [{file,\"proc_lib.erl\"},{line,237}]}]}},\r\n    [{rabbit_ws_client,terminate,2,[]},\r\n     {gen_server,try_terminate,3,[{file,\"gen_server.erl\"},{line,621}]},\r\n     {gen_server,terminate,7,[{file,\"gen_server.erl\"},{line,787}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,237}]}]}\r\n```"},"comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/comments/137710069","html_url":"https://github.com/rabbitmq/rabbitmq-stomp/issues/15#issuecomment-137710069","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-stomp/issues/15","id":137710069,"user":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T11:24:20Z","updated_at":"2015-09-04T11:24:20Z","body":"This is an issue in SockJS and/or Web STOMP, please file it there if it is still relevant.\r\n\r\n@essen may have some thoughts on this (or tell if this is a known problem?)"}}