iPhone send Malformed UTF-8 characters

#1

Hi,
i try to develop a web app and want to use websocket for the communication between the clients.
On client side I use Autobahnjs and on server side i use Ratchet.
I made some tests and found a strange problem. Every browser works fine (Firefox, Chrome, Android) except the iphone browser.
The handshake is working and a connection is established. But when i want to send some data i got this error in my websocket logs.
Incoming Socket Stream:

Sock-In.INFO: New message received {“from”:118,“len”:356,“msg”:null} []
Sock-In.ERROR: (5): Malformed UTF-8 characters, possibly incorrectly encoded {“resource”:118,“file”:"…/vendor/cboden/Ratchet/src/Ratchet/Wamp/WampServer.php",“line”:89} []

It seems to be the iphone is sending some null messages. I checked my code and can’t find a failure which is producing this messages.
Also when i send a harcoded text i have the same failure. So i think it could be a bug of AutobahnJS?!

Can somebody help me?

Cheers

0 Likes

#2

It seems to be the iphone is sending some null messages. I checked my
code and can't find a failure which is producing this messages.
Also when i send a harcoded text i have the same failure. So i think it
could be a bug of AutobahnJS?!

We regularily test/use iOS devices .. using AutobahnJS on client and AutobahnPython server. Works fine.

Note that you need a WebSocket server that implements Hixie-76.
AutobahnPython implements RFC6455, Hybi-10+ and Hixie-76. Not sure if that applies to Ratchet also. Please ask the Ratchet guys (Chris?).
Currently, I don't think it's a AutobahnJS issue.

Cheers,
Tobias

0 Likes