views:

136

answers:

3

Ive tried several approaches and even copy/pasted from http://code.google.com/p/phpwebsocket/

Im using Google Chrome 5.0.375.70 beta and the error is always the same: Error: INVALID_STATE_ERR: DOM Exception 11

when debugging I see the readyState is always 0 (connecting), no other error is shown.

Any ideas?

A: 

how to solved this issue?

I have same error... OTL..

i want your replay ....

{removed email address}

asterism
try updating your libraries, the handshake has changed several times
Purefan
+1  A: 

There are currently 2 supported Drafts of the WebSocket API in the wild.

Draft75 which is the one that is supported by the linked PHP script, and Draft76 which requires a different Upgrade Header and Handshake, another one Draft77 is also finished and may suddenly and up being implement by a Browser.

Somewhere between Version 5 and 6 of Chrome they did the switch from Draft75 to Draft76.

As far as I can see here, the PHP Script does not terminate the connection when it receives an invalid upgrade header. Therefore Chrome will still wait for the Handshake, which explains while the ReadyState does not change.

Ivo Wetzel
Thanks, think it was just the handshake failing. I moved to using NodeJS so this is no longer a problem for me, still, thank you!
Purefan
btw, here's a shameless plug for my own websocket server ;-) http://code.google.com/p/web-socks/
Robin
+1  A: 

There's some PHP code that implements the 76 protocol here. Works a treat for me.

Robin
Thanks Robin, I'll be sure to check it out as soon as possible :)
Purefan