iobroker-community-adapters / ioBroker.mydlink

adapter to control mydlink sockets and motion detectors
MIT License
4 stars 3 forks source link

Invalid WebSocket frame: MASK must be clear #384

Open Tyraenor opened 8 months ago

Tyraenor commented 8 months ago

Describe the bug
After adding the device, the adapter crashes with a Websocket error.

To Reproduce
Steps to reproduce the behavior:

  1. Add the device to the instance

Expected behavior
The instance should start and enable the device.

Screenshots & Logfiles
host.iobroker 2024-01-05 00:17:13.262 error instance system.adapter.mydlink.0 terminated with code 1 (JS_CONTROLLER_STOPPED) host.iobroker 2024-01-05 00:17:13.262 error Caught by controller[0]: } host.iobroker 2024-01-05 00:17:13.262 error Caught by controller[0]: [Symbol(status-code)]: 1002 host.iobroker 2024-01-05 00:17:13.262 error Caught by controller[0]: code: 'WS_ERR_UNEXPECTED_MASK', host.iobroker 2024-01-05 00:17:13.262 error Caught by controller[0]: at addChunk (node:internal/streams/readable:368:12) { host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at TLSSocket.emit (node:domain:489:12) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at TLSSocket.emit (node:events:517:28) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at TLSSocket.socketOnData (/opt/iobroker/node_modules/ws/lib/websocket.js:1297:35) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at Receiver.Writable.write (node:internal/streams/writable:337:10) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at _write (node:internal/streams/writable:333:10) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at writeOrBuffer (node:internal/streams/writable:392:12) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at Receiver._write (/opt/iobroker/node_modules/ws/lib/receiver.js:98:10) host.iobroker 2024-01-05 00:17:13.261 error Caught by controller[0]: at Receiver.startLoop (/opt/iobroker/node_modules/ws/lib/receiver.js:159:16) host.iobroker 2024-01-05 00:17:13.260 error Caught by controller[0]: at Receiver.getInfo (/opt/iobroker/node_modules/ws/lib/receiver.js:344:26) host.iobroker 2024-01-05 00:17:13.260 error Caught by controller[0]: RangeError: Invalid WebSocket frame: MASK must be clear

mydlink.0 2024-01-05 00:17:13.118 warn Terminated (UNCAUGHT_EXCEPTION): Without reason

mydlink.0 2024-01-05 00:17:13.116 info terminating

mydlink.0 2024-01-05 00:17:13.116 info cleaned everything up...

mydlink.0 2024-01-05 00:17:12.875 error Exception-Code: WS_ERR_UNEXPECTED_MASK: Invalid WebSocket frame: MASK must be clear

mydlink.0 2024-01-05 00:17:12.872 error RangeError: Invalid WebSocket frame: MASK must be clear at Receiver.getInfo (/opt/iobroker/node_modules/ws/lib/receiver.js:344:26) at Receiver.startLoop (/opt/iobroker/node_modules/ws/lib/receiver.js:159:16) at Receiver._write (/opt/iobroker/node_modules/ws/lib/receiver.js:98:10) at writeOrBuffer (node:internal/streams/writable:392:12) at _write (node:internal/streams/writable:333:10) at Receiver.Writable.write (node:internal/streams/writable:337:10) at TLSSocket.socketOnData (/opt/iobroker/node_modules/ws/lib/websocket.js:1297:35) at TLSSocket.emit (node:events:517:28) at TLSSocket.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:368:12)

mydlink.0 2024-01-05 00:17:12.871 error uncaught exception: Invalid WebSocket frame: MASK must be clear

Versions:

Additional context
Add any other context about the problem here.

Garfonso commented 8 months ago

Which device do you try to add?

Tyraenor commented 8 months ago

D-Link WSP-D118

Tyraenor commented 8 months ago

Sorry, I really do not want to push here, but can we speed up our communication a bit? I want to know it if will be possible to use this device with ioBroker. If not I would like to return the device. But if it takes days for every reaction, I doubt that I will be in the returning time frame anymore.

Thank you so much for your help.

PS: It is okay, if you tell me, that you do not have the time to work things out quicker. Then I pack it up and return it. It is not a necessary device.

Tyraenor commented 8 months ago

Never mind. I will return it.

Garfonso commented 7 months ago

Sorry for not respoding to you earlier. I reopened the issue, because at least the crash should not happen.

The D118 on the other hand seems to be too much locked down to work properly with the adapter... not sure... I have one here and never really got it working. So it probably is for the best that you returned it.