custom-rss icon indicating copy to clipboard operation
custom-rss copied to clipboard

Unable to run echo test

Open kaptk2 opened this issue 10 years ago • 6 comments
trafficstars

When trying the example the websocket does not function. Here is the output of the Photon serial connection:

Connecting... Connected, sending handshake. Sending handshake! GET / HTTP/1.1 Upgrade: websocket Connection: Upgrade Host: echo.websocket.org:80 Origin: SparkWebSocketClient Sec-WebSocket-Key: 1VTFj/CydlBCZDucDqw8eA== Sec-WebSocket-Version: 13

Handshake sent Reading handshake! handshake rcvd line: HTTP/1.1 101 Web Socket Protocol Handshake handshake rcvd line: Access-Control-Allow-Credentials: true handshake rcvd line: Access-Control-Allow-Headers: content-type handshake rcvd line: Access-Control-Allow-Headers: authorization handshake rcvd line: Access-Control-Allow-Headers: x-websocket-extensions handshake rcvd line: Access-Control-Allow-Headers: x-websocket-version handshake rcvd line: Access-Control-Allow-Headers: x-websocket-protocol handshake rcvd line: Access-Control-Allow-Origin: SparkWebSocketClient handshake rcvd line: Connection: Upgrade handshake rcvd line: Date: Sat, 18 Jul 2015 02:48:22 GMT handshake rcvd line: Sec-WebSocket-Accept: kuZ2KVbyl4oJOyuTXN/B93O3z9Y= handshake rcvd line: Server: Kaazing Gateway handshake rcvd line: Upgrade: websocket handshake rcvd line: Handshake Failed! Terminating Connection Failed!

kaptk2 avatar Jul 18 '15 02:07 kaptk2

I am getting the same "connection failed" results with Photon.

muvic08 avatar Aug 11 '15 15:08 muvic08

Hey was anyone able to get this to work with the photon?

miyoo2 avatar Oct 27 '15 23:10 miyoo2

By the way guys, this was fixed in a recent merge :)

imaustink avatar Jan 28 '16 06:01 imaustink

I'm getting the same response - the "Handshake Failed! Terminating". I tried the library that Particle has incorporated into their cloud compiler, and also tried making a local copy of the current version from Github - get the same result.

Oddly, it works with the "echo.websocket.org" but not with my Golang-based websocket server - which works fine with all the other clients I've tried. Anyone have any suggestions?

Thanks in advance.

ssokol avatar May 04 '17 23:05 ssokol

Probably your local one is using WebSocketSecure. If so - i can't help with this. Because there is an SSL connection required.

ekbduffy avatar May 09 '17 12:05 ekbduffy

Also there is hardcoded handshake check. So you can manually modify it. Just take a look at the code :) Check function readHandshake.

ekbduffy avatar May 09 '17 12:05 ekbduffy