Retrieving long messages dont work

Sep 20, 2011 at 5:37 PM

Hi,

I use the latest build (69999) and chrome 14. My webapp sends json messages to the SuperWebSocketService that i have modified to retrieve and echo out to all connected sessions. Like the web sample. The strange thing is that short json messages (around 50-100 chars) work fine but longer dont. The dont arrive in my m_socketServer_NewMessageReceived so to speak.

Been experimenting with receiveBufferSize and maxCommandLength setting them to 10240 but that did not affect anything.

Any idea where i should start to fix this?

 

Thanks

/Johan

Coordinator
Sep 21, 2011 at 1:08 AM

I'll check this issue today!

Coordinator
Sep 21, 2011 at 4:03 AM

How long the message is, the SuperWebSocket cannot handle?

Sep 21, 2011 at 8:45 AM

Hi,

This example dont work:

'{"type":"sortupdated","data":{"itemid":"6491","columnid":"1","sort":"item[]=6517&item[]=6491","status":null,"toassigned":"65","fromassigned":"65","fromcolumnid":"12"}}'

Length: 167

Works:

'{"type":"assign","data":{"itemid":"6517","userid":"49"}}'

Also i was mistaken i use build: 69990 

Coordinator
Sep 21, 2011 at 8:50 AM

WOO,

this bug should have been fixed in the revision 69999!

http://superwebsocket.codeplex.com/SourceControl/changeset/changes/69999

Please use the latest source code.

 

Great,

Thank you very much!

Sep 21, 2011 at 8:58 AM

doh, sorry should have updated the sourcecode before bothering you. Thank you for a good project! :)

Sep 21, 2011 at 9:09 AM

Can confirm that it works with 70006. Thank you!

Coordinator
Sep 21, 2011 at 9:10 AM

Great, I'll roll out a new drop on these days!

Sep 21, 2011 at 9:31 AM

Noted a new thing. I get this in chrome console sometimes:

Could not decode a text frame as UTF-8.

When i get that the websocket disconnects.

The message sent is 

{"type":"assign","data":{"itemid":"6304","userid":"6"}}

But sometimes it do work as expected.. seems a bit random.

Coordinator
Sep 21, 2011 at 2:29 PM

Could you try the current latest code?

I fixed some bugs just now.

Sep 21, 2011 at 8:28 PM

Tried the latest build (70014) but still the same issue. Its still seems a bit random. Sometimes i get it on the first message i send or i can do alot of messages before "Could not decode a text frame as UTF-8."

Coordinator
Sep 22, 2011 at 1:08 AM

I haven't produce your issue.

Can you share me your test case?

Sep 23, 2011 at 7:36 AM

I'm afraid i dont have a testcase that is suitable to send. I will try latest versions again. See somethings that might be related is fixed.

Oct 30, 2011 at 9:03 PM

Hi, I'm getting the same error "Could not decode a text frame as UTF-8."

I am using the latest source, and built a small app around the Chat sample. Browser is Chrome 14.

Chat works fine, but when I try to send short messages back to the server (eg. 'hello') from within a JS loop running every 10ms or so, I get "Could not decode a text frame as UTF-8.".

Could it be that it's sending too often? Do I need to wait for something to happen before sending more?

Sometimes it sends 3 or so messages before going down, sometimes less.

Any pointers/ideas hugely appreciated!

btw, SuperWebSocket rocks!

Many thanks..

Oct 30, 2011 at 9:20 PM

Hi,

I think this was caused by sending too frequently. I managed to prevent the problem by only sending data from the client after I had received a message. This seems to work OK.