HEADS-project / heads_ide

http://heads-project.eu
9 stars 2 forks source link

Error in websocket, causes node to shut down #92

Closed kehusa closed 8 years ago

kehusa commented 8 years ago

Sometimes this occurs. Can it be handled in another way than shutting down the node?

Sensor reading{"fall":false,"fall_index":2.176892899305254,"bt_rssi":-78,"sensor_id":"d7aeebbfe4a7","sample_set":154,"fn_id":"FN4"}.
Sensor reading{"fall":false,"fall_index":0.3626942141185671,"bt_rssi":-61,"sensor_id":"d7aeebbfe4a7","sample_set":154,"fn_id":"FN1"}.
events.js:85
throw er; // Unhandled 'error' event
^
Error: zlib binding closed
at DeflateRaw.Zlib._transform (zlib.js:487:15)
at DeflateRaw.Transform._read (_stream_transform.js:179:10)
at DeflateRaw.Transform._write (_stream_transform.js:167:12)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at DeflateRaw.Writable.write (_stream_writable.js:217:11)
at DeflateRaw.Zlib.flush (zlib.js:456:10)
at DeflateRaw.<anonymous> (zlib.js:452:12)
at DeflateRaw.g (events.js:199:16)
at DeflateRaw.emit (events.js:104:17)
maxleiko commented 8 years ago

Can you try to update the ws library to 1.0.1 at the root of your node_modules folder, and see if it fixes the problem? Something like:

rm -rf node_modules/**/ws
npm i ws@1.0.1
maxleiko commented 8 years ago

Oh, my bad, this won't work, because I'm requesting ^0.8.0 pretty much everywhere.

maxleiko commented 8 years ago

If this error is only happening on the server, then you can modify the kevoree-group-ws package.json manually, so that the ws dependencies points to ^1.0.1 and then install it using the shell script I've given previously. It might do the trick (just to check if the latest ws version fixes the issue)

maxleiko commented 8 years ago

All new kevoree js standard libraries that uses ws have been updated. This shouldn't happen anymore.