Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with NodeJS #10

Closed
epegzz opened this issue Nov 4, 2017 · 4 comments
Closed

Not working with NodeJS #10

epegzz opened this issue Nov 4, 2017 · 4 comments

Comments

@epegzz
Copy link

epegzz commented Nov 4, 2017

Hi :)

I tried using home-assistant-js-websocket with NodeJS (tried versions 6.9.2 and 8.8.1 ) via the ws package (v3.3.0) as described in the Readme. However, it's failing with the following error message directly after connecting:

Error: RSV2 and RSV3 must be clear
    at Receiver.getInfo (/Users/epegzz/Projects/hassio/node_modules/ws/lib/Receiver.js:184:18)
    at Receiver.startLoop (/Users/epegzz/Projects/hassio/node_modules/ws/lib/Receiver.js:153:16)
    at Receiver.add (/Users/epegzz/Projects/hassio/node_modules/ws/lib/Receiver.js:139:10)
    at Socket._ultron.on (/Users/epegzz/Projects/hassio/node_modules/ws/lib/WebSocket.js:139:22)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Socket.Readable.read (_stream_readable.js:475:10)
    at flow (_stream_readable.js:846:34)
    at resume_ (_stream_readable.js:828:3)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)

This is obviously not an issue with this package, but I was wondering if you maybe had any idea nevertheless?

Cheers!

@balloob
Copy link
Member

balloob commented Nov 4, 2017

Sorry, have not tried it myself. If you figure it out, please let us know 👍

@epegzz
Copy link
Author

epegzz commented Nov 5, 2017

Okay, looks to me like a protocol implementation mismatch between the server and the client. I switched to the MQTT protocol for now and will look into this issue at a later time. :)

@epegzz epegzz closed this as completed Nov 5, 2017
@quazzie
Copy link

quazzie commented Dec 19, 2017

I have the same problem "RSV2 and RSV3 must be clear".
Using node v9.2.0 and ws@3.3.3

@quazzie
Copy link

quazzie commented Dec 21, 2017

i think http_parser steals a byte from the data nodejs/node#17789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants