mikemintz / rethinkdb-websocket-server

Node.js WebSocket server that proxies to RethinkDB. Supports query validation.
MIT License
156 stars 22 forks source link

Connect trouble with Firefox #24

Open ingararntzen opened 7 years ago

ingararntzen commented 7 years ago

Hi.

I'm having an issue with firefox clients failing to connect to rethinkdb-websocket-server. Connect works as expected for Chrome and chromium browsers.

The error message is also quite amusing :) Any idea what is going on here?

screenshot from 2016-11-14 12 35 43

Ingar

ingararntzen commented 7 years ago

Might be specific to certain versions of FF. This issue was on ubuntu. FF on my macbook does not have an issue.

Also, I'm experiencing similar browser sensitivity with regards to, #19 . I'm seeing this issue consistently on Chrome/ubuntu for a particular script, but not (!) on Chromium on the same box. Issue #19 is also present on Chrome on macosx, but Safari and FF does not have it there.

I guess the real question I have is what might account for this sensitivity among browsers?

ingararntzen commented 7 years ago

The issue similar to #19 seems to be an issue with rethinkdb generating illegal JSON, with browsers handling that a bit differently.

coffenbacher commented 7 years ago

but not (!) on Chromium on the same box

Well, that's fascinating! Is that still consistent?

ingararntzen commented 7 years ago

indeed - frequently faulty on chrome and consistently successful on chromium.

I've not had the opportunity to research this bug #19 much further yet. Maybe some kind of race condition could be accounting for this somewhat unpredictable behaviour. On error, there seems to be a missing block of data in the JSON delivered to the client. I have not yet verified if the data is similarly corrupted for the successful browsers.

screen shot 2016-11-14 at 19 09 21

mikethejet commented 7 years ago

Hi i have problem to connect from firefox who is sending in request headers to websockets as described here: https://github.com/nodejs/node-v0.x-archive/issues/14191 https://github.com/nodejitsu/node-http-proxy/pull/691

The app in firefox not works, in chrome, safari opera works. Can websocket server be changed to understand this headers?

WebSocket Middleware considers headers: Connection: keep-alive, upgrade as non-WebSocket request.

Its the problem of this library or any dependency? (https://github.com/nodejs/http-parser/pull/100 ) ? (for ex. ws 0.0.8 od old..) Thank you for any info.

mikethejet commented 7 years ago

Will help to upgrade the websockets module? packages.json
"ws": "^0.8.0"
Current: 1.1.2

mikethejet commented 7 years ago

Any news? @ingararntzen ?

ingararntzen commented 7 years ago

Sorry, I haven't looked further into this.