jmesnil / stomp-websocket

Stomp client for Web browsers and node.js apps
http://jmesnil.net/stomp-websocket/doc/
Apache License 2.0
1.43k stars 586 forks source link

Long jSON message causing unhandled frame #87

Open dennis-cheng opened 10 years ago

dennis-cheng commented 10 years ago

Hi!

When receiving long jSON messages, the stomp library throws an unhandled frame. We suspect it might be a asynch/timing bug in the library.

anyway to resolve this?

dennis-cheng commented 10 years ago

Have tried increasing the maxWebSocketFrameSize but that doesn't fix the issue. Problem happens every time running from console and happens frequently when running through nodeclipse hence it could be timing related issue.

https://github.com/jmesnil/stomp-websocket/pull/76 might have been the fix, when will this be released?

Error I get is: unhandled frame: content-length: 7923

dennis-cheng commented 10 years ago

I have taken the source from github and built against that and it resolved my issue. May I just ask when will this be released.

thanks

ceefour commented 9 years ago

I tried using master as of 3 Dec 2014's commits, but I still get error with sending large messages (~200 KB):

destination:/topic/lumen.arkan.camera.stream
content-length:186991

{"@type":"ImageObject","name":"camera.png","contentType":"image/png","contentUrl":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAgAElEQ…ytS108zzQRdqxpttPCAI1JqgOQmggoxcmL+pzKberj/wcdwfFweh7qzAAAAABJRU5ErkJggg=="}

remaining = 170681
stomp-3dec2014.js:145 remaining = 154297
stomp-3dec2014.js:145 remaining = 137913
stomp-3dec2014.js:145 remaining = 121529
stomp-3dec2014.js:145 remaining = 105145
stomp-3dec2014.js:145 remaining = 88761
stomp-3dec2014.js:145 remaining = 72377
stomp-3dec2014.js:145 remaining = 55993
stomp-3dec2014.js:145 remaining = 39609
stomp-3dec2014.js:145 remaining = 23225
stomp-3dec2014.js:145 remaining = 6841
stomp-3dec2014.js:145 Whoops! Lost connection to undefined

cc @sigitari

dungvu-novus commented 9 years ago

this issue always(and only) happen in Chrome when try to send big msg.

ceefour commented 8 years ago

Based on https://github.com/sockjs/sockjs-client/issues/251 @dungvu-qe claims it only happens on Chrome. So let's check if this happens with Firefox.

oriondean commented 8 years ago

I ran into this issue too, I managed to pin it down to the HTTP server used by the stomp plugin: https://github.com/ninenines/cowboy/issues/917

ceefour commented 8 years ago

Thank you @oriondean @essen ! :)

Wow! Can't wait for RabbitMQ 3.6.0 :)