node-wot
node-wot copied to clipboard
Error when performing observeProperty with binding-coap
The following error occurred. I apologize for the inconvenience and would appreciate your confirmation.
Problem
In binding-coap, when observeProperty is performed on the client side, an error occurs on the server and it stops. The errors that occurred are as follows:
/***/test-node-wot/error-coap-observeProperty/node_modules/@node-wot/binding-coap/dist/coap-server.js:483
error(`CoapServer on port ${this.port} failed on observe with: ${err.message}`);
^
TypeError: Cannot read properties of undefined (reading 'message')
at ObserveWriteStream.<anonymous> (/Users/***/test-node-wot/node_modules/@node-wot/binding-coap/src/coap-server.ts:706:82)
at ObserveWriteStream.emit (node:events:526:35)
at ObserveWriteStream.emit (node:domain:488:12)
at finish (node:internal/streams/writable:937:10)
at node:internal/streams/writable:918:13
at processTicksAndRejections (node:internal/process/task_queues:82:21)
environment
- Mac(Apple siicon)
- OS: Sonoma 14.1
- nodejs: v18 or v20
- node-wot: 0.8.12
Steps to reproduce
- get the following code https://github.com/hidetak/test-node-wot/tree/main/error-coap-observeProperty
- $ npm install
- $ npm run start:server
- open new terminal
- $ npm run start:client