seasocks icon indicating copy to clipboard operation
seasocks copied to clipboard

seasocks error with chromium/chrome

Open malmut opened this issue 7 years ago • 5 comments

Hello, I like your websocket-implementation because of its simplicity and purity. Sadly I obtain an error when I try to log in with chrome on android or chromium on linux, an error which is not present under firefox: "Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received." Do you know this problem? Greetings Marc

malmut avatar Feb 18 '18 15:02 malmut

Oh that's odd! I'll have to take a look. I use seasocks exclusively with chrome at work, and haven't seen this, but I don't doubt you. Will have a look...

mattgodbolt avatar Feb 18 '18 16:02 mattgodbolt

Hej, thank you for this immediate reaction. I have been digging into this and found my 'error'. I constructed the socket on the client side with 'var socket = new WebSocket('ws://' + host + ':' + port + '/ws', 'string'); ', i.e. with the attribute 'string'. That was ok with firefox but not with chrome. Without this attribute chrome behaves as expected.

malmut avatar Feb 18 '18 22:02 malmut

Oh wow! I've never passed another parameter to new WebSocket; I'll use this knowledge to try and work out what's going on...

mattgodbolt avatar Feb 19 '18 23:02 mattgodbolt

@malmut - did these update fix your issues?

mattgodbolt avatar May 28 '18 15:05 mattgodbolt

Thank you! I have got to try ....

P. Dr. Marc Wischnowsky [email protected] --- mobil gesendet ---

Matt Godbolt [email protected] schrieb am Mo., 28. Mai 2018, 17:43:

@malmut https://github.com/malmut - did these update fix your issues?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mattgodbolt/seasocks/issues/81#issuecomment-392558282, or mute the thread https://github.com/notifications/unsubscribe-auth/Adz1DQRUm06Rq-fjzVGDgE5IRz_YJhqNks5t3Bs3gaJpZM4SJumU .

malmut avatar May 28 '18 15:05 malmut